Kconfig 65 KB

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