Config-kernel.in 51 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660
  1. # SPDX-License-Identifier: GPL-2.0-only
  2. #
  3. # Copyright (C) 2006-2014 OpenWrt.org
  4. config KERNEL_BUILD_USER
  5. string "Custom Kernel Build User Name"
  6. default "builder" if BUILDBOT
  7. default ""
  8. help
  9. Sets the Kernel build user string, which for example will be returned
  10. by 'uname -a' on running systems.
  11. If not set, uses system user at build time.
  12. config KERNEL_BUILD_DOMAIN
  13. string "Custom Kernel Build Domain Name"
  14. default "buildhost" if BUILDBOT
  15. default ""
  16. help
  17. Sets the Kernel build domain string, which for example will be
  18. returned by 'uname -a' on running systems.
  19. If not set, uses system hostname at build time.
  20. config KERNEL_PRINTK
  21. bool "Enable support for printk"
  22. default y
  23. config KERNEL_SWAP
  24. bool "Support for paging of anonymous memory (swap)"
  25. default y if !SMALL_FLASH
  26. config KERNEL_PROC_STRIPPED
  27. bool "Strip non-essential /proc functionality to reduce code size"
  28. default y if SMALL_FLASH
  29. config KERNEL_DEBUG_FS
  30. bool "Compile the kernel with debug filesystem enabled"
  31. default y
  32. help
  33. debugfs is a virtual file system that kernel developers use to put
  34. debugging files into. Enable this option to be able to read and
  35. write to these files. Many common debugging facilities, such as
  36. ftrace, require the existence of debugfs.
  37. config KERNEL_MIPS_FP_SUPPORT
  38. bool
  39. default y if TARGET_pistachio
  40. config KERNEL_ARM_PMU
  41. bool
  42. default y if TARGET_armsr_armv8
  43. depends on (arm || aarch64)
  44. config KERNEL_ARM_PMUV3
  45. bool
  46. default y if TARGET_armsr_armv8
  47. depends on (arm_v7 || aarch64)
  48. config KERNEL_RISCV_PMU
  49. bool
  50. select KERNEL_RISCV_PMU_SBI
  51. depends on riscv64
  52. config KERNEL_RISCV_PMU_SBI
  53. bool
  54. depends on riscv64
  55. config KERNEL_X86_VSYSCALL_EMULATION
  56. bool "Enable vsyscall emulation"
  57. depends on x86_64
  58. help
  59. This enables emulation of the legacy vsyscall page. Disabling
  60. it is roughly equivalent to booting with vsyscall=none, except
  61. that it will also disable the helpful warning if a program
  62. tries to use a vsyscall. With this option set to N, offending
  63. programs will just segfault, citing addresses of the form
  64. 0xffffffffff600?00.
  65. This option is required by many programs built before 2013, and
  66. care should be used even with newer programs if set to N.
  67. Disabling this option saves about 7K of kernel size and
  68. possibly 4K of additional runtime pagetable memory.
  69. config KERNEL_PERF_EVENTS
  70. bool "Compile the kernel with performance events and counters"
  71. select KERNEL_ARM_PMU if (arm || aarch64)
  72. select KERNEL_ARM_PMUV3 if (arm_v7 || aarch64)
  73. select KERNEL_RISCV_PMU if riscv64
  74. config KERNEL_PROFILING
  75. bool "Compile the kernel with profiling enabled"
  76. select KERNEL_PERF_EVENTS
  77. help
  78. Enable the extended profiling support mechanisms used by profilers such
  79. as OProfile.
  80. config KERNEL_RPI_AXIPERF
  81. bool "Compile the kernel with RaspberryPi AXI Performance monitors"
  82. default y
  83. depends on KERNEL_PERF_EVENTS && TARGET_bcm27xx
  84. config KERNEL_UBSAN
  85. bool "Compile the kernel with undefined behaviour sanity checker"
  86. help
  87. This option enables undefined behaviour sanity checker
  88. Compile-time instrumentation is used to detect various undefined
  89. behaviours in runtime. Various types of checks may be enabled
  90. via boot parameter ubsan_handle
  91. (see: Documentation/dev-tools/ubsan.rst).
  92. config KERNEL_UBSAN_SANITIZE_ALL
  93. bool "Enable instrumentation for the entire kernel"
  94. depends on KERNEL_UBSAN
  95. default y
  96. help
  97. This option activates instrumentation for the entire kernel.
  98. If you don't enable this option, you have to explicitly specify
  99. UBSAN_SANITIZE := y for the files/directories you want to check for UB.
  100. Enabling this option will get kernel image size increased
  101. significantly.
  102. config KERNEL_UBSAN_ALIGNMENT
  103. bool "Enable checking of pointers alignment"
  104. depends on KERNEL_UBSAN
  105. help
  106. This option enables detection of unaligned memory accesses.
  107. Enabling this option on architectures that support unaligned
  108. accesses may produce a lot of false positives.
  109. config KERNEL_UBSAN_BOUNDS
  110. bool "Perform array index bounds checking"
  111. depends on KERNEL_UBSAN
  112. help
  113. This option enables detection of directly indexed out of bounds array
  114. accesses, where the array size is known at compile time. Note that
  115. this does not protect array overflows via bad calls to the
  116. {str,mem}*cpy() family of functions (that is addressed by
  117. FORTIFY_SOURCE).
  118. config KERNEL_UBSAN_TRAP
  119. bool "On Sanitizer warnings, abort the running kernel code"
  120. depends on KERNEL_UBSAN
  121. help
  122. Building kernels with Sanitizer features enabled tends to grow the
  123. kernel size by around 5%, due to adding all the debugging text on
  124. failure paths. To avoid this, Sanitizer instrumentation can just
  125. issue a trap. This reduces the kernel size overhead but turns all
  126. warnings (including potentially harmless conditions) into full
  127. exceptions that abort the running kernel code (regardless of context,
  128. locks held, etc), which may destabilize the system. For some system
  129. builders this is an acceptable trade-off.
  130. config KERNEL_KASAN
  131. bool "Compile the kernel with KASan: runtime memory debugger"
  132. select KERNEL_SLUB_DEBUG
  133. depends on (x86_64 || aarch64 || arm || powerpc || riscv64)
  134. help
  135. Enables kernel address sanitizer - runtime memory debugger,
  136. designed to find out-of-bounds accesses and use-after-free bugs.
  137. This is strictly a debugging feature and it requires a gcc version
  138. of 4.9.2 or later. Detection of out of bounds accesses to stack or
  139. global variables requires gcc 5.0 or later.
  140. This feature consumes about 1/8 of available memory and brings about
  141. ~x3 performance slowdown.
  142. For better error detection enable CONFIG_STACKTRACE.
  143. Currently CONFIG_KASAN doesn't work with CONFIG_DEBUG_SLAB
  144. (the resulting kernel does not boot).
  145. config KERNEL_KASAN_VMALLOC
  146. bool "Back mappings in vmalloc space with real shadow memory"
  147. depends on KERNEL_KASAN
  148. help
  149. By default, the shadow region for vmalloc space is the read-only
  150. zero page. This means that KASAN cannot detect errors involving
  151. vmalloc space.
  152. Enabling this option will hook in to vmap/vmalloc and back those
  153. mappings with real shadow memory allocated on demand. This allows
  154. for KASAN to detect more sorts of errors (and to support vmapped
  155. stacks), but at the cost of higher memory usage.
  156. This option depends on HAVE_ARCH_KASAN_VMALLOC, but we can't
  157. depend on that in here, so it is possible that enabling this
  158. will have no effect.
  159. if KERNEL_KASAN
  160. choice
  161. prompt "KASAN mode"
  162. depends on KERNEL_KASAN
  163. default KERNEL_KASAN_GENERIC
  164. help
  165. KASAN has three modes:
  166. 1. Generic KASAN (supported by many architectures, enabled with
  167. CONFIG_KASAN_GENERIC, similar to userspace ASan),
  168. 2. Software Tag-Based KASAN (arm64 only, based on software memory
  169. tagging, enabled with CONFIG_KASAN_SW_TAGS, similar to userspace
  170. HWASan), and
  171. 3. Hardware Tag-Based KASAN (arm64 only, based on hardware memory
  172. tagging, enabled with CONFIG_KASAN_HW_TAGS).
  173. config KERNEL_KASAN_GENERIC
  174. bool "Generic KASAN"
  175. select KERNEL_SLUB_DEBUG
  176. help
  177. Enables Generic KASAN.
  178. Consumes about 1/8th of available memory at kernel start and adds an
  179. overhead of ~50% for dynamic allocations.
  180. The performance slowdown is ~x3.
  181. config KERNEL_KASAN_SW_TAGS
  182. bool "Software Tag-Based KASAN"
  183. depends on aarch64
  184. select KERNEL_SLUB_DEBUG
  185. help
  186. Enables Software Tag-Based KASAN.
  187. Supported only on arm64 CPUs and relies on Top Byte Ignore.
  188. Consumes about 1/16th of available memory at kernel start and
  189. add an overhead of ~20% for dynamic allocations.
  190. May potentially introduce problems related to pointer casting and
  191. comparison, as it embeds a tag into the top byte of each pointer.
  192. config KERNEL_KASAN_HW_TAGS
  193. bool "Hardware Tag-Based KASAN"
  194. depends on aarch64
  195. select KERNEL_SLUB_DEBUG
  196. select KERNEL_ARM64_MTE
  197. help
  198. Enables Hardware Tag-Based KASAN.
  199. Supported only on arm64 CPUs starting from ARMv8.5 and relies on
  200. Memory Tagging Extension and Top Byte Ignore.
  201. Consumes about 1/32nd of available memory.
  202. May potentially introduce problems related to pointer casting and
  203. comparison, as it embeds a tag into the top byte of each pointer.
  204. endchoice
  205. config KERNEL_ARM64_MTE
  206. def_bool n
  207. endif
  208. choice
  209. prompt "Instrumentation type"
  210. depends on KERNEL_KASAN
  211. depends on !KERNEL_KASAN_HW_TAGS
  212. default KERNEL_KASAN_OUTLINE
  213. config KERNEL_KASAN_OUTLINE
  214. bool "Outline instrumentation"
  215. help
  216. Before every memory access compiler insert function call
  217. __asan_load*/__asan_store*. These functions performs check
  218. of shadow memory. This is slower than inline instrumentation,
  219. however it doesn't bloat size of kernel's .text section so
  220. much as inline does.
  221. config KERNEL_KASAN_INLINE
  222. bool "Inline instrumentation"
  223. help
  224. Compiler directly inserts code checking shadow memory before
  225. memory accesses. This is faster than outline (in some workloads
  226. it gives about x2 boost over outline instrumentation), but
  227. make kernel's .text size much bigger.
  228. This requires a gcc version of 5.0 or later.
  229. endchoice
  230. config KERNEL_KCOV
  231. bool "Compile the kernel with code coverage for fuzzing"
  232. select KERNEL_DEBUG_FS
  233. help
  234. KCOV exposes kernel code coverage information in a form suitable
  235. for coverage-guided fuzzing (randomized testing).
  236. If RANDOMIZE_BASE is enabled, PC values will not be stable across
  237. different machines and across reboots. If you need stable PC values,
  238. disable RANDOMIZE_BASE.
  239. For more details, see Documentation/kcov.txt.
  240. config KERNEL_KCOV_ENABLE_COMPARISONS
  241. bool "Enable comparison operands collection by KCOV"
  242. depends on KERNEL_KCOV
  243. help
  244. KCOV also exposes operands of every comparison in the instrumented
  245. code along with operand sizes and PCs of the comparison instructions.
  246. These operands can be used by fuzzing engines to improve the quality
  247. of fuzzing coverage.
  248. config KERNEL_KCOV_INSTRUMENT_ALL
  249. bool "Instrument all code by default"
  250. depends on KERNEL_KCOV
  251. default y if KERNEL_KCOV
  252. help
  253. If you are doing generic system call fuzzing (like e.g. syzkaller),
  254. then you will want to instrument the whole kernel and you should
  255. say y here. If you are doing more targeted fuzzing (like e.g.
  256. filesystem fuzzing with AFL) then you will want to enable coverage
  257. for more specific subsets of files, and should say n here.
  258. config KERNEL_TASKSTATS
  259. bool "Compile the kernel with task resource/io statistics and accounting"
  260. help
  261. Enable the collection and publishing of task/io statistics and
  262. accounting. Enable this option to enable i/o monitoring in system
  263. monitors.
  264. if KERNEL_TASKSTATS
  265. config KERNEL_TASK_DELAY_ACCT
  266. def_bool y
  267. config KERNEL_TASK_IO_ACCOUNTING
  268. def_bool y
  269. config KERNEL_TASK_XACCT
  270. def_bool y
  271. endif
  272. config KERNEL_PSI
  273. bool "Compile the kernel with pressure stall information tracking"
  274. help
  275. Collect metrics that indicate how overcommitted the CPU, memory,
  276. and IO capacity are in the system.
  277. If you say Y here, the kernel will create /proc/pressure/ with the
  278. pressure statistics files cpu, memory, and io. These will indicate
  279. the share of walltime in which some or all tasks in the system are
  280. delayed due to contention of the respective resource.
  281. In kernels with cgroup support, cgroups (cgroup2 only) will
  282. have cpu.pressure, memory.pressure, and io.pressure files,
  283. which aggregate pressure stalls for the grouped tasks only.
  284. For more details see Documentation/accounting/psi.rst.
  285. Say N if unsure.
  286. config KERNEL_KALLSYMS
  287. bool "Compile the kernel with symbol table information"
  288. default y if !SMALL_FLASH
  289. help
  290. This will give you more information in stack traces from kernel oopses.
  291. config KERNEL_FTRACE
  292. bool "Compile the kernel with tracing support"
  293. depends on !TARGET_uml
  294. config KERNEL_FTRACE_SYSCALLS
  295. bool "Trace system calls"
  296. depends on KERNEL_FTRACE
  297. config KERNEL_ENABLE_DEFAULT_TRACERS
  298. bool "Trace process context switches and events"
  299. depends on KERNEL_FTRACE
  300. config KERNEL_FUNCTION_TRACER
  301. bool "Function tracer"
  302. depends on KERNEL_FTRACE
  303. config KERNEL_FUNCTION_GRAPH_TRACER
  304. bool "Function graph tracer"
  305. depends on KERNEL_FUNCTION_TRACER
  306. config KERNEL_DYNAMIC_FTRACE
  307. bool "Enable/disable function tracing dynamically"
  308. depends on KERNEL_FUNCTION_TRACER
  309. config KERNEL_FUNCTION_PROFILER
  310. bool "Function profiler"
  311. depends on KERNEL_FUNCTION_TRACER
  312. config KERNEL_IRQSOFF_TRACER
  313. bool "Interrupts-off Latency Tracer"
  314. depends on KERNEL_FTRACE
  315. help
  316. This option measures the time spent in irqs-off critical
  317. sections, with microsecond accuracy.
  318. The default measurement method is a maximum search, which is
  319. disabled by default and can be runtime (re-)started
  320. via:
  321. echo 0 > /sys/kernel/debug/tracing/tracing_max_latency
  322. (Note that kernel size and overhead increase with this option
  323. enabled. This option and the preempt-off timing option can be
  324. used together or separately.)
  325. config KERNEL_PREEMPT_TRACER
  326. bool "Preemption-off Latency Tracer"
  327. depends on KERNEL_FTRACE
  328. help
  329. This option measures the time spent in preemption-off critical
  330. sections, with microsecond accuracy.
  331. The default measurement method is a maximum search, which is
  332. disabled by default and can be runtime (re-)started
  333. via:
  334. echo 0 > /sys/kernel/debug/tracing/tracing_max_latency
  335. (Note that kernel size and overhead increase with this option
  336. enabled. This option and the irqs-off timing option can be
  337. used together or separately.)
  338. config KERNEL_HWLAT_TRACER
  339. bool "Tracer to detect hardware latencies (like SMIs)"
  340. depends on KERNEL_FTRACE
  341. help
  342. This tracer, when enabled will create one or more kernel threads,
  343. depending on what the cpumask file is set to, which each thread
  344. spinning in a loop looking for interruptions caused by
  345. something other than the kernel. For example, if a
  346. System Management Interrupt (SMI) takes a noticeable amount of
  347. time, this tracer will detect it. This is useful for testing
  348. if a system is reliable for Real Time tasks.
  349. Some files are created in the tracing directory when this
  350. is enabled:
  351. hwlat_detector/width - time in usecs for how long to spin for
  352. hwlat_detector/window - time in usecs between the start of each
  353. iteration
  354. A kernel thread is created that will spin with interrupts disabled
  355. for "width" microseconds in every "window" cycle. It will not spin
  356. for "window - width" microseconds, where the system can
  357. continue to operate.
  358. The output will appear in the trace and trace_pipe files.
  359. When the tracer is not running, it has no affect on the system,
  360. but when it is running, it can cause the system to be
  361. periodically non responsive. Do not run this tracer on a
  362. production system.
  363. To enable this tracer, echo in "hwlat" into the current_tracer
  364. file. Every time a latency is greater than tracing_thresh, it will
  365. be recorded into the ring buffer.
  366. config KERNEL_OSNOISE_TRACER
  367. bool "OS Noise tracer"
  368. depends on KERNEL_FTRACE
  369. help
  370. In the context of high-performance computing (HPC), the Operating
  371. System Noise (osnoise) refers to the interference experienced by an
  372. application due to activities inside the operating system. In the
  373. context of Linux, NMIs, IRQs, SoftIRQs, and any other system thread
  374. can cause noise to the system. Moreover, hardware-related jobs can
  375. also cause noise, for example, via SMIs.
  376. The osnoise tracer leverages the hwlat_detector by running a similar
  377. loop with preemption, SoftIRQs and IRQs enabled, thus allowing all
  378. the sources of osnoise during its execution. The osnoise tracer takes
  379. note of the entry and exit point of any source of interferences,
  380. increasing a per-cpu interference counter. It saves an interference
  381. counter for each source of interference. The interference counter for
  382. NMI, IRQs, SoftIRQs, and threads is increased anytime the tool
  383. observes these interferences' entry events. When a noise happens
  384. without any interference from the operating system level, the
  385. hardware noise counter increases, pointing to a hardware-related
  386. noise. In this way, osnoise can account for any source of
  387. interference. At the end of the period, the osnoise tracer prints
  388. the sum of all noise, the max single noise, the percentage of CPU
  389. available for the thread, and the counters for the noise sources.
  390. In addition to the tracer, a set of tracepoints were added to
  391. facilitate the identification of the osnoise source.
  392. The output will appear in the trace and trace_pipe files.
  393. To enable this tracer, echo in "osnoise" into the current_tracer
  394. file.
  395. config KERNEL_TIMERLAT_TRACER
  396. bool "Timerlat tracer"
  397. depends on KERNEL_FTRACE
  398. help
  399. The timerlat tracer aims to help the preemptive kernel developers
  400. to find sources of wakeup latencies of real-time threads.
  401. The tracer creates a per-cpu kernel thread with real-time priority.
  402. The tracer thread sets a periodic timer to wakeup itself, and goes
  403. to sleep waiting for the timer to fire. At the wakeup, the thread
  404. then computes a wakeup latency value as the difference between
  405. the current time and the absolute time that the timer was set
  406. to expire.
  407. The tracer prints two lines at every activation. The first is the
  408. timer latency observed at the hardirq context before the
  409. activation of the thread. The second is the timer latency observed
  410. by the thread, which is the same level that cyclictest reports. The
  411. ACTIVATION ID field serves to relate the irq execution to its
  412. respective thread execution.
  413. The tracer is build on top of osnoise tracer, and the osnoise:
  414. events can be used to trace the source of interference from NMI,
  415. IRQs and other threads. It also enables the capture of the
  416. stacktrace at the IRQ context, which helps to identify the code
  417. path that can cause thread delay.
  418. config KERNEL_HIST_TRIGGERS
  419. bool "Histogram triggers"
  420. depends on KERNEL_FTRACE
  421. help
  422. Hist triggers allow one or more arbitrary trace event fields to be
  423. aggregated into hash tables and dumped to stdout by reading a
  424. debugfs/tracefs file. They're useful for gathering quick and dirty
  425. (though precise) summaries of event activity as an initial guide for
  426. further investigation using more advanced tools.
  427. Inter-event tracing of quantities such as latencies is also
  428. supported using hist triggers under this option.
  429. config KERNEL_DEBUG_KERNEL
  430. bool
  431. config KERNEL_DEBUG_INFO
  432. bool "Compile the kernel with debug information"
  433. default y if !SMALL_FLASH
  434. select KERNEL_DEBUG_KERNEL
  435. help
  436. This will compile your kernel and modules with debug information.
  437. config KERNEL_DEBUG_INFO_BTF
  438. bool "Enable additional BTF type information"
  439. depends on !HOST_OS_MACOS
  440. depends on KERNEL_DEBUG_INFO && !KERNEL_DEBUG_INFO_REDUCED
  441. select DWARVES
  442. help
  443. Generate BPF Type Format (BTF) information from DWARF debug info.
  444. Turning this on expects presence of pahole tool, which will convert
  445. DWARF type info into equivalent deduplicated BTF type info.
  446. Required to run BPF CO-RE applications.
  447. config KERNEL_DEBUG_INFO_BTF_MODULES
  448. def_bool y
  449. depends on KERNEL_DEBUG_INFO_BTF
  450. config KERNEL_MODULE_ALLOW_BTF_MISMATCH
  451. bool "Allow loading modules with non-matching BTF type info"
  452. depends on KERNEL_DEBUG_INFO_BTF_MODULES
  453. help
  454. For modules whose split BTF does not match vmlinux, load without
  455. BTF rather than refusing to load. The default behavior with
  456. module BTF enabled is to reject modules with such mismatches;
  457. this option will still load module BTF where possible but ignore
  458. it when a mismatch is found.
  459. config KERNEL_DEBUG_INFO_REDUCED
  460. bool "Reduce debugging information"
  461. default y
  462. depends on KERNEL_DEBUG_INFO
  463. help
  464. If you say Y here gcc is instructed to generate less debugging
  465. information for structure types. This means that tools that
  466. need full debugging information (like kgdb or systemtap) won't
  467. be happy. But if you merely need debugging information to
  468. resolve line numbers there is no loss. Advantage is that
  469. build directory object sizes shrink dramatically over a full
  470. DEBUG_INFO build and compile times are reduced too.
  471. Only works with newer gcc versions.
  472. config KERNEL_FRAME_WARN
  473. int
  474. range 0 8192
  475. default 1280 if KERNEL_KASAN && !ARCH_64BIT
  476. default 1024 if !ARCH_64BIT
  477. default 2048 if ARCH_64BIT
  478. help
  479. Tell the compiler to warn at build time for stack frames larger than this.
  480. Setting this too low will cause a lot of warnings.
  481. Setting it to 0 disables the warning.
  482. # KERNEL_DEBUG_LL symbols must have the default value set as otherwise
  483. # KConfig wont evaluate them unless KERNEL_EARLY_PRINTK is selected
  484. # which means that buildroot wont override the DEBUG_LL symbols in target
  485. # kernel configurations and lead to devices that dont have working console
  486. config KERNEL_DEBUG_LL
  487. bool
  488. default n
  489. depends on arm
  490. help
  491. ARM low level debugging.
  492. config KERNEL_DEBUG_VIRTUAL
  493. bool "Compile the kernel with VM translations debugging"
  494. select KERNEL_DEBUG_KERNEL
  495. help
  496. Enable checks sanity checks to catch invalid uses of
  497. virt_to_phys()/phys_to_virt() against the non-linear address space.
  498. config KERNEL_DYNAMIC_DEBUG
  499. bool "Compile the kernel with dynamic printk"
  500. select KERNEL_DEBUG_FS
  501. help
  502. Compiles debug level messages into the kernel, which would not
  503. otherwise be available at runtime. These messages can then be
  504. enabled/disabled based on various levels of scope - per source file,
  505. function, module, format string, and line number. This mechanism
  506. implicitly compiles in all pr_debug() and dev_dbg() calls, which
  507. enlarges the kernel text size by about 2%.
  508. config KERNEL_EARLY_PRINTK
  509. bool "Compile the kernel with early printk"
  510. default y if TARGET_bcm53xx
  511. depends on arm
  512. select KERNEL_DEBUG_KERNEL
  513. select KERNEL_DEBUG_LL if arm
  514. help
  515. Compile the kernel with early printk support. This is only useful for
  516. debugging purposes to send messages over the serial console in early boot.
  517. Enable this to debug early boot problems.
  518. config KERNEL_KPROBES
  519. bool "Compile the kernel with kprobes support"
  520. select KERNEL_FTRACE
  521. select KERNEL_PERF_EVENTS
  522. help
  523. Compiles the kernel with KPROBES support, which allows you to trap
  524. at almost any kernel address and execute a callback function.
  525. register_kprobe() establishes a probepoint and specifies the
  526. callback. Kprobes is useful for kernel debugging, non-intrusive
  527. instrumentation and testing.
  528. If in doubt, say "N".
  529. config KERNEL_KPROBE_EVENTS
  530. bool
  531. default y if KERNEL_KPROBES
  532. config KERNEL_BPF_EVENTS
  533. bool "Compile the kernel with BPF event support"
  534. select KERNEL_KPROBES
  535. help
  536. Allows to attach BPF programs to kprobe, uprobe and tracepoint events.
  537. This is required to use BPF maps of type BPF_MAP_TYPE_PERF_EVENT_ARRAY
  538. for sending data from BPF programs to user-space for post-processing
  539. or logging.
  540. config KERNEL_PROBE_EVENTS_BTF_ARGS
  541. bool "Support BTF function arguments for probe events"
  542. depends on KERNEL_DEBUG_INFO_BTF && KERNEL_KPROBE_EVENTS
  543. config KERNEL_BPF_KPROBE_OVERRIDE
  544. bool
  545. depends on KERNEL_KPROBES
  546. default n
  547. config KERNEL_AIO
  548. bool "Compile the kernel with asynchronous IO support"
  549. default y if !SMALL_FLASH
  550. config KERNEL_IO_URING
  551. bool "Compile the kernel with io_uring support"
  552. depends on !SMALL_FLASH
  553. default y if (x86_64 || aarch64)
  554. config KERNEL_FHANDLE
  555. bool "Compile the kernel with support for fhandle syscalls"
  556. default y if !SMALL_FLASH
  557. config KERNEL_FANOTIFY
  558. bool "Compile the kernel with modern file notification support"
  559. default y if !SMALL_FLASH
  560. config KERNEL_BLK_DEV_BSG
  561. bool "Compile the kernel with SCSI generic v4 support for any block device"
  562. config KERNEL_TRANSPARENT_HUGEPAGE
  563. bool
  564. choice
  565. prompt "Transparent Hugepage Support sysfs defaults"
  566. depends on KERNEL_TRANSPARENT_HUGEPAGE
  567. default KERNEL_TRANSPARENT_HUGEPAGE_ALWAYS
  568. config KERNEL_TRANSPARENT_HUGEPAGE_ALWAYS
  569. bool "always"
  570. config KERNEL_TRANSPARENT_HUGEPAGE_MADVISE
  571. bool "madvise"
  572. config KERNEL_TRANSPARENT_HUGEPAGE_NEVER
  573. bool "never"
  574. endchoice
  575. config KERNEL_ARM64_CONTPTE
  576. bool "Compile the kernel with Contiguous PTE mappings for user memory"
  577. depends on aarch64
  578. depends on KERNEL_TRANSPARENT_HUGEPAGE
  579. default y
  580. config KERNEL_HUGETLBFS
  581. bool
  582. config KERNEL_HUGETLB_PAGE
  583. bool "Compile the kernel with HugeTLB support"
  584. select KERNEL_TRANSPARENT_HUGEPAGE
  585. select KERNEL_HUGETLBFS
  586. config KERNEL_MAGIC_SYSRQ
  587. bool "Compile the kernel with SysRq support"
  588. default y
  589. config KERNEL_DEBUG_PINCTRL
  590. bool "Compile the kernel with pinctrl debugging"
  591. select KERNEL_DEBUG_KERNEL
  592. config KERNEL_DEBUG_GPIO
  593. bool "Compile the kernel with gpio debugging"
  594. select KERNEL_DEBUG_KERNEL
  595. config KERNEL_COREDUMP
  596. bool
  597. config KERNEL_ELF_CORE
  598. bool "Enable process core dump support"
  599. select KERNEL_COREDUMP
  600. default y if !SMALL_FLASH
  601. config KERNEL_PROVE_LOCKING
  602. bool "Enable kernel lock checking"
  603. select KERNEL_DEBUG_KERNEL
  604. config KERNEL_SOFTLOCKUP_DETECTOR
  605. bool "Compile the kernel with detect Soft Lockups"
  606. depends on KERNEL_DEBUG_KERNEL
  607. help
  608. Say Y here to enable the kernel to act as a watchdog to detect
  609. soft lockups.
  610. Softlockups are bugs that cause the kernel to loop in kernel
  611. mode for more than 20 seconds, without giving other tasks a
  612. chance to run. The current stack trace is displayed upon
  613. detection and the system will stay locked up.
  614. config KERNEL_HARDLOCKUP_DETECTOR
  615. bool "Compile the kernel with detect Hard Lockups"
  616. depends on KERNEL_DEBUG_KERNEL
  617. help
  618. Say Y here to enable the kernel to act as a watchdog to detect
  619. hard lockups.
  620. Hardlockups are bugs that cause the CPU to loop in kernel mode
  621. for more than 10 seconds, without letting other interrupts have a
  622. chance to run. The current stack trace is displayed upon detection
  623. and the system will stay locked up.
  624. config KERNEL_DETECT_HUNG_TASK
  625. bool "Compile the kernel with detect Hung Tasks"
  626. depends on KERNEL_DEBUG_KERNEL
  627. default KERNEL_SOFTLOCKUP_DETECTOR
  628. help
  629. Say Y here to enable the kernel to detect "hung tasks",
  630. which are bugs that cause the task to be stuck in
  631. uninterruptible "D" state indefinitely.
  632. When a hung task is detected, the kernel will print the
  633. current stack trace (which you should report), but the
  634. task will stay in uninterruptible state. If lockdep is
  635. enabled then all held locks will also be reported. This
  636. feature has negligible overhead.
  637. config KERNEL_WQ_WATCHDOG
  638. bool "Compile the kernel with detect Workqueue Stalls"
  639. depends on KERNEL_DEBUG_KERNEL
  640. help
  641. Say Y here to enable stall detection on workqueues. If a
  642. worker pool doesn't make forward progress on a pending work
  643. item for over a given amount of time, 30s by default, a
  644. warning message is printed along with dump of workqueue
  645. state. This can be configured through kernel parameter
  646. "workqueue.watchdog_thresh" and its sysfs counterpart.
  647. config KERNEL_DEBUG_ATOMIC_SLEEP
  648. bool "Compile the kernel with sleep inside atomic section checking"
  649. depends on KERNEL_DEBUG_KERNEL
  650. help
  651. If you say Y here, various routines which may sleep will become very
  652. noisy if they are called inside atomic sections: when a spinlock is
  653. held, inside an rcu read side critical section, inside preempt disabled
  654. sections, inside an interrupt, etc...
  655. config KERNEL_DEBUG_VM
  656. bool "Compile the kernel with debug VM"
  657. depends on KERNEL_DEBUG_KERNEL
  658. help
  659. Enable this to turn on extended checks in the virtual-memory system
  660. that may impact performance.
  661. If unsure, say N.
  662. config KERNEL_PRINTK_TIME
  663. bool "Enable printk timestamps"
  664. default y
  665. config KERNEL_SLUB_DEBUG
  666. bool "Enable SLUB debugging support"
  667. help
  668. This enables various debugging features:
  669. - Accepts "slub_debug" kernel parameter
  670. - Provides caches debugging options (e.g. tracing, validating)
  671. - Adds /sys/kernel/slab/ attrs for reading amounts of *objects*
  672. - Enables /proc/slabinfo support
  673. - Prints info when running out of memory
  674. Enabling this can result in a significant increase of code size.
  675. config KERNEL_SLUB_DEBUG_ON
  676. depends on KERNEL_SLUB_DEBUG
  677. bool "Boot kernel with basic caches debugging enabled"
  678. help
  679. This enables by default sanity_checks, red_zone, poison and store_user
  680. debugging options for all caches.
  681. config KERNEL_STACKDEPOT_MAX_FRAMES
  682. int
  683. default 64
  684. depends on KERNEL_SLUB_DEBUG
  685. config KERNEL_PROC_PAGE_MONITOR
  686. bool "Enable /proc page monitoring"
  687. config KERNEL_RELAY
  688. bool
  689. config KERNEL_KEXEC
  690. bool "Enable kexec support"
  691. config KERNEL_PROC_VMCORE
  692. bool
  693. config KERNEL_PROC_KCORE
  694. bool
  695. config KERNEL_CRASH_DUMP
  696. depends on i386 || x86_64 || arm || armeb
  697. select KERNEL_KEXEC
  698. select KERNEL_PROC_VMCORE
  699. select KERNEL_PROC_KCORE
  700. bool "Enable support for kexec crashdump"
  701. default y
  702. config USE_RFKILL
  703. bool "Enable rfkill support"
  704. default RFKILL_SUPPORT
  705. config USE_SPARSE
  706. bool "Enable sparse check during kernel build"
  707. config KERNEL_DEVTMPFS
  708. bool "Compile the kernel with device tmpfs enabled"
  709. help
  710. devtmpfs is a simple, kernel-managed /dev filesystem. The kernel creates
  711. devices nodes for all registered devices to simplify boot, but leaves more
  712. complex tasks to userspace (e.g. udev).
  713. if KERNEL_DEVTMPFS
  714. config KERNEL_DEVTMPFS_MOUNT
  715. bool "Automatically mount devtmpfs after root filesystem is mounted"
  716. endif
  717. config KERNEL_KEYS
  718. bool "Enable kernel access key retention support"
  719. default !SMALL_FLASH
  720. config KERNEL_PERSISTENT_KEYRINGS
  721. bool "Enable kernel persistent keyrings"
  722. depends on KERNEL_KEYS
  723. config KERNEL_KEYS_REQUEST_CACHE
  724. bool "Enable temporary caching of the last request_key() result"
  725. depends on KERNEL_KEYS
  726. config KERNEL_BIG_KEYS
  727. bool "Enable large payload keys on kernel keyrings"
  728. depends on KERNEL_KEYS
  729. #
  730. # CGROUP support symbols
  731. #
  732. config KERNEL_CGROUPS
  733. bool "Enable kernel cgroups"
  734. default y if !SMALL_FLASH
  735. if KERNEL_CGROUPS
  736. config KERNEL_CGROUP_DEBUG
  737. bool "Example debug cgroup subsystem"
  738. help
  739. This option enables a simple cgroup subsystem that
  740. exports useful debugging information about the cgroups
  741. framework.
  742. config KERNEL_FREEZER
  743. bool
  744. config KERNEL_CGROUP_FREEZER
  745. bool "legacy Freezer cgroup subsystem"
  746. select KERNEL_FREEZER
  747. help
  748. Provides a way to freeze and unfreeze all tasks in a
  749. cgroup.
  750. (legacy cgroup1-only controller, in cgroup2 freezer
  751. is integrated in the Memory controller)
  752. config KERNEL_CGROUP_DEVICE
  753. bool "legacy Device controller for cgroups"
  754. help
  755. Provides a cgroup implementing whitelists for devices which
  756. a process in the cgroup can mknod or open.
  757. (legacy cgroup1-only controller)
  758. config KERNEL_CGROUP_HUGETLB
  759. bool "HugeTLB controller"
  760. select KERNEL_HUGETLB_PAGE
  761. config KERNEL_CGROUP_PIDS
  762. bool "PIDs cgroup subsystem"
  763. default y
  764. help
  765. Provides enforcement of process number limits in the scope of a
  766. cgroup.
  767. config KERNEL_CGROUP_RDMA
  768. bool "RDMA controller for cgroups"
  769. default y
  770. config KERNEL_CGROUP_BPF
  771. bool "Support for eBPF programs attached to cgroups"
  772. default y
  773. config KERNEL_CPUSETS
  774. bool "Cpuset support"
  775. default y
  776. help
  777. This option will let you create and manage CPUSETs which
  778. allow dynamically partitioning a system into sets of CPUs and
  779. Memory Nodes and assigning tasks to run only within those sets.
  780. This is primarily useful on large SMP or NUMA systems.
  781. config KERNEL_CPUSETS_V1
  782. bool "Legacy cgroup v1 cpusets controller"
  783. depends on KERNEL_CPUSETS
  784. default n
  785. help
  786. Legacy cgroup v1 cpusets controller which has been deprecated by
  787. cgroup v2 implementation. The v1 is there for legacy applications
  788. which haven't migrated to the new cgroup v2 interface yet. If you
  789. do not have any such application then you are completely fine leaving
  790. this option disabled.
  791. config KERNEL_PROC_PID_CPUSET
  792. bool "Include legacy /proc/<pid>/cpuset file"
  793. depends on KERNEL_CPUSETS
  794. config KERNEL_CGROUP_CPUACCT
  795. bool "Simple CPU accounting cgroup subsystem"
  796. default y
  797. help
  798. Provides a simple Resource Controller for monitoring the
  799. total CPU consumed by the tasks in a cgroup.
  800. config KERNEL_MEMCG
  801. bool "Memory Resource Controller for Control Groups"
  802. default y
  803. select KERNEL_FREEZER
  804. help
  805. Provides a memory resource controller that manages both anonymous
  806. memory and page cache. (See Documentation/cgroups/memory.txt)
  807. Note that setting this option increases fixed memory overhead
  808. associated with each page of memory in the system. By this,
  809. 20(40)bytes/PAGE_SIZE on 32(64)bit system will be occupied by memory
  810. usage tracking struct at boot. Total amount of this is printed out
  811. at boot.
  812. Only enable when you're ok with these tradeoffs and really
  813. sure you need the memory resource controller. Even when you enable
  814. this, you can set "cgroup_disable=memory" at your boot option to
  815. disable memory resource controller and you can avoid overheads
  816. (but lose benefits of memory resource controller).
  817. This config option also selects MM_OWNER config option, which
  818. could in turn add some fork/exit overhead.
  819. config KERNEL_MEMCG_KMEM
  820. bool "Memory Resource Controller Kernel Memory accounting (EXPERIMENTAL)"
  821. default y
  822. depends on KERNEL_MEMCG
  823. help
  824. The Kernel Memory extension for Memory Resource Controller can limit
  825. the amount of memory used by kernel objects in the system. Those are
  826. fundamentally different from the entities handled by the standard
  827. Memory Controller, which are page-based, and can be swapped. Users of
  828. the kmem extension can use it to guarantee that no group of processes
  829. will ever exhaust kernel resources alone.
  830. config KERNEL_MEMCG_V1
  831. bool "Legacy cgroup v1 memory controller"
  832. default n
  833. depends on KERNEL_MEMCG
  834. help
  835. Legacy cgroup v1 memory controller which has been deprecated by
  836. cgroup v2 implementation. The v1 is there for legacy applications
  837. which haven't migrated to the new cgroup v2 interface yet. If you
  838. do not have any such application then you are completely fine leaving
  839. this option disabled.
  840. Please note that feature set of the legacy memory controller is likely
  841. going to shrink due to deprecation process. New deployments with v1
  842. controller are highly discouraged.
  843. config KERNEL_CGROUP_PERF
  844. bool "Enable perf_event per-cpu per-container group (cgroup) monitoring"
  845. select KERNEL_PERF_EVENTS
  846. help
  847. This option extends the per-cpu mode to restrict monitoring to
  848. threads which belong to the cgroup specified and run on the
  849. designated cpu.
  850. menuconfig KERNEL_CGROUP_SCHED
  851. bool "Group CPU scheduler"
  852. default y
  853. help
  854. This feature lets CPU scheduler recognize task groups and control CPU
  855. bandwidth allocation to such task groups. It uses cgroups to group
  856. tasks.
  857. if KERNEL_CGROUP_SCHED
  858. config KERNEL_FAIR_GROUP_SCHED
  859. bool "Group scheduling for SCHED_OTHER"
  860. default y
  861. config KERNEL_CFS_BANDWIDTH
  862. bool "CPU bandwidth provisioning for FAIR_GROUP_SCHED"
  863. default y
  864. depends on KERNEL_FAIR_GROUP_SCHED
  865. help
  866. This option allows users to define CPU bandwidth rates (limits) for
  867. tasks running within the fair group scheduler. Groups with no limit
  868. set are considered to be unconstrained and will run with no
  869. restriction.
  870. See tip/Documentation/scheduler/sched-bwc.txt for more information.
  871. config KERNEL_RT_GROUP_SCHED
  872. bool "Group scheduling for SCHED_RR/FIFO"
  873. default y
  874. help
  875. This feature lets you explicitly allocate real CPU bandwidth
  876. to task groups. If enabled, it will also make it impossible to
  877. schedule realtime tasks for non-root users until you allocate
  878. realtime bandwidth for them.
  879. endif
  880. config KERNEL_BLK_CGROUP
  881. bool "Block IO controller"
  882. default y
  883. help
  884. Generic block IO controller cgroup interface. This is the common
  885. cgroup interface which should be used by various IO controlling
  886. policies.
  887. Currently, CFQ IO scheduler uses it to recognize task groups and
  888. control disk bandwidth allocation (proportional time slice allocation)
  889. to such task groups. It is also used by bio throttling logic in
  890. block layer to implement upper limit in IO rates on a device.
  891. This option only enables generic Block IO controller infrastructure.
  892. One needs to also enable actual IO controlling logic/policy. For
  893. enabling proportional weight division of disk bandwidth in CFQ, set
  894. CONFIG_CFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
  895. CONFIG_BLK_DEV_THROTTLING=y.
  896. if KERNEL_BLK_CGROUP
  897. config KERNEL_CFQ_GROUP_IOSCHED
  898. bool "Proportional weight of disk bandwidth in CFQ"
  899. config KERNEL_BLK_DEV_THROTTLING
  900. bool "Enable throttling policy"
  901. default y
  902. config KERNEL_BLK_DEV_THROTTLING_LOW
  903. bool "Block throttling .low limit interface support (EXPERIMENTAL)"
  904. depends on KERNEL_BLK_DEV_THROTTLING
  905. endif
  906. config KERNEL_DEBUG_BLK_CGROUP
  907. bool "Enable Block IO controller debugging"
  908. depends on KERNEL_BLK_CGROUP
  909. help
  910. Enable some debugging help. Currently it exports additional stat
  911. files in a cgroup which can be useful for debugging.
  912. config KERNEL_NET_CLS_CGROUP
  913. bool "legacy Control Group Classifier"
  914. config KERNEL_CGROUP_NET_CLASSID
  915. bool "legacy Network classid cgroup"
  916. config KERNEL_CGROUP_NET_PRIO
  917. bool "legacy Network priority cgroup"
  918. endif
  919. #
  920. # Namespace support symbols
  921. #
  922. config KERNEL_NAMESPACES
  923. bool "Enable kernel namespaces"
  924. default y if !SMALL_FLASH
  925. if KERNEL_NAMESPACES
  926. config KERNEL_UTS_NS
  927. bool "UTS namespace"
  928. default y
  929. help
  930. In this namespace, tasks see different info provided
  931. with the uname() system call.
  932. config KERNEL_IPC_NS
  933. bool "IPC namespace"
  934. default y
  935. help
  936. In this namespace, tasks work with IPC ids which correspond to
  937. different IPC objects in different namespaces.
  938. config KERNEL_USER_NS
  939. bool "User namespace (EXPERIMENTAL)"
  940. default y
  941. help
  942. This allows containers, i.e. vservers, to use user namespaces
  943. to provide different user info for different servers.
  944. config KERNEL_PID_NS
  945. bool "PID Namespaces"
  946. default y
  947. help
  948. Support process id namespaces. This allows having multiple
  949. processes with the same pid as long as they are in different
  950. pid namespaces. This is a building block of containers.
  951. config KERNEL_NET_NS
  952. bool "Network namespace"
  953. default y
  954. help
  955. Allow user space to create what appear to be multiple instances
  956. of the network stack.
  957. endif
  958. config KERNEL_POSIX_MQUEUE
  959. bool "POSIX Message Queues"
  960. default y if !SMALL_FLASH
  961. help
  962. POSIX variant of message queues is a part of IPC. In POSIX message
  963. queues every message has a priority which decides about succession
  964. of receiving it by a process. If you want to compile and run
  965. programs written e.g. for Solaris with use of its POSIX message
  966. queues (functions mq_*) say Y here.
  967. POSIX message queues are visible as a filesystem called 'mqueue'
  968. and can be mounted somewhere if you want to do filesystem
  969. operations on message queues.
  970. config KERNEL_SECCOMP_FILTER
  971. bool
  972. default y if !SMALL_FLASH
  973. config KERNEL_SECCOMP
  974. bool "Enable seccomp support"
  975. depends on !(TARGET_uml)
  976. select KERNEL_SECCOMP_FILTER
  977. default y if !SMALL_FLASH
  978. help
  979. Build kernel with support for seccomp.
  980. #
  981. # IPv4 configuration
  982. #
  983. config KERNEL_IP_MROUTE
  984. bool "Enable IPv4 multicast routing"
  985. default y
  986. help
  987. Multicast routing requires a multicast routing daemon in
  988. addition to kernel support.
  989. if KERNEL_IP_MROUTE
  990. config KERNEL_IP_MROUTE_MULTIPLE_TABLES
  991. def_bool y
  992. config KERNEL_IP_PIMSM_V1
  993. def_bool y
  994. config KERNEL_IP_PIMSM_V2
  995. def_bool y
  996. endif
  997. #
  998. # IPv6 configuration
  999. #
  1000. config KERNEL_IPV6
  1001. def_bool IPV6
  1002. if KERNEL_IPV6
  1003. config KERNEL_IPV6_MULTIPLE_TABLES
  1004. def_bool y
  1005. config KERNEL_IPV6_SUBTREES
  1006. def_bool y
  1007. config KERNEL_IPV6_MROUTE
  1008. bool "Enable IPv6 multicast routing"
  1009. default y
  1010. help
  1011. Multicast routing requires a multicast routing daemon in
  1012. addition to kernel support.
  1013. if KERNEL_IPV6_MROUTE
  1014. config KERNEL_IPV6_MROUTE_MULTIPLE_TABLES
  1015. def_bool y
  1016. config KERNEL_IPV6_PIMSM_V2
  1017. def_bool y
  1018. endif
  1019. config KERNEL_IPV6_SEG6_LWTUNNEL
  1020. bool "Enable support for lightweight tunnels"
  1021. default y if !SMALL_FLASH
  1022. help
  1023. Using lwtunnel (needed for IPv6 segment routing) requires ip-full package.
  1024. config KERNEL_LWTUNNEL_BPF
  1025. def_bool n
  1026. endif
  1027. #
  1028. # Miscellaneous network configuration
  1029. #
  1030. config KERNEL_NET_L3_MASTER_DEV
  1031. bool "L3 Master device support"
  1032. default y if !SMALL_FLASH
  1033. help
  1034. This module provides glue between core networking code and device
  1035. drivers to support L3 master devices like VRF.
  1036. Increases the compressed kernel size by ~4kB (as of Linux 6.6).
  1037. config KERNEL_DCB
  1038. bool "Data Center Bridging support"
  1039. default y if TARGET_armsr_armv8
  1040. default y if TARGET_microchipsw
  1041. default y if TARGET_x86_64
  1042. help
  1043. This enables support for configuring Data Center Bridging (DCB)
  1044. features on DCB capable Ethernet adapters via rtnetlink. Say 'Y'
  1045. if you have a DCB capable Ethernet adapter which supports this
  1046. interface and you are connected to a DCB capable switch.
  1047. DCB is a collection of Ethernet enhancements which allow DCB capable
  1048. NICs and switches to support network traffic with differing
  1049. requirements (highly reliable, no drops vs. best effort vs. low
  1050. latency) to co-exist on Ethernet.
  1051. DCB features include:
  1052. Enhanced Transmission Selection (aka Priority Grouping) - provides a
  1053. framework for assigning bandwidth guarantees to traffic classes.
  1054. Priority-based Flow Control (PFC) - a MAC control pause frame which
  1055. works at the granularity of the 802.1p priority instead of the
  1056. link (802.3x).
  1057. config KERNEL_XDP_SOCKETS
  1058. bool "XDP sockets support"
  1059. help
  1060. XDP sockets allows a channel between XDP programs and
  1061. userspace applications.
  1062. config KERNEL_PAGE_POOL
  1063. def_bool n
  1064. config KERNEL_PAGE_POOL_STATS
  1065. bool "Page pool stats support"
  1066. depends on KERNEL_PAGE_POOL
  1067. config KERNEL_MPTCP
  1068. bool "Multi-Path TCP support"
  1069. default y if !SMALL_FLASH
  1070. help
  1071. Select this option to enable support for Multi-Path TCP.
  1072. Increases the compressed kernel size by ~214kB (as of Linux 6.6).
  1073. if KERNEL_IPV6
  1074. config KERNEL_MPTCP_IPV6
  1075. bool "IPv6 support for Multipath TCP"
  1076. depends on KERNEL_MPTCP
  1077. default KERNEL_MPTCP
  1078. endif
  1079. config KERNEL_NF_CONNTRACK_TIMEOUT
  1080. bool "Per-connection connection tracking timeout"
  1081. default y if !SMALL_FLASH
  1082. help
  1083. Select this option to enable support for per-connection conntrack timeouts.
  1084. Increases the (uncompressed) size of nf_conntrack.ko by ~8kB.
  1085. #
  1086. # NFS related symbols
  1087. #
  1088. config KERNEL_IP_PNP
  1089. bool "Compile the kernel with rootfs on NFS"
  1090. help
  1091. If you want to make your kernel boot off a NFS server as root
  1092. filesystem, select Y here.
  1093. if KERNEL_IP_PNP
  1094. config KERNEL_IP_PNP_DHCP
  1095. def_bool y
  1096. config KERNEL_IP_PNP_BOOTP
  1097. def_bool n
  1098. config KERNEL_IP_PNP_RARP
  1099. def_bool n
  1100. config KERNEL_NFS_FS
  1101. def_bool y
  1102. config KERNEL_NFS_V2
  1103. def_bool y
  1104. config KERNEL_NFS_V3
  1105. def_bool y
  1106. config KERNEL_ROOT_NFS
  1107. def_bool y
  1108. endif
  1109. config KERNEL_BTRFS_FS
  1110. bool "Compile the kernel with built-in BTRFS support"
  1111. help
  1112. Say Y here if you want to make the kernel to be able to boot off a
  1113. BTRFS partition.
  1114. config KERNEL_EROFS_FS
  1115. bool "Compile the kernel with built-in EROFS support"
  1116. help
  1117. Say Y here if you want to make the kernel to be able to boot off a
  1118. EROFS partition.
  1119. config KERNEL_EROFS_FS_XATTR
  1120. bool "EROFS XATTR support"
  1121. config KERNEL_EROFS_FS_ZIP
  1122. bool
  1123. default y if KERNEL_EROFS_FS
  1124. config KERNEL_EROFS_FS_ZIP_LZMA
  1125. bool
  1126. default y if KERNEL_EROFS_FS
  1127. menu "Filesystem ACL and attr support options"
  1128. config USE_FS_ACL_ATTR
  1129. bool "Use filesystem ACL and attr support by default"
  1130. default y if !SMALL_FLASH
  1131. help
  1132. Make using ACLs (e.g. POSIX ACL, NFSv4 ACL) the default
  1133. for kernel and packages, except old NFS.
  1134. Also enable userspace extended attribute support
  1135. by default. (OpenWrt already has an expection it will be
  1136. present in the kernel).
  1137. config KERNEL_FS_POSIX_ACL
  1138. bool "Enable POSIX ACL support"
  1139. default y if USE_FS_ACL_ATTR
  1140. config KERNEL_BTRFS_FS_POSIX_ACL
  1141. bool "Enable POSIX ACL for BtrFS Filesystems"
  1142. select KERNEL_FS_POSIX_ACL
  1143. default y if USE_FS_ACL_ATTR
  1144. config KERNEL_EROFS_FS_POSIX_ACL
  1145. bool "Enable POSIX ACL for EROFS Filesystems"
  1146. select KERNEL_FS_POSIX_ACL
  1147. default y if USE_FS_ACL_ATTR
  1148. config KERNEL_EXT4_FS_POSIX_ACL
  1149. bool "Enable POSIX ACL for Ext4 Filesystems"
  1150. select KERNEL_FS_POSIX_ACL
  1151. default y if USE_FS_ACL_ATTR
  1152. config KERNEL_F2FS_FS_POSIX_ACL
  1153. bool "Enable POSIX ACL for F2FS Filesystems"
  1154. select KERNEL_FS_POSIX_ACL
  1155. default y if USE_FS_ACL_ATTR
  1156. config KERNEL_JFFS2_FS_POSIX_ACL
  1157. bool "Enable POSIX ACL for JFFS2 Filesystems"
  1158. select KERNEL_FS_POSIX_ACL
  1159. default y if USE_FS_ACL_ATTR
  1160. config KERNEL_TMPFS_POSIX_ACL
  1161. bool "Enable POSIX ACL for TMPFS Filesystems"
  1162. select KERNEL_FS_POSIX_ACL
  1163. default y if USE_FS_ACL_ATTR
  1164. config KERNEL_CIFS_ACL
  1165. bool "Enable CIFS ACLs"
  1166. select KERNEL_FS_POSIX_ACL
  1167. default y if USE_FS_ACL_ATTR
  1168. config KERNEL_HFS_FS_POSIX_ACL
  1169. bool "Enable POSIX ACL for HFS Filesystems"
  1170. select KERNEL_FS_POSIX_ACL
  1171. default y if USE_FS_ACL_ATTR
  1172. config KERNEL_HFSPLUS_FS_POSIX_ACL
  1173. bool "Enable POSIX ACL for HFS+ Filesystems"
  1174. select KERNEL_FS_POSIX_ACL
  1175. default y if USE_FS_ACL_ATTR
  1176. config KERNEL_NFS_ACL_SUPPORT
  1177. bool "Enable ACLs for NFS"
  1178. default y if USE_FS_ACL_ATTR
  1179. config KERNEL_NFS_V3_ACL_SUPPORT
  1180. bool "Enable ACLs for NFSv3"
  1181. config KERNEL_NFSD_V2_ACL_SUPPORT
  1182. bool "Enable ACLs for NFSDv2"
  1183. config KERNEL_NFSD_V3_ACL_SUPPORT
  1184. bool "Enable ACLs for NFSDv3"
  1185. config KERNEL_REISER_FS_POSIX_ACL
  1186. bool "Enable POSIX ACLs for ReiserFS"
  1187. select KERNEL_FS_POSIX_ACL
  1188. default y if USE_FS_ACL_ATTR
  1189. config KERNEL_XFS_POSIX_ACL
  1190. bool "Enable POSIX ACLs for XFS"
  1191. select KERNEL_FS_POSIX_ACL
  1192. default y if USE_FS_ACL_ATTR
  1193. config KERNEL_JFS_POSIX_ACL
  1194. bool "Enable POSIX ACLs for JFS"
  1195. select KERNEL_FS_POSIX_ACL
  1196. default y if USE_FS_ACL_ATTR
  1197. endmenu
  1198. config KERNEL_DEVMEM
  1199. bool "/dev/mem virtual device support"
  1200. help
  1201. Say Y here if you want to support the /dev/mem device.
  1202. The /dev/mem device is used to access areas of physical
  1203. memory.
  1204. config KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE
  1205. int "Number of squashfs fragments cached"
  1206. default 2 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
  1207. default 3
  1208. config KERNEL_SQUASHFS_XATTR
  1209. bool "Squashfs XATTR support"
  1210. #
  1211. # compile optimization setting
  1212. #
  1213. choice
  1214. prompt "Compiler optimization level"
  1215. default KERNEL_CC_OPTIMIZE_FOR_SIZE if SMALL_FLASH
  1216. config KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE
  1217. bool "Optimize for performance"
  1218. help
  1219. This is the default optimization level for the kernel, building
  1220. with the "-O2" compiler flag for best performance and most
  1221. helpful compile-time warnings.
  1222. config KERNEL_CC_OPTIMIZE_FOR_SIZE
  1223. bool "Optimize for size"
  1224. help
  1225. Enabling this option will pass "-Os" instead of "-O2" to
  1226. your compiler resulting in a smaller kernel.
  1227. endchoice
  1228. config KERNEL_AUDIT
  1229. bool "Auditing support"
  1230. config KERNEL_SECURITY
  1231. bool "Enable different security models"
  1232. config KERNEL_SECURITY_NETWORK
  1233. bool "Socket and Networking Security Hooks"
  1234. select KERNEL_SECURITY
  1235. config KERNEL_SECURITY_SELINUX
  1236. bool "NSA SELinux Support"
  1237. select KERNEL_SECURITY_NETWORK
  1238. select KERNEL_AUDIT
  1239. config KERNEL_SECURITY_SELINUX_BOOTPARAM
  1240. bool "NSA SELinux boot parameter"
  1241. depends on KERNEL_SECURITY_SELINUX
  1242. default y
  1243. config KERNEL_SECURITY_SELINUX_DEVELOP
  1244. bool "NSA SELinux Development Support"
  1245. depends on KERNEL_SECURITY_SELINUX
  1246. default y
  1247. config KERNEL_SECURITY_SELINUX_SIDTAB_HASH_BITS
  1248. int
  1249. depends on KERNEL_SECURITY_SELINUX
  1250. default 9
  1251. config KERNEL_SECURITY_SELINUX_SID2STR_CACHE_SIZE
  1252. int
  1253. depends on KERNEL_SECURITY_SELINUX
  1254. default 256
  1255. config KERNEL_LSM
  1256. string
  1257. default "lockdown,yama,loadpin,safesetid,integrity,selinux"
  1258. depends on KERNEL_SECURITY_SELINUX
  1259. config KERNEL_EROFS_FS_SECURITY
  1260. bool "EROFS Security Labels"
  1261. default y if !SMALL_FLASH
  1262. select KERNEL_EROFS_FS_XATTR
  1263. config KERNEL_EXT4_FS_SECURITY
  1264. bool "Ext4 Security Labels"
  1265. default y if !SMALL_FLASH
  1266. config KERNEL_F2FS_FS_SECURITY
  1267. bool "F2FS Security Labels"
  1268. default y if !SMALL_FLASH
  1269. config KERNEL_UBIFS_FS_SECURITY
  1270. bool "UBIFS Security Labels"
  1271. default y if !SMALL_FLASH
  1272. config KERNEL_JFFS2_FS_SECURITY
  1273. bool "JFFS2 Security Labels"
  1274. default y if !SMALL_FLASH
  1275. config KERNEL_WERROR
  1276. bool "Compile the kernel with warnings as errors"
  1277. help
  1278. A kernel build should not cause any compiler warnings, and this
  1279. enables the '-Werror' (for C) and '-Dwarnings' (for Rust) flags
  1280. to enforce that rule by default. Certain warnings from other tools
  1281. such as the linker may be upgraded to errors with this option as
  1282. well.
  1283. However, if you have a new (or very old) compiler or linker with odd
  1284. and unusual warnings, or you have some architecture with problems,
  1285. you may need to disable this config option in order to
  1286. successfully build the kernel.
  1287. choice
  1288. prompt "Preemption Model"
  1289. default KERNEL_PREEMPT_NONE
  1290. config KERNEL_PREEMPT_NONE
  1291. bool "No Forced Preemption (Server)"
  1292. help
  1293. This is the traditional Linux preemption model, geared towards
  1294. throughput. It will still provide good latencies most of the
  1295. time, but there are no guarantees and occasional longer delays
  1296. are possible.
  1297. Select this option if you are building a kernel for a server or
  1298. scientific/computation system, or if you want to maximize the
  1299. raw processing power of the kernel, irrespective of scheduling
  1300. latencies.
  1301. config KERNEL_PREEMPT_VOLUNTARY
  1302. bool "Voluntary Kernel Preemption (Desktop)"
  1303. help
  1304. This option reduces the latency of the kernel by adding more
  1305. "explicit preemption points" to the kernel code. These new
  1306. preemption points have been selected to reduce the maximum
  1307. latency of rescheduling, providing faster application reactions,
  1308. at the cost of slightly lower throughput.
  1309. This allows reaction to interactive events by allowing a
  1310. low priority process to voluntarily preempt itself even if it
  1311. is in kernel mode executing a system call. This allows
  1312. applications to run more 'smoothly' even when the system is
  1313. under load.
  1314. Select this if you are building a kernel for a desktop system.
  1315. config KERNEL_PREEMPT
  1316. bool "Preemptible Kernel (Low-Latency Desktop)"
  1317. help
  1318. This option reduces the latency of the kernel by making
  1319. all kernel code (that is not executing in a critical section)
  1320. preemptible. This allows reaction to interactive events by
  1321. permitting a low priority process to be preempted involuntarily
  1322. even if it is in kernel mode executing a system call and would
  1323. otherwise not be about to reach a natural preemption point.
  1324. This allows applications to run more 'smoothly' even when the
  1325. system is under load, at the cost of slightly lower throughput
  1326. and a slight runtime overhead to kernel code.
  1327. Select this if you are building a kernel for a desktop or
  1328. embedded system with latency requirements in the milliseconds
  1329. range.
  1330. config KERNEL_PREEMPT_RT
  1331. bool "Fully Preemptible Kernel (Real-Time)"
  1332. depends on (x86_64 || aarch64 || riscv64)
  1333. help
  1334. This option turns the kernel into a real-time kernel by replacing
  1335. various locking primitives (spinlocks, rwlocks, etc.) with
  1336. preemptible priority-inheritance aware variants, enforcing
  1337. interrupt threading and introducing mechanisms to break up long
  1338. non-preemptible sections. This makes the kernel, except for very
  1339. low level and critical code paths (entry code, scheduler, low
  1340. level interrupt handling) fully preemptible and brings most
  1341. execution contexts under scheduler control.
  1342. Select this if you are building a kernel for systems which
  1343. require real-time guarantees.
  1344. endchoice