Kconfig 65 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. config CC_VERSION_TEXT
  3. string
  4. default "$(CC_VERSION_TEXT)"
  5. help
  6. This is used in unclear ways:
  7. - Re-run Kconfig when the compiler is updated
  8. The 'default' property references the environment variable,
  9. CC_VERSION_TEXT so it is recorded in include/config/auto.conf.cmd.
  10. When the compiler is updated, Kconfig will be invoked.
  11. - Ensure full rebuild when the compiler is updated
  12. include/linux/compiler-version.h contains this option in the comment
  13. line so fixdep adds include/config/CC_VERSION_TEXT into the
  14. auto-generated dependency. When the compiler is updated, syncconfig
  15. will touch it and then every file will be rebuilt.
  16. config CC_IS_GCC
  17. def_bool $(success,test "$(cc-name)" = GCC)
  18. config GCC_VERSION
  19. int
  20. default $(cc-version) if CC_IS_GCC
  21. default 0
  22. config CC_IS_CLANG
  23. def_bool $(success,test "$(cc-name)" = Clang)
  24. config CLANG_VERSION
  25. int
  26. default $(cc-version) if CC_IS_CLANG
  27. default 0
  28. config AS_IS_GNU
  29. def_bool $(success,test "$(as-name)" = GNU)
  30. config AS_IS_LLVM
  31. def_bool $(success,test "$(as-name)" = LLVM)
  32. config AS_VERSION
  33. int
  34. # Use clang version if this is the integrated assembler
  35. default CLANG_VERSION if AS_IS_LLVM
  36. default $(as-version)
  37. config LD_IS_BFD
  38. def_bool $(success,test "$(ld-name)" = BFD)
  39. config LD_VERSION
  40. int
  41. default $(ld-version) if LD_IS_BFD
  42. default 0
  43. config LD_IS_LLD
  44. def_bool $(success,test "$(ld-name)" = LLD)
  45. config LLD_VERSION
  46. int
  47. default $(ld-version) if LD_IS_LLD
  48. default 0
  49. config RUSTC_VERSION
  50. int
  51. default $(rustc-version)
  52. help
  53. It does not depend on `RUST` since that one may need to use the version
  54. in a `depends on`.
  55. config RUST_IS_AVAILABLE
  56. def_bool $(success,$(srctree)/scripts/rust_is_available.sh)
  57. help
  58. This shows whether a suitable Rust toolchain is available (found).
  59. Please see Documentation/rust/quick-start.rst for instructions on how
  60. to satisfy the build requirements of Rust support.
  61. In particular, the Makefile target 'rustavailable' is useful to check
  62. why the Rust toolchain is not being detected.
  63. config RUSTC_LLVM_VERSION
  64. int
  65. default $(rustc-llvm-version)
  66. config CC_CAN_LINK
  67. bool
  68. default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m64-flag)) if 64BIT
  69. default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m32-flag))
  70. config CC_CAN_LINK_STATIC
  71. bool
  72. default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m64-flag) -static) if 64BIT
  73. default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m32-flag) -static)
  74. # Fixed in GCC 14, 13.3, 12.4 and 11.5
  75. # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113921
  76. config GCC_ASM_GOTO_OUTPUT_BROKEN
  77. bool
  78. depends on CC_IS_GCC
  79. default y if GCC_VERSION < 110500
  80. default y if GCC_VERSION >= 120000 && GCC_VERSION < 120400
  81. default y if GCC_VERSION >= 130000 && GCC_VERSION < 130300
  82. config CC_HAS_ASM_GOTO_OUTPUT
  83. def_bool y
  84. depends on !GCC_ASM_GOTO_OUTPUT_BROKEN
  85. depends on $(success,echo 'int foo(int x) { asm goto ("": "=r"(x) ::: bar); return x; bar: return 0; }' | $(CC) -x c - -c -o /dev/null)
  86. config CC_HAS_ASM_GOTO_TIED_OUTPUT
  87. depends on CC_HAS_ASM_GOTO_OUTPUT
  88. # Detect buggy gcc and clang, fixed in gcc-11 clang-14.
  89. def_bool $(success,echo 'int foo(int *x) { asm goto (".long (%l[bar]) - .": "+m"(*x) ::: bar); return *x; bar: return 0; }' | $CC -x c - -c -o /dev/null)
  90. config TOOLS_SUPPORT_RELR
  91. def_bool $(success,env "CC=$(CC)" "LD=$(LD)" "NM=$(NM)" "OBJCOPY=$(OBJCOPY)" $(srctree)/scripts/tools-support-relr.sh)
  92. config CC_HAS_ASM_INLINE
  93. def_bool $(success,echo 'void foo(void) { asm inline (""); }' | $(CC) -x c - -c -o /dev/null)
  94. config CC_HAS_NO_PROFILE_FN_ATTR
  95. def_bool $(success,echo '__attribute__((no_profile_instrument_function)) int x();' | $(CC) -x c - -c -o /dev/null -Werror)
  96. config CC_HAS_COUNTED_BY
  97. # TODO: when gcc 15 is released remove the build test and add
  98. # a gcc version check
  99. def_bool $(success,echo 'struct flex { int count; int array[] __attribute__((__counted_by__(count))); };' | $(CC) $(CLANG_FLAGS) -x c - -c -o /dev/null -Werror)
  100. # clang needs to be at least 19.1.3 to avoid __bdos miscalculations
  101. # https://github.com/llvm/llvm-project/pull/110497
  102. # https://github.com/llvm/llvm-project/pull/112636
  103. depends on !(CC_IS_CLANG && CLANG_VERSION < 190103)
  104. config LD_CAN_USE_KEEP_IN_OVERLAY
  105. # ld.lld prior to 21.0.0 did not support KEEP within an overlay description
  106. # https://github.com/llvm/llvm-project/pull/130661
  107. def_bool LD_IS_BFD || LLD_VERSION >= 210000
  108. config RUSTC_HAS_UNNECESSARY_TRANSMUTES
  109. def_bool RUSTC_VERSION >= 108800
  110. config PAHOLE_VERSION
  111. int
  112. default $(shell,$(srctree)/scripts/pahole-version.sh $(PAHOLE))
  113. config CONSTRUCTORS
  114. bool
  115. config IRQ_WORK
  116. def_bool y if SMP
  117. config BUILDTIME_TABLE_SORT
  118. bool
  119. config THREAD_INFO_IN_TASK
  120. bool
  121. help
  122. Select this to move thread_info off the stack into task_struct. To
  123. make this work, an arch will need to remove all thread_info fields
  124. except flags and fix any runtime bugs.
  125. One subtle change that will be needed is to use try_get_task_stack()
  126. and put_task_stack() in save_thread_stack_tsk() and get_wchan().
  127. menu "General setup"
  128. config BROKEN
  129. bool
  130. config BROKEN_ON_SMP
  131. bool
  132. depends on BROKEN || !SMP
  133. default y
  134. config INIT_ENV_ARG_LIMIT
  135. int
  136. default 32 if !UML
  137. default 128 if UML
  138. help
  139. Maximum of each of the number of arguments and environment
  140. variables passed to init from the kernel command line.
  141. config COMPILE_TEST
  142. bool "Compile also drivers which will not load"
  143. depends on HAS_IOMEM
  144. help
  145. Some drivers can be compiled on a different platform than they are
  146. intended to be run on. Despite they cannot be loaded there (or even
  147. when they load they cannot be used due to missing HW support),
  148. developers still, opposing to distributors, might want to build such
  149. drivers to compile-test them.
  150. If you are a developer and want to build everything available, say Y
  151. here. If you are a user/distributor, say N here to exclude useless
  152. drivers to be distributed.
  153. config WERROR
  154. bool "Compile the kernel with warnings as errors"
  155. default COMPILE_TEST
  156. help
  157. A kernel build should not cause any compiler warnings, and this
  158. enables the '-Werror' (for C) and '-Dwarnings' (for Rust) flags
  159. to enforce that rule by default. Certain warnings from other tools
  160. such as the linker may be upgraded to errors with this option as
  161. well.
  162. However, if you have a new (or very old) compiler or linker with odd
  163. and unusual warnings, or you have some architecture with problems,
  164. you may need to disable this config option in order to
  165. successfully build the kernel.
  166. If in doubt, say Y.
  167. config UAPI_HEADER_TEST
  168. bool "Compile test UAPI headers"
  169. depends on HEADERS_INSTALL && CC_CAN_LINK
  170. help
  171. Compile test headers exported to user-space to ensure they are
  172. self-contained, i.e. compilable as standalone units.
  173. If you are a developer or tester and want to ensure the exported
  174. headers are self-contained, say Y here. Otherwise, choose N.
  175. config LOCALVERSION
  176. string "Local version - append to kernel release"
  177. help
  178. Append an extra string to the end of your kernel version.
  179. This will show up when you type uname, for example.
  180. The string you set here will be appended after the contents of
  181. any files with a filename matching localversion* in your
  182. object and source tree, in that order. Your total string can
  183. be a maximum of 64 characters.
  184. config LOCALVERSION_AUTO
  185. bool "Automatically append version information to the version string"
  186. default y
  187. depends on !COMPILE_TEST
  188. help
  189. This will try to automatically determine if the current tree is a
  190. release tree by looking for git tags that belong to the current
  191. top of tree revision.
  192. A string of the format -gxxxxxxxx will be added to the localversion
  193. if a git-based tree is found. The string generated by this will be
  194. appended after any matching localversion* files, and after the value
  195. set in CONFIG_LOCALVERSION.
  196. (The actual string used here is the first 12 characters produced
  197. by running the command:
  198. $ git rev-parse --verify HEAD
  199. which is done within the script "scripts/setlocalversion".)
  200. config BUILD_SALT
  201. string "Build ID Salt"
  202. default ""
  203. help
  204. The build ID is used to link binaries and their debug info. Setting
  205. this option will use the value in the calculation of the build id.
  206. This is mostly useful for distributions which want to ensure the
  207. build is unique between builds. It's safe to leave the default.
  208. config HAVE_KERNEL_GZIP
  209. bool
  210. config HAVE_KERNEL_BZIP2
  211. bool
  212. config HAVE_KERNEL_LZMA
  213. bool
  214. config HAVE_KERNEL_XZ
  215. bool
  216. config HAVE_KERNEL_LZO
  217. bool
  218. config HAVE_KERNEL_LZ4
  219. bool
  220. config HAVE_KERNEL_ZSTD
  221. bool
  222. config HAVE_KERNEL_UNCOMPRESSED
  223. bool
  224. choice
  225. prompt "Kernel compression mode"
  226. default KERNEL_GZIP
  227. 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
  228. help
  229. The linux kernel is a kind of self-extracting executable.
  230. Several compression algorithms are available, which differ
  231. in efficiency, compression and decompression speed.
  232. Compression speed is only relevant when building a kernel.
  233. Decompression speed is relevant at each boot.
  234. If you have any problems with bzip2 or lzma compressed
  235. kernels, mail me (Alain Knaff) <alain@knaff.lu>. (An older
  236. version of this functionality (bzip2 only), for 2.4, was
  237. supplied by Christian Ludwig)
  238. High compression options are mostly useful for users, who
  239. are low on disk space (embedded systems), but for whom ram
  240. size matters less.
  241. If in doubt, select 'gzip'
  242. config KERNEL_GZIP
  243. bool "Gzip"
  244. depends on HAVE_KERNEL_GZIP
  245. help
  246. The old and tried gzip compression. It provides a good balance
  247. between compression ratio and decompression speed.
  248. config KERNEL_BZIP2
  249. bool "Bzip2"
  250. depends on HAVE_KERNEL_BZIP2
  251. help
  252. Its compression ratio and speed is intermediate.
  253. Decompression speed is slowest among the choices. The kernel
  254. size is about 10% smaller with bzip2, in comparison to gzip.
  255. Bzip2 uses a large amount of memory. For modern kernels you
  256. will need at least 8MB RAM or more for booting.
  257. config KERNEL_LZMA
  258. bool "LZMA"
  259. depends on HAVE_KERNEL_LZMA
  260. help
  261. This compression algorithm's ratio is best. Decompression speed
  262. is between gzip and bzip2. Compression is slowest.
  263. The kernel size is about 33% smaller with LZMA in comparison to gzip.
  264. config KERNEL_XZ
  265. bool "XZ"
  266. depends on HAVE_KERNEL_XZ
  267. help
  268. XZ uses the LZMA2 algorithm and instruction set specific
  269. BCJ filters which can improve compression ratio of executable
  270. code. The size of the kernel is about 30% smaller with XZ in
  271. comparison to gzip. On architectures for which there is a BCJ
  272. filter (i386, x86_64, ARM, ARM64, RISC-V, big endian PowerPC,
  273. and SPARC), XZ will create a few percent smaller kernel than
  274. plain LZMA.
  275. The speed is about the same as with LZMA: The decompression
  276. speed of XZ is better than that of bzip2 but worse than gzip
  277. and LZO. Compression is slow.
  278. config KERNEL_LZO
  279. bool "LZO"
  280. depends on HAVE_KERNEL_LZO
  281. help
  282. Its compression ratio is the poorest among the choices. The kernel
  283. size is about 10% bigger than gzip; however its speed
  284. (both compression and decompression) is the fastest.
  285. config KERNEL_LZ4
  286. bool "LZ4"
  287. depends on HAVE_KERNEL_LZ4
  288. help
  289. LZ4 is an LZ77-type compressor with a fixed, byte-oriented encoding.
  290. A preliminary version of LZ4 de/compression tool is available at
  291. <https://code.google.com/p/lz4/>.
  292. Its compression ratio is worse than LZO. The size of the kernel
  293. is about 8% bigger than LZO. But the decompression speed is
  294. faster than LZO.
  295. config KERNEL_ZSTD
  296. bool "ZSTD"
  297. depends on HAVE_KERNEL_ZSTD
  298. help
  299. ZSTD is a compression algorithm targeting intermediate compression
  300. with fast decompression speed. It will compress better than GZIP and
  301. decompress around the same speed as LZO, but slower than LZ4. You
  302. will need at least 192 KB RAM or more for booting. The zstd command
  303. line tool is required for compression.
  304. config KERNEL_UNCOMPRESSED
  305. bool "None"
  306. depends on HAVE_KERNEL_UNCOMPRESSED
  307. help
  308. Produce uncompressed kernel image. This option is usually not what
  309. you want. It is useful for debugging the kernel in slow simulation
  310. environments, where decompressing and moving the kernel is awfully
  311. slow. This option allows early boot code to skip the decompressor
  312. and jump right at uncompressed kernel image.
  313. endchoice
  314. config DEFAULT_INIT
  315. string "Default init path"
  316. default ""
  317. help
  318. This option determines the default init for the system if no init=
  319. option is passed on the kernel command line. If the requested path is
  320. not present, we will still then move on to attempting further
  321. locations (e.g. /sbin/init, etc). If this is empty, we will just use
  322. the fallback list when init= is not passed.
  323. config DEFAULT_HOSTNAME
  324. string "Default hostname"
  325. default "(none)"
  326. help
  327. This option determines the default system hostname before userspace
  328. calls sethostname(2). The kernel traditionally uses "(none)" here,
  329. but you may wish to use a different default here to make a minimal
  330. system more usable with less configuration.
  331. config SYSVIPC
  332. bool "System V IPC"
  333. help
  334. Inter Process Communication is a suite of library functions and
  335. system calls which let processes (running programs) synchronize and
  336. exchange information. It is generally considered to be a good thing,
  337. and some programs won't run unless you say Y here. In particular, if
  338. you want to run the DOS emulator dosemu under Linux (read the
  339. DOSEMU-HOWTO, available from <http://www.tldp.org/docs.html#howto>),
  340. you'll need to say Y here.
  341. You can find documentation about IPC with "info ipc" and also in
  342. section 6.4 of the Linux Programmer's Guide, available from
  343. <http://www.tldp.org/guides.html>.
  344. config SYSVIPC_SYSCTL
  345. bool
  346. depends on SYSVIPC
  347. depends on SYSCTL
  348. default y
  349. config SYSVIPC_COMPAT
  350. def_bool y
  351. depends on COMPAT && SYSVIPC
  352. config POSIX_MQUEUE
  353. bool "POSIX Message Queues"
  354. depends on NET
  355. help
  356. POSIX variant of message queues is a part of IPC. In POSIX message
  357. queues every message has a priority which decides about succession
  358. of receiving it by a process. If you want to compile and run
  359. programs written e.g. for Solaris with use of its POSIX message
  360. queues (functions mq_*) say Y here.
  361. POSIX message queues are visible as a filesystem called 'mqueue'
  362. and can be mounted somewhere if you want to do filesystem
  363. operations on message queues.
  364. If unsure, say Y.
  365. config POSIX_MQUEUE_SYSCTL
  366. bool
  367. depends on POSIX_MQUEUE
  368. depends on SYSCTL
  369. default y
  370. config WATCH_QUEUE
  371. bool "General notification queue"
  372. default n
  373. help
  374. This is a general notification queue for the kernel to pass events to
  375. userspace by splicing them into pipes. It can be used in conjunction
  376. with watches for key/keyring change notifications and device
  377. notifications.
  378. See Documentation/core-api/watch_queue.rst
  379. config CROSS_MEMORY_ATTACH
  380. bool "Enable process_vm_readv/writev syscalls"
  381. depends on MMU
  382. default y
  383. help
  384. Enabling this option adds the system calls process_vm_readv and
  385. process_vm_writev which allow a process with the correct privileges
  386. to directly read from or write to another process' address space.
  387. See the man page for more details.
  388. config USELIB
  389. bool "uselib syscall (for libc5 and earlier)"
  390. default ALPHA || M68K || SPARC
  391. help
  392. This option enables the uselib syscall, a system call used in the
  393. dynamic linker from libc5 and earlier. glibc does not use this
  394. system call. If you intend to run programs built on libc5 or
  395. earlier, you may need to enable this syscall. Current systems
  396. running glibc can safely disable this.
  397. config AUDIT
  398. bool "Auditing support"
  399. depends on NET
  400. help
  401. Enable auditing infrastructure that can be used with another
  402. kernel subsystem, such as SELinux (which requires this for
  403. logging of avc messages output). System call auditing is included
  404. on architectures which support it.
  405. config HAVE_ARCH_AUDITSYSCALL
  406. bool
  407. config AUDITSYSCALL
  408. def_bool y
  409. depends on AUDIT && HAVE_ARCH_AUDITSYSCALL
  410. select FSNOTIFY
  411. source "kernel/irq/Kconfig"
  412. source "kernel/time/Kconfig"
  413. source "kernel/bpf/Kconfig"
  414. source "kernel/Kconfig.preempt"
  415. menu "CPU/Task time and stats accounting"
  416. config VIRT_CPU_ACCOUNTING
  417. bool
  418. choice
  419. prompt "Cputime accounting"
  420. default TICK_CPU_ACCOUNTING
  421. # Kind of a stub config for the pure tick based cputime accounting
  422. config TICK_CPU_ACCOUNTING
  423. bool "Simple tick based cputime accounting"
  424. depends on !S390 && !NO_HZ_FULL
  425. help
  426. This is the basic tick based cputime accounting that maintains
  427. statistics about user, system and idle time spent on per jiffies
  428. granularity.
  429. If unsure, say Y.
  430. config VIRT_CPU_ACCOUNTING_NATIVE
  431. bool "Deterministic task and CPU time accounting"
  432. depends on HAVE_VIRT_CPU_ACCOUNTING && !NO_HZ_FULL
  433. select VIRT_CPU_ACCOUNTING
  434. help
  435. Select this option to enable more accurate task and CPU time
  436. accounting. This is done by reading a CPU counter on each
  437. kernel entry and exit and on transitions within the kernel
  438. between system, softirq and hardirq state, so there is a
  439. small performance impact. In the case of s390 or IBM POWER > 5,
  440. this also enables accounting of stolen time on logically-partitioned
  441. systems.
  442. config VIRT_CPU_ACCOUNTING_GEN
  443. bool "Full dynticks CPU time accounting"
  444. depends on HAVE_CONTEXT_TRACKING_USER
  445. depends on HAVE_VIRT_CPU_ACCOUNTING_GEN
  446. depends on GENERIC_CLOCKEVENTS
  447. select VIRT_CPU_ACCOUNTING
  448. select CONTEXT_TRACKING_USER
  449. help
  450. Select this option to enable task and CPU time accounting on full
  451. dynticks systems. This accounting is implemented by watching every
  452. kernel-user boundaries using the context tracking subsystem.
  453. The accounting is thus performed at the expense of some significant
  454. overhead.
  455. For now this is only useful if you are working on the full
  456. dynticks subsystem development.
  457. If unsure, say N.
  458. endchoice
  459. config IRQ_TIME_ACCOUNTING
  460. bool "Fine granularity task level IRQ time accounting"
  461. depends on HAVE_IRQ_TIME_ACCOUNTING && !VIRT_CPU_ACCOUNTING_NATIVE
  462. help
  463. Select this option to enable fine granularity task irq time
  464. accounting. This is done by reading a timestamp on each
  465. transitions between softirq and hardirq state, so there can be a
  466. small performance impact.
  467. If in doubt, say N here.
  468. config HAVE_SCHED_AVG_IRQ
  469. def_bool y
  470. depends on IRQ_TIME_ACCOUNTING || PARAVIRT_TIME_ACCOUNTING
  471. depends on SMP
  472. config SCHED_HW_PRESSURE
  473. bool
  474. default y if ARM && ARM_CPU_TOPOLOGY
  475. default y if ARM64
  476. depends on SMP
  477. depends on CPU_FREQ_THERMAL
  478. help
  479. Select this option to enable HW pressure accounting in the
  480. scheduler. HW pressure is the value conveyed to the scheduler
  481. that reflects the reduction in CPU compute capacity resulted from
  482. HW throttling. HW throttling occurs when the performance of
  483. a CPU is capped due to high operating temperatures as an example.
  484. If selected, the scheduler will be able to balance tasks accordingly,
  485. i.e. put less load on throttled CPUs than on non/less throttled ones.
  486. This requires the architecture to implement
  487. arch_update_hw_pressure() and arch_scale_thermal_pressure().
  488. config BSD_PROCESS_ACCT
  489. bool "BSD Process Accounting"
  490. depends on MULTIUSER
  491. help
  492. If you say Y here, a user level program will be able to instruct the
  493. kernel (via a special system call) to write process accounting
  494. information to a file: whenever a process exits, information about
  495. that process will be appended to the file by the kernel. The
  496. information includes things such as creation time, owning user,
  497. command name, memory usage, controlling terminal etc. (the complete
  498. list is in the struct acct in <file:include/linux/acct.h>). It is
  499. up to the user level program to do useful things with this
  500. information. This is generally a good idea, so say Y.
  501. config BSD_PROCESS_ACCT_V3
  502. bool "BSD Process Accounting version 3 file format"
  503. depends on BSD_PROCESS_ACCT
  504. default n
  505. help
  506. If you say Y here, the process accounting information is written
  507. in a new file format that also logs the process IDs of each
  508. process and its parent. Note that this file format is incompatible
  509. with previous v0/v1/v2 file formats, so you will need updated tools
  510. for processing it. A preliminary version of these tools is available
  511. at <http://www.gnu.org/software/acct/>.
  512. config TASKSTATS
  513. bool "Export task/process statistics through netlink"
  514. depends on NET
  515. depends on MULTIUSER
  516. default n
  517. help
  518. Export selected statistics for tasks/processes through the
  519. generic netlink interface. Unlike BSD process accounting, the
  520. statistics are available during the lifetime of tasks/processes as
  521. responses to commands. Like BSD accounting, they are sent to user
  522. space on task exit.
  523. Say N if unsure.
  524. config TASK_DELAY_ACCT
  525. bool "Enable per-task delay accounting"
  526. depends on TASKSTATS
  527. select SCHED_INFO
  528. help
  529. Collect information on time spent by a task waiting for system
  530. resources like cpu, synchronous block I/O completion and swapping
  531. in pages. Such statistics can help in setting a task's priorities
  532. relative to other tasks for cpu, io, rss limits etc.
  533. Say N if unsure.
  534. config TASK_XACCT
  535. bool "Enable extended accounting over taskstats"
  536. depends on TASKSTATS
  537. help
  538. Collect extended task accounting data and send the data
  539. to userland for processing over the taskstats interface.
  540. Say N if unsure.
  541. config TASK_IO_ACCOUNTING
  542. bool "Enable per-task storage I/O accounting"
  543. depends on TASK_XACCT
  544. help
  545. Collect information on the number of bytes of storage I/O which this
  546. task has caused.
  547. Say N if unsure.
  548. config PSI
  549. bool "Pressure stall information tracking"
  550. select KERNFS
  551. help
  552. Collect metrics that indicate how overcommitted the CPU, memory,
  553. and IO capacity are in the system.
  554. If you say Y here, the kernel will create /proc/pressure/ with the
  555. pressure statistics files cpu, memory, and io. These will indicate
  556. the share of walltime in which some or all tasks in the system are
  557. delayed due to contention of the respective resource.
  558. In kernels with cgroup support, cgroups (cgroup2 only) will
  559. have cpu.pressure, memory.pressure, and io.pressure files,
  560. which aggregate pressure stalls for the grouped tasks only.
  561. For more details see Documentation/accounting/psi.rst.
  562. Say N if unsure.
  563. config PSI_DEFAULT_DISABLED
  564. bool "Require boot parameter to enable pressure stall information tracking"
  565. default n
  566. depends on PSI
  567. help
  568. If set, pressure stall information tracking will be disabled
  569. per default but can be enabled through passing psi=1 on the
  570. kernel commandline during boot.
  571. This feature adds some code to the task wakeup and sleep
  572. paths of the scheduler. The overhead is too low to affect
  573. common scheduling-intense workloads in practice (such as
  574. webservers, memcache), but it does show up in artificial
  575. scheduler stress tests, such as hackbench.
  576. If you are paranoid and not sure what the kernel will be
  577. used for, say Y.
  578. Say N if unsure.
  579. endmenu # "CPU/Task time and stats accounting"
  580. config CPU_ISOLATION
  581. bool "CPU isolation"
  582. depends on SMP
  583. default y
  584. help
  585. Make sure that CPUs running critical tasks are not disturbed by
  586. any source of "noise" such as unbound workqueues, timers, kthreads...
  587. Unbound jobs get offloaded to housekeeping CPUs. This is driven by
  588. the "isolcpus=" boot parameter.
  589. Say Y if unsure.
  590. source "kernel/rcu/Kconfig"
  591. config IKCONFIG
  592. tristate "Kernel .config support"
  593. help
  594. This option enables the complete Linux kernel ".config" file
  595. contents to be saved in the kernel. It provides documentation
  596. of which kernel options are used in a running kernel or in an
  597. on-disk kernel. This information can be extracted from the kernel
  598. image file with the script scripts/extract-ikconfig and used as
  599. input to rebuild the current kernel or to build another kernel.
  600. It can also be extracted from a running kernel by reading
  601. /proc/config.gz if enabled (below).
  602. config IKCONFIG_PROC
  603. bool "Enable access to .config through /proc/config.gz"
  604. depends on IKCONFIG && PROC_FS
  605. help
  606. This option enables access to the kernel configuration file
  607. through /proc/config.gz.
  608. config IKHEADERS
  609. tristate "Enable kernel headers through /sys/kernel/kheaders.tar.xz"
  610. depends on SYSFS
  611. help
  612. This option enables access to the in-kernel headers that are generated during
  613. the build process. These can be used to build eBPF tracing programs,
  614. or similar programs. If you build the headers as a module, a module called
  615. kheaders.ko is built which can be loaded on-demand to get access to headers.
  616. config LOG_BUF_SHIFT
  617. int "Kernel log buffer size (16 => 64KB, 17 => 128KB)"
  618. range 12 25
  619. default 17
  620. depends on PRINTK
  621. help
  622. Select the minimal kernel log buffer size as a power of 2.
  623. The final size is affected by LOG_CPU_MAX_BUF_SHIFT config
  624. parameter, see below. Any higher size also might be forced
  625. by "log_buf_len" boot parameter.
  626. Examples:
  627. 17 => 128 KB
  628. 16 => 64 KB
  629. 15 => 32 KB
  630. 14 => 16 KB
  631. 13 => 8 KB
  632. 12 => 4 KB
  633. config LOG_CPU_MAX_BUF_SHIFT
  634. int "CPU kernel log buffer size contribution (13 => 8 KB, 17 => 128KB)"
  635. depends on SMP
  636. range 0 21
  637. default 0 if BASE_SMALL
  638. default 12
  639. depends on PRINTK
  640. help
  641. This option allows to increase the default ring buffer size
  642. according to the number of CPUs. The value defines the contribution
  643. of each CPU as a power of 2. The used space is typically only few
  644. lines however it might be much more when problems are reported,
  645. e.g. backtraces.
  646. The increased size means that a new buffer has to be allocated and
  647. the original static one is unused. It makes sense only on systems
  648. with more CPUs. Therefore this value is used only when the sum of
  649. contributions is greater than the half of the default kernel ring
  650. buffer as defined by LOG_BUF_SHIFT. The default values are set
  651. so that more than 16 CPUs are needed to trigger the allocation.
  652. Also this option is ignored when "log_buf_len" kernel parameter is
  653. used as it forces an exact (power of two) size of the ring buffer.
  654. The number of possible CPUs is used for this computation ignoring
  655. hotplugging making the computation optimal for the worst case
  656. scenario while allowing a simple algorithm to be used from bootup.
  657. Examples shift values and their meaning:
  658. 17 => 128 KB for each CPU
  659. 16 => 64 KB for each CPU
  660. 15 => 32 KB for each CPU
  661. 14 => 16 KB for each CPU
  662. 13 => 8 KB for each CPU
  663. 12 => 4 KB for each CPU
  664. config PRINTK_INDEX
  665. bool "Printk indexing debugfs interface"
  666. depends on PRINTK && DEBUG_FS
  667. help
  668. Add support for indexing of all printk formats known at compile time
  669. at <debugfs>/printk/index/<module>.
  670. This can be used as part of maintaining daemons which monitor
  671. /dev/kmsg, as it permits auditing the printk formats present in a
  672. kernel, allowing detection of cases where monitored printks are
  673. changed or no longer present.
  674. There is no additional runtime cost to printk with this enabled.
  675. #
  676. # Architectures with an unreliable sched_clock() should select this:
  677. #
  678. config HAVE_UNSTABLE_SCHED_CLOCK
  679. bool
  680. config GENERIC_SCHED_CLOCK
  681. bool
  682. menu "Scheduler features"
  683. config UCLAMP_TASK
  684. bool "Enable utilization clamping for RT/FAIR tasks"
  685. depends on CPU_FREQ_GOV_SCHEDUTIL
  686. help
  687. This feature enables the scheduler to track the clamped utilization
  688. of each CPU based on RUNNABLE tasks scheduled on that CPU.
  689. With this option, the user can specify the min and max CPU
  690. utilization allowed for RUNNABLE tasks. The max utilization defines
  691. the maximum frequency a task should use while the min utilization
  692. defines the minimum frequency it should use.
  693. Both min and max utilization clamp values are hints to the scheduler,
  694. aiming at improving its frequency selection policy, but they do not
  695. enforce or grant any specific bandwidth for tasks.
  696. If in doubt, say N.
  697. config UCLAMP_BUCKETS_COUNT
  698. int "Number of supported utilization clamp buckets"
  699. range 5 20
  700. default 5
  701. depends on UCLAMP_TASK
  702. help
  703. Defines the number of clamp buckets to use. The range of each bucket
  704. will be SCHED_CAPACITY_SCALE/UCLAMP_BUCKETS_COUNT. The higher the
  705. number of clamp buckets the finer their granularity and the higher
  706. the precision of clamping aggregation and tracking at run-time.
  707. For example, with the minimum configuration value we will have 5
  708. clamp buckets tracking 20% utilization each. A 25% boosted tasks will
  709. be refcounted in the [20..39]% bucket and will set the bucket clamp
  710. effective value to 25%.
  711. If a second 30% boosted task should be co-scheduled on the same CPU,
  712. that task will be refcounted in the same bucket of the first task and
  713. it will boost the bucket clamp effective value to 30%.
  714. The clamp effective value of a bucket is reset to its nominal value
  715. (20% in the example above) when there are no more tasks refcounted in
  716. that bucket.
  717. An additional boost/capping margin can be added to some tasks. In the
  718. example above the 25% task will be boosted to 30% until it exits the
  719. CPU. If that should be considered not acceptable on certain systems,
  720. it's always possible to reduce the margin by increasing the number of
  721. clamp buckets to trade off used memory for run-time tracking
  722. precision.
  723. If in doubt, use the default value.
  724. endmenu
  725. #
  726. # For architectures that want to enable the support for NUMA-affine scheduler
  727. # balancing logic:
  728. #
  729. config ARCH_SUPPORTS_NUMA_BALANCING
  730. bool
  731. #
  732. # For architectures that prefer to flush all TLBs after a number of pages
  733. # are unmapped instead of sending one IPI per page to flush. The architecture
  734. # must provide guarantees on what happens if a clean TLB cache entry is
  735. # written after the unmap. Details are in mm/rmap.c near the check for
  736. # should_defer_flush. The architecture should also consider if the full flush
  737. # and the refill costs are offset by the savings of sending fewer IPIs.
  738. config ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
  739. bool
  740. config CC_HAS_INT128
  741. def_bool !$(cc-option,$(m64-flag) -D__SIZEOF_INT128__=0) && 64BIT
  742. config CC_IMPLICIT_FALLTHROUGH
  743. string
  744. default "-Wimplicit-fallthrough=5" if CC_IS_GCC && $(cc-option,-Wimplicit-fallthrough=5)
  745. default "-Wimplicit-fallthrough" if CC_IS_CLANG && $(cc-option,-Wunreachable-code-fallthrough)
  746. # Currently, disable gcc-10+ array-bounds globally.
  747. # It's still broken in gcc-13, so no upper bound yet.
  748. config GCC10_NO_ARRAY_BOUNDS
  749. def_bool y
  750. config CC_NO_ARRAY_BOUNDS
  751. bool
  752. default y if CC_IS_GCC && GCC_VERSION >= 90000 && GCC10_NO_ARRAY_BOUNDS
  753. # Currently, disable -Wstringop-overflow for GCC globally.
  754. config GCC_NO_STRINGOP_OVERFLOW
  755. def_bool y
  756. config CC_NO_STRINGOP_OVERFLOW
  757. bool
  758. default y if CC_IS_GCC && GCC_NO_STRINGOP_OVERFLOW
  759. config CC_STRINGOP_OVERFLOW
  760. bool
  761. default y if CC_IS_GCC && !CC_NO_STRINGOP_OVERFLOW
  762. #
  763. # For architectures that know their GCC __int128 support is sound
  764. #
  765. config ARCH_SUPPORTS_INT128
  766. bool
  767. # For architectures that (ab)use NUMA to represent different memory regions
  768. # all cpu-local but of different latencies, such as SuperH.
  769. #
  770. config ARCH_WANT_NUMA_VARIABLE_LOCALITY
  771. bool
  772. config NUMA_BALANCING
  773. bool "Memory placement aware NUMA scheduler"
  774. depends on ARCH_SUPPORTS_NUMA_BALANCING
  775. depends on !ARCH_WANT_NUMA_VARIABLE_LOCALITY
  776. depends on SMP && NUMA && MIGRATION && !PREEMPT_RT
  777. help
  778. This option adds support for automatic NUMA aware memory/task placement.
  779. The mechanism is quite primitive and is based on migrating memory when
  780. it has references to the node the task is running on.
  781. This system will be inactive on UMA systems.
  782. config NUMA_BALANCING_DEFAULT_ENABLED
  783. bool "Automatically enable NUMA aware memory/task placement"
  784. default y
  785. depends on NUMA_BALANCING
  786. help
  787. If set, automatic NUMA balancing will be enabled if running on a NUMA
  788. machine.
  789. config SLAB_OBJ_EXT
  790. bool
  791. menuconfig CGROUPS
  792. bool "Control Group support"
  793. select KERNFS
  794. help
  795. This option adds support for grouping sets of processes together, for
  796. use with process control subsystems such as Cpusets, CFS, memory
  797. controls or device isolation.
  798. See
  799. - Documentation/scheduler/sched-design-CFS.rst (CFS)
  800. - Documentation/admin-guide/cgroup-v1/ (features for grouping, isolation
  801. and resource control)
  802. Say N if unsure.
  803. if CGROUPS
  804. config PAGE_COUNTER
  805. bool
  806. config CGROUP_FAVOR_DYNMODS
  807. bool "Favor dynamic modification latency reduction by default"
  808. help
  809. This option enables the "favordynmods" mount option by default
  810. which reduces the latencies of dynamic cgroup modifications such
  811. as task migrations and controller on/offs at the cost of making
  812. hot path operations such as forks and exits more expensive.
  813. Say N if unsure.
  814. config MEMCG
  815. bool "Memory controller"
  816. select PAGE_COUNTER
  817. select EVENTFD
  818. select SLAB_OBJ_EXT
  819. help
  820. Provides control over the memory footprint of tasks in a cgroup.
  821. config MEMCG_V1
  822. bool "Legacy cgroup v1 memory controller"
  823. depends on MEMCG
  824. default n
  825. help
  826. Legacy cgroup v1 memory controller which has been deprecated by
  827. cgroup v2 implementation. The v1 is there for legacy applications
  828. which haven't migrated to the new cgroup v2 interface yet. If you
  829. do not have any such application then you are completely fine leaving
  830. this option disabled.
  831. Please note that feature set of the legacy memory controller is likely
  832. going to shrink due to deprecation process. New deployments with v1
  833. controller are highly discouraged.
  834. Say N if unsure.
  835. config BLK_CGROUP
  836. bool "IO controller"
  837. depends on BLOCK
  838. default n
  839. help
  840. Generic block IO controller cgroup interface. This is the common
  841. cgroup interface which should be used by various IO controlling
  842. policies.
  843. Currently, CFQ IO scheduler uses it to recognize task groups and
  844. control disk bandwidth allocation (proportional time slice allocation)
  845. to such task groups. It is also used by bio throttling logic in
  846. block layer to implement upper limit in IO rates on a device.
  847. This option only enables generic Block IO controller infrastructure.
  848. One needs to also enable actual IO controlling logic/policy. For
  849. enabling proportional weight division of disk bandwidth in CFQ, set
  850. CONFIG_BFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
  851. CONFIG_BLK_DEV_THROTTLING=y.
  852. See Documentation/admin-guide/cgroup-v1/blkio-controller.rst for more information.
  853. config CGROUP_WRITEBACK
  854. bool
  855. depends on MEMCG && BLK_CGROUP
  856. default y
  857. menuconfig CGROUP_SCHED
  858. bool "CPU controller"
  859. default n
  860. help
  861. This feature lets CPU scheduler recognize task groups and control CPU
  862. bandwidth allocation to such task groups. It uses cgroups to group
  863. tasks.
  864. if CGROUP_SCHED
  865. config GROUP_SCHED_WEIGHT
  866. def_bool n
  867. config FAIR_GROUP_SCHED
  868. bool "Group scheduling for SCHED_OTHER"
  869. depends on CGROUP_SCHED
  870. select GROUP_SCHED_WEIGHT
  871. default CGROUP_SCHED
  872. config CFS_BANDWIDTH
  873. bool "CPU bandwidth provisioning for FAIR_GROUP_SCHED"
  874. depends on FAIR_GROUP_SCHED
  875. default n
  876. help
  877. This option allows users to define CPU bandwidth rates (limits) for
  878. tasks running within the fair group scheduler. Groups with no limit
  879. set are considered to be unconstrained and will run with no
  880. restriction.
  881. See Documentation/scheduler/sched-bwc.rst for more information.
  882. config RT_GROUP_SCHED
  883. bool "Group scheduling for SCHED_RR/FIFO"
  884. depends on CGROUP_SCHED
  885. default n
  886. help
  887. This feature lets you explicitly allocate real CPU bandwidth
  888. to task groups. If enabled, it will also make it impossible to
  889. schedule realtime tasks for non-root users until you allocate
  890. realtime bandwidth for them.
  891. See Documentation/scheduler/sched-rt-group.rst for more information.
  892. config EXT_GROUP_SCHED
  893. bool
  894. depends on SCHED_CLASS_EXT && CGROUP_SCHED
  895. select GROUP_SCHED_WEIGHT
  896. default y
  897. endif #CGROUP_SCHED
  898. config SCHED_MM_CID
  899. def_bool y
  900. depends on SMP && RSEQ
  901. config UCLAMP_TASK_GROUP
  902. bool "Utilization clamping per group of tasks"
  903. depends on CGROUP_SCHED
  904. depends on UCLAMP_TASK
  905. default n
  906. help
  907. This feature enables the scheduler to track the clamped utilization
  908. of each CPU based on RUNNABLE tasks currently scheduled on that CPU.
  909. When this option is enabled, the user can specify a min and max
  910. CPU bandwidth which is allowed for each single task in a group.
  911. The max bandwidth allows to clamp the maximum frequency a task
  912. can use, while the min bandwidth allows to define a minimum
  913. frequency a task will always use.
  914. When task group based utilization clamping is enabled, an eventually
  915. specified task-specific clamp value is constrained by the cgroup
  916. specified clamp value. Both minimum and maximum task clamping cannot
  917. be bigger than the corresponding clamping defined at task group level.
  918. If in doubt, say N.
  919. config CGROUP_PIDS
  920. bool "PIDs controller"
  921. help
  922. Provides enforcement of process number limits in the scope of a
  923. cgroup. Any attempt to fork more processes than is allowed in the
  924. cgroup will fail. PIDs are fundamentally a global resource because it
  925. is fairly trivial to reach PID exhaustion before you reach even a
  926. conservative kmemcg limit. As a result, it is possible to grind a
  927. system to halt without being limited by other cgroup policies. The
  928. PIDs controller is designed to stop this from happening.
  929. It should be noted that organisational operations (such as attaching
  930. to a cgroup hierarchy) will *not* be blocked by the PIDs controller,
  931. since the PIDs limit only affects a process's ability to fork, not to
  932. attach to a cgroup.
  933. config CGROUP_RDMA
  934. bool "RDMA controller"
  935. help
  936. Provides enforcement of RDMA resources defined by IB stack.
  937. It is fairly easy for consumers to exhaust RDMA resources, which
  938. can result into resource unavailability to other consumers.
  939. RDMA controller is designed to stop this from happening.
  940. Attaching processes with active RDMA resources to the cgroup
  941. hierarchy is allowed even if can cross the hierarchy's limit.
  942. config CGROUP_FREEZER
  943. bool "Freezer controller"
  944. help
  945. Provides a way to freeze and unfreeze all tasks in a
  946. cgroup.
  947. This option affects the ORIGINAL cgroup interface. The cgroup2 memory
  948. controller includes important in-kernel memory consumers per default.
  949. If you're using cgroup2, say N.
  950. config CGROUP_HUGETLB
  951. bool "HugeTLB controller"
  952. depends on HUGETLB_PAGE
  953. select PAGE_COUNTER
  954. default n
  955. help
  956. Provides a cgroup controller for HugeTLB pages.
  957. When you enable this, you can put a per cgroup limit on HugeTLB usage.
  958. The limit is enforced during page fault. Since HugeTLB doesn't
  959. support page reclaim, enforcing the limit at page fault time implies
  960. that, the application will get SIGBUS signal if it tries to access
  961. HugeTLB pages beyond its limit. This requires the application to know
  962. beforehand how much HugeTLB pages it would require for its use. The
  963. control group is tracked in the third page lru pointer. This means
  964. that we cannot use the controller with huge page less than 3 pages.
  965. config CPUSETS
  966. bool "Cpuset controller"
  967. depends on SMP
  968. help
  969. This option will let you create and manage CPUSETs which
  970. allow dynamically partitioning a system into sets of CPUs and
  971. Memory Nodes and assigning tasks to run only within those sets.
  972. This is primarily useful on large SMP or NUMA systems.
  973. Say N if unsure.
  974. config CPUSETS_V1
  975. bool "Legacy cgroup v1 cpusets controller"
  976. depends on CPUSETS
  977. default n
  978. help
  979. Legacy cgroup v1 cpusets controller which has been deprecated by
  980. cgroup v2 implementation. The v1 is there for legacy applications
  981. which haven't migrated to the new cgroup v2 interface yet. If you
  982. do not have any such application then you are completely fine leaving
  983. this option disabled.
  984. Say N if unsure.
  985. config PROC_PID_CPUSET
  986. bool "Include legacy /proc/<pid>/cpuset file"
  987. depends on CPUSETS
  988. default y
  989. config CGROUP_DEVICE
  990. bool "Device controller"
  991. help
  992. Provides a cgroup controller implementing whitelists for
  993. devices which a process in the cgroup can mknod or open.
  994. config CGROUP_CPUACCT
  995. bool "Simple CPU accounting controller"
  996. help
  997. Provides a simple controller for monitoring the
  998. total CPU consumed by the tasks in a cgroup.
  999. config CGROUP_PERF
  1000. bool "Perf controller"
  1001. depends on PERF_EVENTS
  1002. help
  1003. This option extends the perf per-cpu mode to restrict monitoring
  1004. to threads which belong to the cgroup specified and run on the
  1005. designated cpu. Or this can be used to have cgroup ID in samples
  1006. so that it can monitor performance events among cgroups.
  1007. Say N if unsure.
  1008. config CGROUP_BPF
  1009. bool "Support for eBPF programs attached to cgroups"
  1010. depends on BPF_SYSCALL
  1011. select SOCK_CGROUP_DATA
  1012. help
  1013. Allow attaching eBPF programs to a cgroup using the bpf(2)
  1014. syscall command BPF_PROG_ATTACH.
  1015. In which context these programs are accessed depends on the type
  1016. of attachment. For instance, programs that are attached using
  1017. BPF_CGROUP_INET_INGRESS will be executed on the ingress path of
  1018. inet sockets.
  1019. config CGROUP_MISC
  1020. bool "Misc resource controller"
  1021. default n
  1022. help
  1023. Provides a controller for miscellaneous resources on a host.
  1024. Miscellaneous scalar resources are the resources on the host system
  1025. which cannot be abstracted like the other cgroups. This controller
  1026. tracks and limits the miscellaneous resources used by a process
  1027. attached to a cgroup hierarchy.
  1028. For more information, please check misc cgroup section in
  1029. /Documentation/admin-guide/cgroup-v2.rst.
  1030. config CGROUP_DEBUG
  1031. bool "Debug controller"
  1032. default n
  1033. depends on DEBUG_KERNEL
  1034. help
  1035. This option enables a simple controller that exports
  1036. debugging information about the cgroups framework. This
  1037. controller is for control cgroup debugging only. Its
  1038. interfaces are not stable.
  1039. Say N.
  1040. config SOCK_CGROUP_DATA
  1041. bool
  1042. default n
  1043. endif # CGROUPS
  1044. menuconfig NAMESPACES
  1045. bool "Namespaces support" if EXPERT
  1046. depends on MULTIUSER
  1047. default !EXPERT
  1048. help
  1049. Provides the way to make tasks work with different objects using
  1050. the same id. For example same IPC id may refer to different objects
  1051. or same user id or pid may refer to different tasks when used in
  1052. different namespaces.
  1053. if NAMESPACES
  1054. config UTS_NS
  1055. bool "UTS namespace"
  1056. default y
  1057. help
  1058. In this namespace tasks see different info provided with the
  1059. uname() system call
  1060. config TIME_NS
  1061. bool "TIME namespace"
  1062. depends on GENERIC_VDSO_TIME_NS
  1063. default y
  1064. help
  1065. In this namespace boottime and monotonic clocks can be set.
  1066. The time will keep going with the same pace.
  1067. config IPC_NS
  1068. bool "IPC namespace"
  1069. depends on (SYSVIPC || POSIX_MQUEUE)
  1070. default y
  1071. help
  1072. In this namespace tasks work with IPC ids which correspond to
  1073. different IPC objects in different namespaces.
  1074. config USER_NS
  1075. bool "User namespace"
  1076. default n
  1077. help
  1078. This allows containers, i.e. vservers, to use user namespaces
  1079. to provide different user info for different servers.
  1080. When user namespaces are enabled in the kernel it is
  1081. recommended that the MEMCG option also be enabled and that
  1082. user-space use the memory control groups to limit the amount
  1083. of memory a memory unprivileged users can use.
  1084. If unsure, say N.
  1085. config PID_NS
  1086. bool "PID Namespaces"
  1087. default y
  1088. help
  1089. Support process id namespaces. This allows having multiple
  1090. processes with the same pid as long as they are in different
  1091. pid namespaces. This is a building block of containers.
  1092. config NET_NS
  1093. bool "Network namespace"
  1094. depends on NET
  1095. default y
  1096. help
  1097. Allow user space to create what appear to be multiple instances
  1098. of the network stack.
  1099. endif # NAMESPACES
  1100. config CHECKPOINT_RESTORE
  1101. bool "Checkpoint/restore support"
  1102. depends on PROC_FS
  1103. select PROC_CHILDREN
  1104. select KCMP
  1105. default n
  1106. help
  1107. Enables additional kernel features in a sake of checkpoint/restore.
  1108. In particular it adds auxiliary prctl codes to setup process text,
  1109. data and heap segment sizes, and a few additional /proc filesystem
  1110. entries.
  1111. If unsure, say N here.
  1112. config SCHED_AUTOGROUP
  1113. bool "Automatic process group scheduling"
  1114. select CGROUPS
  1115. select CGROUP_SCHED
  1116. select FAIR_GROUP_SCHED
  1117. help
  1118. This option optimizes the scheduler for common desktop workloads by
  1119. automatically creating and populating task groups. This separation
  1120. of workloads isolates aggressive CPU burners (like build jobs) from
  1121. desktop applications. Task group autogeneration is currently based
  1122. upon task session.
  1123. config RELAY
  1124. bool "Kernel->user space relay support (formerly relayfs)"
  1125. select IRQ_WORK
  1126. help
  1127. This option enables support for relay interface support in
  1128. certain file systems (such as debugfs).
  1129. It is designed to provide an efficient mechanism for tools and
  1130. facilities to relay large amounts of data from kernel space to
  1131. user space.
  1132. If unsure, say N.
  1133. config BLK_DEV_INITRD
  1134. bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support"
  1135. help
  1136. The initial RAM filesystem is a ramfs which is loaded by the
  1137. boot loader (loadlin or lilo) and that is mounted as root
  1138. before the normal boot procedure. It is typically used to
  1139. load modules needed to mount the "real" root file system,
  1140. etc. See <file:Documentation/admin-guide/initrd.rst> for details.
  1141. If RAM disk support (BLK_DEV_RAM) is also included, this
  1142. also enables initial RAM disk (initrd) support and adds
  1143. 15 Kbytes (more on some other architectures) to the kernel size.
  1144. If unsure say Y.
  1145. if BLK_DEV_INITRD
  1146. source "usr/Kconfig"
  1147. endif
  1148. config BOOT_CONFIG
  1149. bool "Boot config support"
  1150. select BLK_DEV_INITRD if !BOOT_CONFIG_EMBED
  1151. help
  1152. Extra boot config allows system admin to pass a config file as
  1153. complemental extension of kernel cmdline when booting.
  1154. The boot config file must be attached at the end of initramfs
  1155. with checksum, size and magic word.
  1156. See <file:Documentation/admin-guide/bootconfig.rst> for details.
  1157. If unsure, say Y.
  1158. config BOOT_CONFIG_FORCE
  1159. bool "Force unconditional bootconfig processing"
  1160. depends on BOOT_CONFIG
  1161. default y if BOOT_CONFIG_EMBED
  1162. help
  1163. With this Kconfig option set, BOOT_CONFIG processing is carried
  1164. out even when the "bootconfig" kernel-boot parameter is omitted.
  1165. In fact, with this Kconfig option set, there is no way to
  1166. make the kernel ignore the BOOT_CONFIG-supplied kernel-boot
  1167. parameters.
  1168. If unsure, say N.
  1169. config BOOT_CONFIG_EMBED
  1170. bool "Embed bootconfig file in the kernel"
  1171. depends on BOOT_CONFIG
  1172. help
  1173. Embed a bootconfig file given by BOOT_CONFIG_EMBED_FILE in the
  1174. kernel. Usually, the bootconfig file is loaded with the initrd
  1175. image. But if the system doesn't support initrd, this option will
  1176. help you by embedding a bootconfig file while building the kernel.
  1177. If unsure, say N.
  1178. config BOOT_CONFIG_EMBED_FILE
  1179. string "Embedded bootconfig file path"
  1180. depends on BOOT_CONFIG_EMBED
  1181. help
  1182. Specify a bootconfig file which will be embedded to the kernel.
  1183. This bootconfig will be used if there is no initrd or no other
  1184. bootconfig in the initrd.
  1185. config INITRAMFS_PRESERVE_MTIME
  1186. bool "Preserve cpio archive mtimes in initramfs"
  1187. depends on BLK_DEV_INITRD
  1188. default y
  1189. help
  1190. Each entry in an initramfs cpio archive carries an mtime value. When
  1191. enabled, extracted cpio items take this mtime, with directory mtime
  1192. setting deferred until after creation of any child entries.
  1193. If unsure, say Y.
  1194. choice
  1195. prompt "Compiler optimization level"
  1196. default CC_OPTIMIZE_FOR_PERFORMANCE
  1197. config CC_OPTIMIZE_FOR_PERFORMANCE
  1198. bool "Optimize for performance (-O2)"
  1199. help
  1200. This is the default optimization level for the kernel, building
  1201. with the "-O2" compiler flag for best performance and most
  1202. helpful compile-time warnings.
  1203. config CC_OPTIMIZE_FOR_SIZE
  1204. bool "Optimize for size (-Os)"
  1205. help
  1206. Choosing this option will pass "-Os" to your compiler resulting
  1207. in a smaller kernel.
  1208. endchoice
  1209. config HAVE_LD_DEAD_CODE_DATA_ELIMINATION
  1210. bool
  1211. help
  1212. This requires that the arch annotates or otherwise protects
  1213. its external entry points from being discarded. Linker scripts
  1214. must also merge .text.*, .data.*, and .bss.* correctly into
  1215. output sections. Care must be taken not to pull in unrelated
  1216. sections (e.g., '.text.init'). Typically '.' in section names
  1217. is used to distinguish them from label names / C identifiers.
  1218. config LD_DEAD_CODE_DATA_ELIMINATION
  1219. bool "Dead code and data elimination (EXPERIMENTAL)"
  1220. depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION
  1221. depends on EXPERT
  1222. depends on $(cc-option,-ffunction-sections -fdata-sections)
  1223. depends on $(ld-option,--gc-sections)
  1224. help
  1225. Enable this if you want to do dead code and data elimination with
  1226. the linker by compiling with -ffunction-sections -fdata-sections,
  1227. and linking with --gc-sections.
  1228. This can reduce on disk and in-memory size of the kernel
  1229. code and static data, particularly for small configs and
  1230. on small systems. This has the possibility of introducing
  1231. silently broken kernel if the required annotations are not
  1232. present. This option is not well tested yet, so use at your
  1233. own risk.
  1234. config LD_ORPHAN_WARN
  1235. def_bool y
  1236. depends on ARCH_WANT_LD_ORPHAN_WARN
  1237. depends on $(ld-option,--orphan-handling=warn)
  1238. depends on $(ld-option,--orphan-handling=error)
  1239. config LD_ORPHAN_WARN_LEVEL
  1240. string
  1241. depends on LD_ORPHAN_WARN
  1242. default "error" if WERROR
  1243. default "warn"
  1244. config SYSCTL
  1245. bool
  1246. config HAVE_UID16
  1247. bool
  1248. config SYSCTL_EXCEPTION_TRACE
  1249. bool
  1250. help
  1251. Enable support for /proc/sys/debug/exception-trace.
  1252. config SYSCTL_ARCH_UNALIGN_NO_WARN
  1253. bool
  1254. help
  1255. Enable support for /proc/sys/kernel/ignore-unaligned-usertrap
  1256. Allows arch to define/use @no_unaligned_warning to possibly warn
  1257. about unaligned access emulation going on under the hood.
  1258. config SYSCTL_ARCH_UNALIGN_ALLOW
  1259. bool
  1260. help
  1261. Enable support for /proc/sys/kernel/unaligned-trap
  1262. Allows arches to define/use @unaligned_enabled to runtime toggle
  1263. the unaligned access emulation.
  1264. see arch/parisc/kernel/unaligned.c for reference
  1265. config HAVE_PCSPKR_PLATFORM
  1266. bool
  1267. menuconfig EXPERT
  1268. bool "Configure standard kernel features (expert users)"
  1269. # Unhide debug options, to make the on-by-default options visible
  1270. select DEBUG_KERNEL
  1271. help
  1272. This option allows certain base kernel options and settings
  1273. to be disabled or tweaked. This is for specialized
  1274. environments which can tolerate a "non-standard" kernel.
  1275. Only use this if you really know what you are doing.
  1276. config UID16
  1277. bool "Enable 16-bit UID system calls" if EXPERT
  1278. depends on HAVE_UID16 && MULTIUSER
  1279. default y
  1280. help
  1281. This enables the legacy 16-bit UID syscall wrappers.
  1282. config MULTIUSER
  1283. bool "Multiple users, groups and capabilities support" if EXPERT
  1284. default y
  1285. help
  1286. This option enables support for non-root users, groups and
  1287. capabilities.
  1288. If you say N here, all processes will run with UID 0, GID 0, and all
  1289. possible capabilities. Saying N here also compiles out support for
  1290. system calls related to UIDs, GIDs, and capabilities, such as setuid,
  1291. setgid, and capset.
  1292. If unsure, say Y here.
  1293. config SGETMASK_SYSCALL
  1294. bool "sgetmask/ssetmask syscalls support" if EXPERT
  1295. default PARISC || M68K || PPC || MIPS || X86 || SPARC || MICROBLAZE || SUPERH
  1296. help
  1297. sys_sgetmask and sys_ssetmask are obsolete system calls
  1298. no longer supported in libc but still enabled by default in some
  1299. architectures.
  1300. If unsure, leave the default option here.
  1301. config SYSFS_SYSCALL
  1302. bool "Sysfs syscall support" if EXPERT
  1303. default y
  1304. help
  1305. sys_sysfs is an obsolete system call no longer supported in libc.
  1306. Note that disabling this option is more secure but might break
  1307. compatibility with some systems.
  1308. If unsure say Y here.
  1309. config FHANDLE
  1310. bool "open by fhandle syscalls" if EXPERT
  1311. select EXPORTFS
  1312. default y
  1313. help
  1314. If you say Y here, a user level program will be able to map
  1315. file names to handle and then later use the handle for
  1316. different file system operations. This is useful in implementing
  1317. userspace file servers, which now track files using handles instead
  1318. of names. The handle would remain the same even if file names
  1319. get renamed. Enables open_by_handle_at(2) and name_to_handle_at(2)
  1320. syscalls.
  1321. config POSIX_TIMERS
  1322. bool "Posix Clocks & timers" if EXPERT
  1323. default y
  1324. help
  1325. This includes native support for POSIX timers to the kernel.
  1326. Some embedded systems have no use for them and therefore they
  1327. can be configured out to reduce the size of the kernel image.
  1328. When this option is disabled, the following syscalls won't be
  1329. available: timer_create, timer_gettime: timer_getoverrun,
  1330. timer_settime, timer_delete, clock_adjtime, getitimer,
  1331. setitimer, alarm. Furthermore, the clock_settime, clock_gettime,
  1332. clock_getres and clock_nanosleep syscalls will be limited to
  1333. CLOCK_REALTIME, CLOCK_MONOTONIC and CLOCK_BOOTTIME only.
  1334. If unsure say y.
  1335. config PRINTK
  1336. default y
  1337. bool "Enable support for printk" if EXPERT
  1338. select IRQ_WORK
  1339. help
  1340. This option enables normal printk support. Removing it
  1341. eliminates most of the message strings from the kernel image
  1342. and makes the kernel more or less silent. As this makes it
  1343. very difficult to diagnose system problems, saying N here is
  1344. strongly discouraged.
  1345. config BUG
  1346. bool "BUG() support" if EXPERT
  1347. default y
  1348. help
  1349. Disabling this option eliminates support for BUG and WARN, reducing
  1350. the size of your kernel image and potentially quietly ignoring
  1351. numerous fatal conditions. You should only consider disabling this
  1352. option for embedded systems with no facilities for reporting errors.
  1353. Just say Y.
  1354. config ELF_CORE
  1355. depends on COREDUMP
  1356. default y
  1357. bool "Enable ELF core dumps" if EXPERT
  1358. help
  1359. Enable support for generating core dumps. Disabling saves about 4k.
  1360. config PCSPKR_PLATFORM
  1361. bool "Enable PC-Speaker support" if EXPERT
  1362. depends on HAVE_PCSPKR_PLATFORM
  1363. select I8253_LOCK
  1364. default y
  1365. help
  1366. This option allows to disable the internal PC-Speaker
  1367. support, saving some memory.
  1368. config BASE_SMALL
  1369. bool "Enable smaller-sized data structures for core" if EXPERT
  1370. help
  1371. Enabling this option reduces the size of miscellaneous core
  1372. kernel data structures. This saves memory on small machines,
  1373. but may reduce performance.
  1374. config FUTEX
  1375. bool "Enable futex support" if EXPERT
  1376. depends on !(SPARC32 && SMP)
  1377. default y
  1378. imply RT_MUTEXES
  1379. help
  1380. Disabling this option will cause the kernel to be built without
  1381. support for "fast userspace mutexes". The resulting kernel may not
  1382. run glibc-based applications correctly.
  1383. config FUTEX_PI
  1384. bool
  1385. depends on FUTEX && RT_MUTEXES
  1386. default y
  1387. config EPOLL
  1388. bool "Enable eventpoll support" if EXPERT
  1389. default y
  1390. help
  1391. Disabling this option will cause the kernel to be built without
  1392. support for epoll family of system calls.
  1393. config SIGNALFD
  1394. bool "Enable signalfd() system call" if EXPERT
  1395. default y
  1396. help
  1397. Enable the signalfd() system call that allows to receive signals
  1398. on a file descriptor.
  1399. If unsure, say Y.
  1400. config TIMERFD
  1401. bool "Enable timerfd() system call" if EXPERT
  1402. default y
  1403. help
  1404. Enable the timerfd() system call that allows to receive timer
  1405. events on a file descriptor.
  1406. If unsure, say Y.
  1407. config EVENTFD
  1408. bool "Enable eventfd() system call" if EXPERT
  1409. default y
  1410. help
  1411. Enable the eventfd() system call that allows to receive both
  1412. kernel notification (ie. KAIO) or userspace notifications.
  1413. If unsure, say Y.
  1414. config SHMEM
  1415. bool "Use full shmem filesystem" if EXPERT
  1416. default y
  1417. depends on MMU
  1418. help
  1419. The shmem is an internal filesystem used to manage shared memory.
  1420. It is backed by swap and manages resource limits. It is also exported
  1421. to userspace as tmpfs if TMPFS is enabled. Disabling this
  1422. option replaces shmem and tmpfs with the much simpler ramfs code,
  1423. which may be appropriate on small systems without swap.
  1424. config AIO
  1425. bool "Enable AIO support" if EXPERT
  1426. default y
  1427. help
  1428. This option enables POSIX asynchronous I/O which may by used
  1429. by some high performance threaded applications. Disabling
  1430. this option saves about 7k.
  1431. config IO_URING
  1432. bool "Enable IO uring support" if EXPERT
  1433. select IO_WQ
  1434. default y
  1435. help
  1436. This option enables support for the io_uring interface, enabling
  1437. applications to submit and complete IO through submission and
  1438. completion rings that are shared between the kernel and application.
  1439. config GCOV_PROFILE_URING
  1440. bool "Enable GCOV profiling on the io_uring subsystem"
  1441. depends on IO_URING && GCOV_KERNEL
  1442. help
  1443. Enable GCOV profiling on the io_uring subsystem, to facilitate
  1444. code coverage testing.
  1445. If unsure, say N.
  1446. Note that this will have a negative impact on the performance of
  1447. the io_uring subsystem, hence this should only be enabled for
  1448. specific test purposes.
  1449. config ADVISE_SYSCALLS
  1450. bool "Enable madvise/fadvise syscalls" if EXPERT
  1451. default y
  1452. help
  1453. This option enables the madvise and fadvise syscalls, used by
  1454. applications to advise the kernel about their future memory or file
  1455. usage, improving performance. If building an embedded system where no
  1456. applications use these syscalls, you can disable this option to save
  1457. space.
  1458. config MEMBARRIER
  1459. bool "Enable membarrier() system call" if EXPERT
  1460. default y
  1461. help
  1462. Enable the membarrier() system call that allows issuing memory
  1463. barriers across all running threads, which can be used to distribute
  1464. the cost of user-space memory barriers asymmetrically by transforming
  1465. pairs of memory barriers into pairs consisting of membarrier() and a
  1466. compiler barrier.
  1467. If unsure, say Y.
  1468. config KCMP
  1469. bool "Enable kcmp() system call" if EXPERT
  1470. help
  1471. Enable the kernel resource comparison system call. It provides
  1472. user-space with the ability to compare two processes to see if they
  1473. share a common resource, such as a file descriptor or even virtual
  1474. memory space.
  1475. If unsure, say N.
  1476. config RSEQ
  1477. bool "Enable rseq() system call" if EXPERT
  1478. default y
  1479. depends on HAVE_RSEQ
  1480. select MEMBARRIER
  1481. help
  1482. Enable the restartable sequences system call. It provides a
  1483. user-space cache for the current CPU number value, which
  1484. speeds up getting the current CPU number from user-space,
  1485. as well as an ABI to speed up user-space operations on
  1486. per-CPU data.
  1487. If unsure, say Y.
  1488. config DEBUG_RSEQ
  1489. default n
  1490. bool "Enable debugging of rseq() system call" if EXPERT
  1491. depends on RSEQ && DEBUG_KERNEL
  1492. help
  1493. Enable extra debugging checks for the rseq system call.
  1494. If unsure, say N.
  1495. config CACHESTAT_SYSCALL
  1496. bool "Enable cachestat() system call" if EXPERT
  1497. default y
  1498. help
  1499. Enable the cachestat system call, which queries the page cache
  1500. statistics of a file (number of cached pages, dirty pages,
  1501. pages marked for writeback, (recently) evicted pages).
  1502. If unsure say Y here.
  1503. config PC104
  1504. bool "PC/104 support" if EXPERT
  1505. help
  1506. Expose PC/104 form factor device drivers and options available for
  1507. selection and configuration. Enable this option if your target
  1508. machine has a PC/104 bus.
  1509. config KALLSYMS
  1510. bool "Load all symbols for debugging/ksymoops" if EXPERT
  1511. default y
  1512. help
  1513. Say Y here to let the kernel print out symbolic crash information and
  1514. symbolic stack backtraces. This increases the size of the kernel
  1515. somewhat, as all symbols have to be loaded into the kernel image.
  1516. config KALLSYMS_SELFTEST
  1517. bool "Test the basic functions and performance of kallsyms"
  1518. depends on KALLSYMS
  1519. default n
  1520. help
  1521. Test the basic functions and performance of some interfaces, such as
  1522. kallsyms_lookup_name. It also calculates the compression rate of the
  1523. kallsyms compression algorithm for the current symbol set.
  1524. Start self-test automatically after system startup. Suggest executing
  1525. "dmesg | grep kallsyms_selftest" to collect test results. "finish" is
  1526. displayed in the last line, indicating that the test is complete.
  1527. config KALLSYMS_ALL
  1528. bool "Include all symbols in kallsyms"
  1529. depends on DEBUG_KERNEL && KALLSYMS
  1530. help
  1531. Normally kallsyms only contains the symbols of functions for nicer
  1532. OOPS messages and backtraces (i.e., symbols from the text and inittext
  1533. sections). This is sufficient for most cases. And only if you want to
  1534. enable kernel live patching, or other less common use cases (e.g.,
  1535. when a debugger is used) all symbols are required (i.e., names of
  1536. variables from the data sections, etc).
  1537. This option makes sure that all symbols are loaded into the kernel
  1538. image (i.e., symbols from all sections) in cost of increased kernel
  1539. size (depending on the kernel configuration, it may be 300KiB or
  1540. something like this).
  1541. Say N unless you really need all symbols, or kernel live patching.
  1542. config KALLSYMS_ABSOLUTE_PERCPU
  1543. bool
  1544. depends on KALLSYMS
  1545. default X86_64 && SMP
  1546. # end of the "standard kernel features (expert users)" menu
  1547. config ARCH_HAS_MEMBARRIER_CALLBACKS
  1548. bool
  1549. config ARCH_HAS_MEMBARRIER_SYNC_CORE
  1550. bool
  1551. config HAVE_PERF_EVENTS
  1552. bool
  1553. help
  1554. See tools/perf/design.txt for details.
  1555. config GUEST_PERF_EVENTS
  1556. bool
  1557. depends on HAVE_PERF_EVENTS
  1558. config PERF_USE_VMALLOC
  1559. bool
  1560. help
  1561. See tools/perf/design.txt for details
  1562. menu "Kernel Performance Events And Counters"
  1563. config PERF_EVENTS
  1564. bool "Kernel performance events and counters"
  1565. default y if PROFILING
  1566. depends on HAVE_PERF_EVENTS
  1567. select IRQ_WORK
  1568. help
  1569. Enable kernel support for various performance events provided
  1570. by software and hardware.
  1571. Software events are supported either built-in or via the
  1572. use of generic tracepoints.
  1573. Most modern CPUs support performance events via performance
  1574. counter registers. These registers count the number of certain
  1575. types of hw events: such as instructions executed, cachemisses
  1576. suffered, or branches mis-predicted - without slowing down the
  1577. kernel or applications. These registers can also trigger interrupts
  1578. when a threshold number of events have passed - and can thus be
  1579. used to profile the code that runs on that CPU.
  1580. The Linux Performance Event subsystem provides an abstraction of
  1581. these software and hardware event capabilities, available via a
  1582. system call and used by the "perf" utility in tools/perf/. It
  1583. provides per task and per CPU counters, and it provides event
  1584. capabilities on top of those.
  1585. Say Y if unsure.
  1586. config DEBUG_PERF_USE_VMALLOC
  1587. default n
  1588. bool "Debug: use vmalloc to back perf mmap() buffers"
  1589. depends on PERF_EVENTS && DEBUG_KERNEL && !PPC
  1590. select PERF_USE_VMALLOC
  1591. help
  1592. Use vmalloc memory to back perf mmap() buffers.
  1593. Mostly useful for debugging the vmalloc code on platforms
  1594. that don't require it.
  1595. Say N if unsure.
  1596. endmenu
  1597. config SYSTEM_DATA_VERIFICATION
  1598. def_bool n
  1599. select SYSTEM_TRUSTED_KEYRING
  1600. select KEYS
  1601. select CRYPTO
  1602. select CRYPTO_RSA
  1603. select ASYMMETRIC_KEY_TYPE
  1604. select ASYMMETRIC_PUBLIC_KEY_SUBTYPE
  1605. select ASN1
  1606. select OID_REGISTRY
  1607. select X509_CERTIFICATE_PARSER
  1608. select PKCS7_MESSAGE_PARSER
  1609. help
  1610. Provide PKCS#7 message verification using the contents of the system
  1611. trusted keyring to provide public keys. This then can be used for
  1612. module verification, kexec image verification and firmware blob
  1613. verification.
  1614. config PROFILING
  1615. bool "Profiling support"
  1616. help
  1617. Say Y here to enable the extended profiling support mechanisms used
  1618. by profilers.
  1619. config RUST
  1620. bool "Rust support"
  1621. depends on HAVE_RUST
  1622. depends on RUST_IS_AVAILABLE
  1623. depends on !MODVERSIONS
  1624. depends on !GCC_PLUGIN_RANDSTRUCT
  1625. depends on !RANDSTRUCT
  1626. depends on !DEBUG_INFO_BTF || (PAHOLE_HAS_LANG_EXCLUDE && !LTO)
  1627. depends on !CFI_CLANG || HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC
  1628. select CFI_ICALL_NORMALIZE_INTEGERS if CFI_CLANG
  1629. depends on !CALL_PADDING || RUSTC_VERSION >= 108100
  1630. depends on !KASAN_SW_TAGS
  1631. depends on !(MITIGATION_RETHUNK && KASAN) || RUSTC_VERSION >= 108300
  1632. help
  1633. Enables Rust support in the kernel.
  1634. This allows other Rust-related options, like drivers written in Rust,
  1635. to be selected.
  1636. It is also required to be able to load external kernel modules
  1637. written in Rust.
  1638. See Documentation/rust/ for more information.
  1639. If unsure, say N.
  1640. config RUSTC_VERSION_TEXT
  1641. string
  1642. depends on RUST
  1643. default "$(RUSTC_VERSION_TEXT)"
  1644. help
  1645. See `CC_VERSION_TEXT`.
  1646. config BINDGEN_VERSION_TEXT
  1647. string
  1648. depends on RUST
  1649. # The dummy parameter `workaround-for-0.69.0` is required to support 0.69.0
  1650. # (https://github.com/rust-lang/rust-bindgen/pull/2678). It can be removed when
  1651. # the minimum version is upgraded past that (0.69.1 already fixed the issue).
  1652. default "$(shell,$(BINDGEN) --version workaround-for-0.69.0 2>/dev/null)"
  1653. #
  1654. # Place an empty function call at each tracepoint site. Can be
  1655. # dynamically changed for a probe function.
  1656. #
  1657. config TRACEPOINTS
  1658. bool
  1659. source "kernel/Kconfig.kexec"
  1660. endmenu # General setup
  1661. source "arch/Kconfig"
  1662. config RT_MUTEXES
  1663. bool
  1664. default y if PREEMPT_RT
  1665. config MODULE_SIG_FORMAT
  1666. def_bool n
  1667. select SYSTEM_DATA_VERIFICATION
  1668. source "kernel/module/Kconfig"
  1669. config INIT_ALL_POSSIBLE
  1670. bool
  1671. help
  1672. Back when each arch used to define their own cpu_online_mask and
  1673. cpu_possible_mask, some of them chose to initialize cpu_possible_mask
  1674. with all 1s, and others with all 0s. When they were centralised,
  1675. it was better to provide this option than to break all the archs
  1676. and have several arch maintainers pursuing me down dark alleys.
  1677. source "block/Kconfig"
  1678. config PREEMPT_NOTIFIERS
  1679. bool
  1680. config PADATA
  1681. depends on SMP
  1682. bool
  1683. config ASN1
  1684. tristate
  1685. help
  1686. Build a simple ASN.1 grammar compiler that produces a bytecode output
  1687. that can be interpreted by the ASN.1 stream decoder and used to
  1688. inform it as to what tags are to be expected in a stream and what
  1689. functions to call on what tags.
  1690. source "kernel/Kconfig.locks"
  1691. config ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
  1692. bool
  1693. config ARCH_HAS_PREPARE_SYNC_CORE_CMD
  1694. bool
  1695. config ARCH_HAS_SYNC_CORE_BEFORE_USERMODE
  1696. bool
  1697. # It may be useful for an architecture to override the definitions of the
  1698. # SYSCALL_DEFINE() and __SYSCALL_DEFINEx() macros in <linux/syscalls.h>
  1699. # and the COMPAT_ variants in <linux/compat.h>, in particular to use a
  1700. # different calling convention for syscalls. They can also override the
  1701. # macros for not-implemented syscalls in kernel/sys_ni.c and
  1702. # kernel/time/posix-stubs.c. All these overrides need to be available in
  1703. # <asm/syscall_wrapper.h>.
  1704. config ARCH_HAS_SYSCALL_WRAPPER
  1705. def_bool n