Config-kernel.in 35 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237
  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_CRASHLOG
  24. bool "Crash logging"
  25. depends on !(arm || powerpc || sparc || TARGET_uml || i386 || x86_64)
  26. default y
  27. config KERNEL_SWAP
  28. bool "Support for paging of anonymous memory (swap)"
  29. default y if !SMALL_FLASH
  30. config KERNEL_PROC_STRIPPED
  31. bool "Strip non-essential /proc functionality to reduce code size"
  32. default y if SMALL_FLASH
  33. config KERNEL_DEBUG_FS
  34. bool "Compile the kernel with debug filesystem enabled"
  35. default y
  36. help
  37. debugfs is a virtual file system that kernel developers use to put
  38. debugging files into. Enable this option to be able to read and
  39. write to these files. Many common debugging facilities, such as
  40. ftrace, require the existence of debugfs.
  41. config KERNEL_MIPS_FP_SUPPORT
  42. bool
  43. default y if TARGET_pistachio
  44. config KERNEL_ARM_PMU
  45. bool
  46. default n
  47. depends on (arm || aarch64)
  48. config KERNEL_X86_VSYSCALL_EMULATION
  49. bool "Enable vsyscall emulation"
  50. default n
  51. depends on x86_64
  52. help
  53. This enables emulation of the legacy vsyscall page. Disabling
  54. it is roughly equivalent to booting with vsyscall=none, except
  55. that it will also disable the helpful warning if a program
  56. tries to use a vsyscall. With this option set to N, offending
  57. programs will just segfault, citing addresses of the form
  58. 0xffffffffff600?00.
  59. This option is required by many programs built before 2013, and
  60. care should be used even with newer programs if set to N.
  61. Disabling this option saves about 7K of kernel size and
  62. possibly 4K of additional runtime pagetable memory.
  63. config KERNEL_PERF_EVENTS
  64. bool "Compile the kernel with performance events and counters"
  65. default n
  66. select KERNEL_ARM_PMU if (arm || aarch64)
  67. config KERNEL_PROFILING
  68. bool "Compile the kernel with profiling enabled"
  69. default n
  70. select KERNEL_PERF_EVENTS
  71. help
  72. Enable the extended profiling support mechanisms used by profilers such
  73. as OProfile.
  74. config KERNEL_UBSAN
  75. bool "Compile the kernel with undefined behaviour sanity checker"
  76. help
  77. This option enables undefined behaviour sanity checker
  78. Compile-time instrumentation is used to detect various undefined
  79. behaviours in runtime. Various types of checks may be enabled
  80. via boot parameter ubsan_handle
  81. (see: Documentation/dev-tools/ubsan.rst).
  82. config KERNEL_UBSAN_SANITIZE_ALL
  83. bool "Enable instrumentation for the entire kernel"
  84. depends on KERNEL_UBSAN
  85. default y
  86. help
  87. This option activates instrumentation for the entire kernel.
  88. If you don't enable this option, you have to explicitly specify
  89. UBSAN_SANITIZE := y for the files/directories you want to check for UB.
  90. Enabling this option will get kernel image size increased
  91. significantly.
  92. config KERNEL_UBSAN_ALIGNMENT
  93. bool "Enable checking of pointers alignment"
  94. depends on KERNEL_UBSAN
  95. help
  96. This option enables detection of unaligned memory accesses.
  97. Enabling this option on architectures that support unaligned
  98. accesses may produce a lot of false positives.
  99. config KERNEL_UBSAN_BOUNDS
  100. bool "Perform array index bounds checking"
  101. depends on KERNEL_UBSAN
  102. help
  103. This option enables detection of directly indexed out of bounds array
  104. accesses, where the array size is known at compile time. Note that
  105. this does not protect array overflows via bad calls to the
  106. {str,mem}*cpy() family of functions (that is addressed by
  107. FORTIFY_SOURCE).
  108. config KERNEL_UBSAN_NULL
  109. bool "Enable checking of null pointers"
  110. depends on KERNEL_UBSAN
  111. help
  112. This option enables detection of memory accesses via a
  113. null pointer.
  114. config KERNEL_UBSAN_TRAP
  115. bool "On Sanitizer warnings, abort the running kernel code"
  116. depends on KERNEL_UBSAN
  117. help
  118. Building kernels with Sanitizer features enabled tends to grow the
  119. kernel size by around 5%, due to adding all the debugging text on
  120. failure paths. To avoid this, Sanitizer instrumentation can just
  121. issue a trap. This reduces the kernel size overhead but turns all
  122. warnings (including potentially harmless conditions) into full
  123. exceptions that abort the running kernel code (regardless of context,
  124. locks held, etc), which may destabilize the system. For some system
  125. builders this is an acceptable trade-off.
  126. config KERNEL_KASAN
  127. bool "Compile the kernel with KASan: runtime memory debugger"
  128. select KERNEL_SLUB_DEBUG
  129. depends on (x86_64 || aarch64)
  130. help
  131. Enables kernel address sanitizer - runtime memory debugger,
  132. designed to find out-of-bounds accesses and use-after-free bugs.
  133. This is strictly a debugging feature and it requires a gcc version
  134. of 4.9.2 or later. Detection of out of bounds accesses to stack or
  135. global variables requires gcc 5.0 or later.
  136. This feature consumes about 1/8 of available memory and brings about
  137. ~x3 performance slowdown.
  138. For better error detection enable CONFIG_STACKTRACE.
  139. Currently CONFIG_KASAN doesn't work with CONFIG_DEBUG_SLAB
  140. (the resulting kernel does not boot).
  141. config KERNEL_KASAN_EXTRA
  142. bool "KAsan: extra checks"
  143. depends on KERNEL_KASAN && KERNEL_DEBUG_KERNEL
  144. help
  145. This enables further checks in the kernel address sanitizer, for now
  146. it only includes the address-use-after-scope check that can lead
  147. to excessive kernel stack usage, frame size warnings and longer
  148. compile time.
  149. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=81715 has more
  150. config KERNEL_KASAN_VMALLOC
  151. bool "Back mappings in vmalloc space with real shadow memory"
  152. depends on KERNEL_KASAN
  153. help
  154. By default, the shadow region for vmalloc space is the read-only
  155. zero page. This means that KASAN cannot detect errors involving
  156. vmalloc space.
  157. Enabling this option will hook in to vmap/vmalloc and back those
  158. mappings with real shadow memory allocated on demand. This allows
  159. for KASAN to detect more sorts of errors (and to support vmapped
  160. stacks), but at the cost of higher memory usage.
  161. This option depends on HAVE_ARCH_KASAN_VMALLOC, but we can't
  162. depend on that in here, so it is possible that enabling this
  163. will have no effect.
  164. if KERNEL_KASAN
  165. config KERNEL_KASAN_GENERIC
  166. def_bool y
  167. config KERNEL_KASAN_SW_TAGS
  168. def_bool n
  169. endif
  170. choice
  171. prompt "Instrumentation type"
  172. depends on KERNEL_KASAN
  173. default KERNEL_KASAN_OUTLINE
  174. config KERNEL_KASAN_OUTLINE
  175. bool "Outline instrumentation"
  176. help
  177. Before every memory access compiler insert function call
  178. __asan_load*/__asan_store*. These functions performs check
  179. of shadow memory. This is slower than inline instrumentation,
  180. however it doesn't bloat size of kernel's .text section so
  181. much as inline does.
  182. config KERNEL_KASAN_INLINE
  183. bool "Inline instrumentation"
  184. help
  185. Compiler directly inserts code checking shadow memory before
  186. memory accesses. This is faster than outline (in some workloads
  187. it gives about x2 boost over outline instrumentation), but
  188. make kernel's .text size much bigger.
  189. This requires a gcc version of 5.0 or later.
  190. endchoice
  191. config KERNEL_KCOV
  192. bool "Compile the kernel with code coverage for fuzzing"
  193. select KERNEL_DEBUG_FS
  194. help
  195. KCOV exposes kernel code coverage information in a form suitable
  196. for coverage-guided fuzzing (randomized testing).
  197. If RANDOMIZE_BASE is enabled, PC values will not be stable across
  198. different machines and across reboots. If you need stable PC values,
  199. disable RANDOMIZE_BASE.
  200. For more details, see Documentation/kcov.txt.
  201. config KERNEL_KCOV_ENABLE_COMPARISONS
  202. bool "Enable comparison operands collection by KCOV"
  203. depends on KERNEL_KCOV
  204. help
  205. KCOV also exposes operands of every comparison in the instrumented
  206. code along with operand sizes and PCs of the comparison instructions.
  207. These operands can be used by fuzzing engines to improve the quality
  208. of fuzzing coverage.
  209. config KERNEL_KCOV_INSTRUMENT_ALL
  210. bool "Instrument all code by default"
  211. depends on KERNEL_KCOV
  212. default y if KERNEL_KCOV
  213. help
  214. If you are doing generic system call fuzzing (like e.g. syzkaller),
  215. then you will want to instrument the whole kernel and you should
  216. say y here. If you are doing more targeted fuzzing (like e.g.
  217. filesystem fuzzing with AFL) then you will want to enable coverage
  218. for more specific subsets of files, and should say n here.
  219. config KERNEL_TASKSTATS
  220. bool "Compile the kernel with task resource/io statistics and accounting"
  221. default n
  222. help
  223. Enable the collection and publishing of task/io statistics and
  224. accounting. Enable this option to enable i/o monitoring in system
  225. monitors.
  226. if KERNEL_TASKSTATS
  227. config KERNEL_TASK_DELAY_ACCT
  228. def_bool y
  229. config KERNEL_TASK_IO_ACCOUNTING
  230. def_bool y
  231. config KERNEL_TASK_XACCT
  232. def_bool y
  233. endif
  234. config KERNEL_KALLSYMS
  235. bool "Compile the kernel with symbol table information"
  236. default y if !SMALL_FLASH
  237. help
  238. This will give you more information in stack traces from kernel oopses.
  239. config KERNEL_FTRACE
  240. bool "Compile the kernel with tracing support"
  241. depends on !TARGET_uml
  242. default n
  243. config KERNEL_FTRACE_SYSCALLS
  244. bool "Trace system calls"
  245. depends on KERNEL_FTRACE
  246. default n
  247. config KERNEL_ENABLE_DEFAULT_TRACERS
  248. bool "Trace process context switches and events"
  249. depends on KERNEL_FTRACE
  250. default n
  251. config KERNEL_FUNCTION_TRACER
  252. bool "Function tracer"
  253. depends on KERNEL_FTRACE
  254. default n
  255. config KERNEL_FUNCTION_GRAPH_TRACER
  256. bool "Function graph tracer"
  257. depends on KERNEL_FUNCTION_TRACER
  258. default n
  259. config KERNEL_DYNAMIC_FTRACE
  260. bool "Enable/disable function tracing dynamically"
  261. depends on KERNEL_FUNCTION_TRACER
  262. default n
  263. config KERNEL_FUNCTION_PROFILER
  264. bool "Function profiler"
  265. depends on KERNEL_FUNCTION_TRACER
  266. default n
  267. config KERNEL_IRQSOFF_TRACER
  268. bool "Interrupts-off Latency Tracer"
  269. depends on KERNEL_FTRACE
  270. help
  271. This option measures the time spent in irqs-off critical
  272. sections, with microsecond accuracy.
  273. The default measurement method is a maximum search, which is
  274. disabled by default and can be runtime (re-)started
  275. via:
  276. echo 0 > /sys/kernel/debug/tracing/tracing_max_latency
  277. (Note that kernel size and overhead increase with this option
  278. enabled. This option and the preempt-off timing option can be
  279. used together or separately.)
  280. config KERNEL_PREEMPT_TRACER
  281. bool "Preemption-off Latency Tracer"
  282. depends on KERNEL_FTRACE
  283. help
  284. This option measures the time spent in preemption-off critical
  285. sections, with microsecond accuracy.
  286. The default measurement method is a maximum search, which is
  287. disabled by default and can be runtime (re-)started
  288. via:
  289. echo 0 > /sys/kernel/debug/tracing/tracing_max_latency
  290. (Note that kernel size and overhead increase with this option
  291. enabled. This option and the irqs-off timing option can be
  292. used together or separately.)
  293. config KERNEL_DEBUG_KERNEL
  294. bool
  295. default n
  296. config KERNEL_DEBUG_INFO
  297. bool "Compile the kernel with debug information"
  298. default y if !SMALL_FLASH
  299. select KERNEL_DEBUG_KERNEL
  300. help
  301. This will compile your kernel and modules with debug information.
  302. config KERNEL_DEBUG_LL_UART_NONE
  303. bool
  304. default n
  305. depends on arm
  306. config KERNEL_DEBUG_LL
  307. bool
  308. default n
  309. depends on arm
  310. select KERNEL_DEBUG_LL_UART_NONE
  311. help
  312. ARM low level debugging.
  313. config KERNEL_DYNAMIC_DEBUG
  314. bool "Compile the kernel with dynamic printk"
  315. select KERNEL_DEBUG_FS
  316. default n
  317. help
  318. Compiles debug level messages into the kernel, which would not
  319. otherwise be available at runtime. These messages can then be
  320. enabled/disabled based on various levels of scope - per source file,
  321. function, module, format string, and line number. This mechanism
  322. implicitly compiles in all pr_debug() and dev_dbg() calls, which
  323. enlarges the kernel text size by about 2%.
  324. config KERNEL_EARLY_PRINTK
  325. bool "Compile the kernel with early printk"
  326. default y if TARGET_bcm53xx
  327. default n
  328. depends on arm
  329. select KERNEL_DEBUG_KERNEL
  330. select KERNEL_DEBUG_LL if arm
  331. help
  332. Compile the kernel with early printk support. This is only useful for
  333. debugging purposes to send messages over the serial console in early boot.
  334. Enable this to debug early boot problems.
  335. config KERNEL_KPROBES
  336. bool "Compile the kernel with kprobes support"
  337. default n
  338. select KERNEL_FTRACE
  339. select KERNEL_PERF_EVENTS
  340. help
  341. Compiles the kernel with KPROBES support, which allows you to trap
  342. at almost any kernel address and execute a callback function.
  343. register_kprobe() establishes a probepoint and specifies the
  344. callback. Kprobes is useful for kernel debugging, non-intrusive
  345. instrumentation and testing.
  346. If in doubt, say "N".
  347. config KERNEL_KPROBE_EVENTS
  348. bool
  349. default y if KERNEL_KPROBES
  350. config KERNEL_AIO
  351. bool "Compile the kernel with asynchronous IO support"
  352. default y if !SMALL_FLASH
  353. config KERNEL_IO_URING
  354. bool "Compile the kernel with io_uring support"
  355. default y if !SMALL_FLASH
  356. config KERNEL_FHANDLE
  357. bool "Compile the kernel with support for fhandle syscalls"
  358. default y if !SMALL_FLASH
  359. config KERNEL_FANOTIFY
  360. bool "Compile the kernel with modern file notification support"
  361. default y if !SMALL_FLASH
  362. config KERNEL_BLK_DEV_BSG
  363. bool "Compile the kernel with SCSI generic v4 support for any block device"
  364. default n
  365. config KERNEL_TRANSPARENT_HUGEPAGE
  366. bool
  367. choice
  368. prompt "Transparent Hugepage Support sysfs defaults"
  369. depends on KERNEL_TRANSPARENT_HUGEPAGE
  370. default KERNEL_TRANSPARENT_HUGEPAGE_ALWAYS
  371. config KERNEL_TRANSPARENT_HUGEPAGE_ALWAYS
  372. bool "always"
  373. config KERNEL_TRANSPARENT_HUGEPAGE_MADVISE
  374. bool "madvise"
  375. endchoice
  376. config KERNEL_HUGETLBFS
  377. bool
  378. config KERNEL_HUGETLB_PAGE
  379. bool "Compile the kernel with HugeTLB support"
  380. select KERNEL_TRANSPARENT_HUGEPAGE
  381. select KERNEL_HUGETLBFS
  382. default n
  383. config KERNEL_MAGIC_SYSRQ
  384. bool "Compile the kernel with SysRq support"
  385. default y
  386. config KERNEL_DEBUG_PINCTRL
  387. bool "Compile the kernel with pinctrl debugging"
  388. select KERNEL_DEBUG_KERNEL
  389. config KERNEL_DEBUG_GPIO
  390. bool "Compile the kernel with gpio debugging"
  391. select KERNEL_DEBUG_KERNEL
  392. config KERNEL_COREDUMP
  393. bool
  394. config KERNEL_ELF_CORE
  395. bool "Enable process core dump support"
  396. select KERNEL_COREDUMP
  397. default y if !SMALL_FLASH
  398. config KERNEL_PROVE_LOCKING
  399. bool "Enable kernel lock checking"
  400. select KERNEL_DEBUG_KERNEL
  401. default n
  402. config KERNEL_SOFTLOCKUP_DETECTOR
  403. bool "Compile the kernel with detect Soft Lockups"
  404. depends on KERNEL_DEBUG_KERNEL
  405. help
  406. Say Y here to enable the kernel to act as a watchdog to detect
  407. soft lockups.
  408. Softlockups are bugs that cause the kernel to loop in kernel
  409. mode for more than 20 seconds, without giving other tasks a
  410. chance to run. The current stack trace is displayed upon
  411. detection and the system will stay locked up.
  412. config KERNEL_DETECT_HUNG_TASK
  413. bool "Compile the kernel with detect Hung Tasks"
  414. depends on KERNEL_DEBUG_KERNEL
  415. default KERNEL_SOFTLOCKUP_DETECTOR
  416. help
  417. Say Y here to enable the kernel to detect "hung tasks",
  418. which are bugs that cause the task to be stuck in
  419. uninterruptible "D" state indefinitely.
  420. When a hung task is detected, the kernel will print the
  421. current stack trace (which you should report), but the
  422. task will stay in uninterruptible state. If lockdep is
  423. enabled then all held locks will also be reported. This
  424. feature has negligible overhead.
  425. config KERNEL_WQ_WATCHDOG
  426. bool "Compile the kernel with detect Workqueue Stalls"
  427. depends on KERNEL_DEBUG_KERNEL
  428. help
  429. Say Y here to enable stall detection on workqueues. If a
  430. worker pool doesn't make forward progress on a pending work
  431. item for over a given amount of time, 30s by default, a
  432. warning message is printed along with dump of workqueue
  433. state. This can be configured through kernel parameter
  434. "workqueue.watchdog_thresh" and its sysfs counterpart.
  435. config KERNEL_DEBUG_ATOMIC_SLEEP
  436. bool "Compile the kernel with sleep inside atomic section checking"
  437. depends on KERNEL_DEBUG_KERNEL
  438. help
  439. If you say Y here, various routines which may sleep will become very
  440. noisy if they are called inside atomic sections: when a spinlock is
  441. held, inside an rcu read side critical section, inside preempt disabled
  442. sections, inside an interrupt, etc...
  443. config KERNEL_DEBUG_VM
  444. bool "Compile the kernel with debug VM"
  445. depends on KERNEL_DEBUG_KERNEL
  446. help
  447. Enable this to turn on extended checks in the virtual-memory system
  448. that may impact performance.
  449. If unsure, say N.
  450. config KERNEL_PRINTK_TIME
  451. bool "Enable printk timestamps"
  452. default y
  453. config KERNEL_SLUB_DEBUG
  454. bool
  455. config KERNEL_SLUB_DEBUG_ON
  456. bool
  457. config KERNEL_SLABINFO
  458. select KERNEL_SLUB_DEBUG
  459. select KERNEL_SLUB_DEBUG_ON
  460. bool "Enable /proc slab debug info"
  461. config KERNEL_PROC_PAGE_MONITOR
  462. bool "Enable /proc page monitoring"
  463. config KERNEL_RELAY
  464. bool
  465. config KERNEL_KEXEC
  466. bool "Enable kexec support"
  467. config KERNEL_PROC_VMCORE
  468. bool
  469. config KERNEL_PROC_KCORE
  470. bool
  471. config KERNEL_CRASH_DUMP
  472. depends on i386 || x86_64 || arm || armeb
  473. select KERNEL_KEXEC
  474. select KERNEL_PROC_VMCORE
  475. select KERNEL_PROC_KCORE
  476. bool "Enable support for kexec crashdump"
  477. default y
  478. config USE_RFKILL
  479. bool "Enable rfkill support"
  480. default RFKILL_SUPPORT
  481. config USE_SPARSE
  482. bool "Enable sparse check during kernel build"
  483. default n
  484. config KERNEL_DEVTMPFS
  485. bool "Compile the kernel with device tmpfs enabled"
  486. default n
  487. help
  488. devtmpfs is a simple, kernel-managed /dev filesystem. The kernel creates
  489. devices nodes for all registered devices to simplify boot, but leaves more
  490. complex tasks to userspace (e.g. udev).
  491. if KERNEL_DEVTMPFS
  492. config KERNEL_DEVTMPFS_MOUNT
  493. bool "Automatically mount devtmpfs after root filesystem is mounted"
  494. default n
  495. endif
  496. config KERNEL_KEYS
  497. bool "Enable kernel access key retention support"
  498. default !SMALL_FLASH
  499. config KERNEL_PERSISTENT_KEYRINGS
  500. bool "Enable kernel persistent keyrings"
  501. depends on KERNEL_KEYS
  502. default n
  503. config KERNEL_KEYS_REQUEST_CACHE
  504. bool "Enable temporary caching of the last request_key() result"
  505. depends on KERNEL_KEYS
  506. default n
  507. config KERNEL_BIG_KEYS
  508. bool "Enable large payload keys on kernel keyrings"
  509. depends on KERNEL_KEYS
  510. default n
  511. #
  512. # CGROUP support symbols
  513. #
  514. config KERNEL_CGROUPS
  515. bool "Enable kernel cgroups"
  516. default y if !SMALL_FLASH
  517. if KERNEL_CGROUPS
  518. config KERNEL_CGROUP_DEBUG
  519. bool "Example debug cgroup subsystem"
  520. default n
  521. help
  522. This option enables a simple cgroup subsystem that
  523. exports useful debugging information about the cgroups
  524. framework.
  525. config KERNEL_FREEZER
  526. bool
  527. config KERNEL_CGROUP_FREEZER
  528. bool "legacy Freezer cgroup subsystem"
  529. default n
  530. select KERNEL_FREEZER
  531. help
  532. Provides a way to freeze and unfreeze all tasks in a
  533. cgroup.
  534. (legacy cgroup1-only controller, in cgroup2 freezer
  535. is integrated in the Memory controller)
  536. config KERNEL_CGROUP_DEVICE
  537. bool "legacy Device controller for cgroups"
  538. default n
  539. help
  540. Provides a cgroup implementing whitelists for devices which
  541. a process in the cgroup can mknod or open.
  542. (legacy cgroup1-only controller)
  543. config KERNEL_CGROUP_HUGETLB
  544. bool "HugeTLB controller"
  545. default n
  546. select KERNEL_HUGETLB_PAGE
  547. config KERNEL_CGROUP_PIDS
  548. bool "PIDs cgroup subsystem"
  549. default y
  550. help
  551. Provides enforcement of process number limits in the scope of a
  552. cgroup.
  553. config KERNEL_CGROUP_RDMA
  554. bool "RDMA controller for cgroups"
  555. default y
  556. config KERNEL_CGROUP_BPF
  557. bool "Support for eBPF programs attached to cgroups"
  558. default y
  559. config KERNEL_CPUSETS
  560. bool "Cpuset support"
  561. default y
  562. help
  563. This option will let you create and manage CPUSETs which
  564. allow dynamically partitioning a system into sets of CPUs and
  565. Memory Nodes and assigning tasks to run only within those sets.
  566. This is primarily useful on large SMP or NUMA systems.
  567. config KERNEL_PROC_PID_CPUSET
  568. bool "Include legacy /proc/<pid>/cpuset file"
  569. default n
  570. depends on KERNEL_CPUSETS
  571. config KERNEL_CGROUP_CPUACCT
  572. bool "Simple CPU accounting cgroup subsystem"
  573. default y
  574. help
  575. Provides a simple Resource Controller for monitoring the
  576. total CPU consumed by the tasks in a cgroup.
  577. config KERNEL_RESOURCE_COUNTERS
  578. bool "Resource counters"
  579. default y
  580. help
  581. This option enables controller independent resource accounting
  582. infrastructure that works with cgroups.
  583. config KERNEL_MM_OWNER
  584. bool
  585. default y if KERNEL_MEMCG
  586. config KERNEL_MEMCG
  587. bool "Memory Resource Controller for Control Groups"
  588. default y
  589. select KERNEL_FREEZER
  590. depends on KERNEL_RESOURCE_COUNTERS || !LINUX_3_18
  591. help
  592. Provides a memory resource controller that manages both anonymous
  593. memory and page cache. (See Documentation/cgroups/memory.txt)
  594. Note that setting this option increases fixed memory overhead
  595. associated with each page of memory in the system. By this,
  596. 20(40)bytes/PAGE_SIZE on 32(64)bit system will be occupied by memory
  597. usage tracking struct at boot. Total amount of this is printed out
  598. at boot.
  599. Only enable when you're ok with these tradeoffs and really
  600. sure you need the memory resource controller. Even when you enable
  601. this, you can set "cgroup_disable=memory" at your boot option to
  602. disable memory resource controller and you can avoid overheads
  603. (but lose benefits of memory resource controller).
  604. This config option also selects MM_OWNER config option, which
  605. could in turn add some fork/exit overhead.
  606. config KERNEL_MEMCG_SWAP
  607. bool "Memory Resource Controller Swap Extension"
  608. default y
  609. depends on KERNEL_MEMCG
  610. help
  611. Add swap management feature to memory resource controller. When you
  612. enable this, you can limit mem+swap usage per cgroup. In other words,
  613. when you disable this, memory resource controller has no cares to
  614. usage of swap...a process can exhaust all of the swap. This extension
  615. is useful when you want to avoid exhaustion swap but this itself
  616. adds more overheads and consumes memory for remembering information.
  617. Especially if you use 32bit system or small memory system, please
  618. be careful about enabling this. When memory resource controller
  619. is disabled by boot option, this will be automatically disabled and
  620. there will be no overhead from this. Even when you set this config=y,
  621. if boot option "swapaccount=0" is set, swap will not be accounted.
  622. Now, memory usage of swap_cgroup is 2 bytes per entry. If swap page
  623. size is 4096bytes, 512k per 1Gbytes of swap.
  624. config KERNEL_MEMCG_SWAP_ENABLED
  625. bool "Memory Resource Controller Swap Extension enabled by default"
  626. default n
  627. depends on KERNEL_MEMCG_SWAP
  628. help
  629. Memory Resource Controller Swap Extension comes with its price in
  630. a bigger memory consumption. General purpose distribution kernels
  631. which want to enable the feature but keep it disabled by default
  632. and let the user enable it by swapaccount boot command line
  633. parameter should have this option unselected.
  634. Those who want to have the feature enabled by default should
  635. select this option (if, for some reason, they need to disable it,
  636. then swapaccount=0 does the trick).
  637. config KERNEL_MEMCG_KMEM
  638. bool "Memory Resource Controller Kernel Memory accounting (EXPERIMENTAL)"
  639. default y
  640. depends on KERNEL_MEMCG
  641. help
  642. The Kernel Memory extension for Memory Resource Controller can limit
  643. the amount of memory used by kernel objects in the system. Those are
  644. fundamentally different from the entities handled by the standard
  645. Memory Controller, which are page-based, and can be swapped. Users of
  646. the kmem extension can use it to guarantee that no group of processes
  647. will ever exhaust kernel resources alone.
  648. config KERNEL_CGROUP_PERF
  649. bool "Enable perf_event per-cpu per-container group (cgroup) monitoring"
  650. select KERNEL_PERF_EVENTS
  651. default n
  652. help
  653. This option extends the per-cpu mode to restrict monitoring to
  654. threads which belong to the cgroup specified and run on the
  655. designated cpu.
  656. menuconfig KERNEL_CGROUP_SCHED
  657. bool "Group CPU scheduler"
  658. default y
  659. help
  660. This feature lets CPU scheduler recognize task groups and control CPU
  661. bandwidth allocation to such task groups. It uses cgroups to group
  662. tasks.
  663. if KERNEL_CGROUP_SCHED
  664. config KERNEL_FAIR_GROUP_SCHED
  665. bool "Group scheduling for SCHED_OTHER"
  666. default y
  667. config KERNEL_CFS_BANDWIDTH
  668. bool "CPU bandwidth provisioning for FAIR_GROUP_SCHED"
  669. default y
  670. depends on KERNEL_FAIR_GROUP_SCHED
  671. help
  672. This option allows users to define CPU bandwidth rates (limits) for
  673. tasks running within the fair group scheduler. Groups with no limit
  674. set are considered to be unconstrained and will run with no
  675. restriction.
  676. See tip/Documentation/scheduler/sched-bwc.txt for more information.
  677. config KERNEL_RT_GROUP_SCHED
  678. bool "Group scheduling for SCHED_RR/FIFO"
  679. default y
  680. help
  681. This feature lets you explicitly allocate real CPU bandwidth
  682. to task groups. If enabled, it will also make it impossible to
  683. schedule realtime tasks for non-root users until you allocate
  684. realtime bandwidth for them.
  685. endif
  686. config KERNEL_BLK_CGROUP
  687. bool "Block IO controller"
  688. default y
  689. help
  690. Generic block IO controller cgroup interface. This is the common
  691. cgroup interface which should be used by various IO controlling
  692. policies.
  693. Currently, CFQ IO scheduler uses it to recognize task groups and
  694. control disk bandwidth allocation (proportional time slice allocation)
  695. to such task groups. It is also used by bio throttling logic in
  696. block layer to implement upper limit in IO rates on a device.
  697. This option only enables generic Block IO controller infrastructure.
  698. One needs to also enable actual IO controlling logic/policy. For
  699. enabling proportional weight division of disk bandwidth in CFQ, set
  700. CONFIG_CFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
  701. CONFIG_BLK_DEV_THROTTLING=y.
  702. if KERNEL_BLK_CGROUP
  703. config KERNEL_CFQ_GROUP_IOSCHED
  704. bool "Proportional weight of disk bandwidth in CFQ"
  705. config KERNEL_BLK_DEV_THROTTLING
  706. bool "Enable throttling policy"
  707. default y
  708. config KERNEL_BLK_DEV_THROTTLING_LOW
  709. bool "Block throttling .low limit interface support (EXPERIMENTAL)"
  710. depends on KERNEL_BLK_DEV_THROTTLING
  711. endif
  712. config KERNEL_DEBUG_BLK_CGROUP
  713. bool "Enable Block IO controller debugging"
  714. default n
  715. depends on KERNEL_BLK_CGROUP
  716. help
  717. Enable some debugging help. Currently it exports additional stat
  718. files in a cgroup which can be useful for debugging.
  719. config KERNEL_NET_CLS_CGROUP
  720. bool "legacy Control Group Classifier"
  721. default n
  722. config KERNEL_CGROUP_NET_CLASSID
  723. bool "legacy Network classid cgroup"
  724. default n
  725. config KERNEL_CGROUP_NET_PRIO
  726. bool "legacy Network priority cgroup"
  727. default n
  728. endif
  729. #
  730. # Namespace support symbols
  731. #
  732. config KERNEL_NAMESPACES
  733. bool "Enable kernel namespaces"
  734. default y if !SMALL_FLASH
  735. if KERNEL_NAMESPACES
  736. config KERNEL_UTS_NS
  737. bool "UTS namespace"
  738. default y
  739. help
  740. In this namespace, tasks see different info provided
  741. with the uname() system call.
  742. config KERNEL_IPC_NS
  743. bool "IPC namespace"
  744. default y
  745. help
  746. In this namespace, tasks work with IPC ids which correspond to
  747. different IPC objects in different namespaces.
  748. config KERNEL_USER_NS
  749. bool "User namespace (EXPERIMENTAL)"
  750. default y
  751. help
  752. This allows containers, i.e. vservers, to use user namespaces
  753. to provide different user info for different servers.
  754. config KERNEL_PID_NS
  755. bool "PID Namespaces"
  756. default y
  757. help
  758. Support process id namespaces. This allows having multiple
  759. processes with the same pid as long as they are in different
  760. pid namespaces. This is a building block of containers.
  761. config KERNEL_NET_NS
  762. bool "Network namespace"
  763. default y
  764. help
  765. Allow user space to create what appear to be multiple instances
  766. of the network stack.
  767. endif
  768. config KERNEL_DEVPTS_MULTIPLE_INSTANCES
  769. bool "Support multiple instances of devpts"
  770. default y if !SMALL_FLASH
  771. help
  772. Enable support for multiple instances of devpts filesystem.
  773. If you want to have isolated PTY namespaces (eg: in containers),
  774. say Y here. Otherwise, say N. If enabled, each mount of devpts
  775. filesystem with the '-o newinstance' option will create an
  776. independent PTY namespace.
  777. config KERNEL_POSIX_MQUEUE
  778. bool "POSIX Message Queues"
  779. default y if !SMALL_FLASH
  780. help
  781. POSIX variant of message queues is a part of IPC. In POSIX message
  782. queues every message has a priority which decides about succession
  783. of receiving it by a process. If you want to compile and run
  784. programs written e.g. for Solaris with use of its POSIX message
  785. queues (functions mq_*) say Y here.
  786. POSIX message queues are visible as a filesystem called 'mqueue'
  787. and can be mounted somewhere if you want to do filesystem
  788. operations on message queues.
  789. config KERNEL_SECCOMP_FILTER
  790. bool
  791. default y if !SMALL_FLASH
  792. config KERNEL_SECCOMP
  793. bool "Enable seccomp support"
  794. depends on !(TARGET_uml)
  795. select KERNEL_SECCOMP_FILTER
  796. default y if !SMALL_FLASH
  797. help
  798. Build kernel with support for seccomp.
  799. #
  800. # IPv4 configuration
  801. #
  802. config KERNEL_IP_MROUTE
  803. bool "Enable IPv4 multicast routing"
  804. default y
  805. help
  806. Multicast routing requires a multicast routing daemon in
  807. addition to kernel support.
  808. #
  809. # IPv6 configuration
  810. #
  811. config KERNEL_IPV6
  812. def_bool IPV6
  813. if KERNEL_IPV6
  814. config KERNEL_IPV6_MULTIPLE_TABLES
  815. def_bool y
  816. config KERNEL_IPV6_SUBTREES
  817. def_bool y
  818. config KERNEL_IPV6_MROUTE
  819. bool "Enable IPv6 multicast routing"
  820. default y
  821. help
  822. Multicast routing requires a multicast routing daemon in
  823. addition to kernel support.
  824. config KERNEL_IPV6_PIMSM_V2
  825. def_bool n
  826. config KERNEL_IPV6_SEG6_LWTUNNEL
  827. bool "Enable support for lightweight tunnels"
  828. default y if !SMALL_FLASH
  829. help
  830. Using lwtunnel (needed for IPv6 segment routing) requires ip-full package.
  831. config KERNEL_LWTUNNEL_BPF
  832. def_bool n
  833. endif
  834. #
  835. # NFS related symbols
  836. #
  837. config KERNEL_IP_PNP
  838. bool "Compile the kernel with rootfs on NFS"
  839. help
  840. If you want to make your kernel boot off a NFS server as root
  841. filesystem, select Y here.
  842. if KERNEL_IP_PNP
  843. config KERNEL_IP_PNP_DHCP
  844. def_bool y
  845. config KERNEL_IP_PNP_BOOTP
  846. def_bool n
  847. config KERNEL_IP_PNP_RARP
  848. def_bool n
  849. config KERNEL_NFS_FS
  850. def_bool y
  851. config KERNEL_NFS_V2
  852. def_bool y
  853. config KERNEL_NFS_V3
  854. def_bool y
  855. config KERNEL_ROOT_NFS
  856. def_bool y
  857. endif
  858. menu "Filesystem ACL and attr support options"
  859. config USE_FS_ACL_ATTR
  860. bool "Use filesystem ACL and attr support by default"
  861. default n
  862. help
  863. Make using ACLs (e.g. POSIX ACL, NFSv4 ACL) the default
  864. for kernel and packages, except tmpfs, flash filesystems,
  865. and old NFS. Also enable userspace extended attribute support
  866. by default. (OpenWrt already has an expection it will be
  867. present in the kernel).
  868. config KERNEL_FS_POSIX_ACL
  869. bool "Enable POSIX ACL support"
  870. default y if USE_FS_ACL_ATTR
  871. config KERNEL_BTRFS_FS_POSIX_ACL
  872. bool "Enable POSIX ACL for BtrFS Filesystems"
  873. select KERNEL_FS_POSIX_ACL
  874. default y if USE_FS_ACL_ATTR
  875. config KERNEL_EXT4_FS_POSIX_ACL
  876. bool "Enable POSIX ACL for Ext4 Filesystems"
  877. select KERNEL_FS_POSIX_ACL
  878. default y if USE_FS_ACL_ATTR
  879. config KERNEL_F2FS_FS_POSIX_ACL
  880. bool "Enable POSIX ACL for F2FS Filesystems"
  881. select KERNEL_FS_POSIX_ACL
  882. default n
  883. config KERNEL_JFFS2_FS_POSIX_ACL
  884. bool "Enable POSIX ACL for JFFS2 Filesystems"
  885. select KERNEL_FS_POSIX_ACL
  886. default n
  887. config KERNEL_TMPFS_POSIX_ACL
  888. bool "Enable POSIX ACL for TMPFS Filesystems"
  889. select KERNEL_FS_POSIX_ACL
  890. default n
  891. config KERNEL_CIFS_ACL
  892. bool "Enable CIFS ACLs"
  893. select KERNEL_FS_POSIX_ACL
  894. default y if USE_FS_ACL_ATTR
  895. config KERNEL_HFS_FS_POSIX_ACL
  896. bool "Enable POSIX ACL for HFS Filesystems"
  897. select KERNEL_FS_POSIX_ACL
  898. default y if USE_FS_ACL_ATTR
  899. config KERNEL_HFSPLUS_FS_POSIX_ACL
  900. bool "Enable POSIX ACL for HFS+ Filesystems"
  901. select KERNEL_FS_POSIX_ACL
  902. default y if USE_FS_ACL_ATTR
  903. config KERNEL_NFS_ACL_SUPPORT
  904. bool "Enable ACLs for NFS"
  905. default y if USE_FS_ACL_ATTR
  906. config KERNEL_NFS_V3_ACL_SUPPORT
  907. bool "Enable ACLs for NFSv3"
  908. default n
  909. config KERNEL_NFSD_V2_ACL_SUPPORT
  910. bool "Enable ACLs for NFSDv2"
  911. default n
  912. config KERNEL_NFSD_V3_ACL_SUPPORT
  913. bool "Enable ACLs for NFSDv3"
  914. default n
  915. config KERNEL_REISER_FS_POSIX_ACL
  916. bool "Enable POSIX ACLs for ReiserFS"
  917. select KERNEL_FS_POSIX_ACL
  918. default y if USE_FS_ACL_ATTR
  919. config KERNEL_XFS_POSIX_ACL
  920. bool "Enable POSIX ACLs for XFS"
  921. select KERNEL_FS_POSIX_ACL
  922. default y if USE_FS_ACL_ATTR
  923. config KERNEL_JFS_POSIX_ACL
  924. bool "Enable POSIX ACLs for JFS"
  925. select KERNEL_FS_POSIX_ACL
  926. default y if USE_FS_ACL_ATTR
  927. endmenu
  928. config KERNEL_DEVMEM
  929. bool "/dev/mem virtual device support"
  930. help
  931. Say Y here if you want to support the /dev/mem device.
  932. The /dev/mem device is used to access areas of physical
  933. memory.
  934. config KERNEL_DEVKMEM
  935. bool "/dev/kmem virtual device support"
  936. help
  937. Say Y here if you want to support the /dev/kmem device. The
  938. /dev/kmem device is rarely used, but can be used for certain
  939. kind of kernel debugging operations.
  940. config KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE
  941. int "Number of squashfs fragments cached"
  942. default 2 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
  943. default 3
  944. config KERNEL_SQUASHFS_XATTR
  945. bool "Squashfs XATTR support"
  946. #
  947. # compile optimization setting
  948. #
  949. choice
  950. prompt "Compiler optimization level"
  951. default KERNEL_CC_OPTIMIZE_FOR_SIZE if SMALL_FLASH
  952. config KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE
  953. bool "Optimize for performance"
  954. help
  955. This is the default optimization level for the kernel, building
  956. with the "-O2" compiler flag for best performance and most
  957. helpful compile-time warnings.
  958. config KERNEL_CC_OPTIMIZE_FOR_SIZE
  959. bool "Optimize for size"
  960. help
  961. Enabling this option will pass "-Os" instead of "-O2" to
  962. your compiler resulting in a smaller kernel.
  963. endchoice
  964. config KERNEL_AUDIT
  965. bool "Auditing support"
  966. config KERNEL_SECURITY
  967. bool "Enable different security models"
  968. config KERNEL_SECURITY_NETWORK
  969. bool "Socket and Networking Security Hooks"
  970. select KERNEL_SECURITY
  971. config KERNEL_SECURITY_SELINUX
  972. bool "NSA SELinux Support"
  973. select KERNEL_SECURITY_NETWORK
  974. select KERNEL_AUDIT
  975. config KERNEL_SECURITY_SELINUX_BOOTPARAM
  976. bool "NSA SELinux boot parameter"
  977. depends on KERNEL_SECURITY_SELINUX
  978. default y
  979. config KERNEL_SECURITY_SELINUX_DISABLE
  980. bool "NSA SELinux runtime disable"
  981. depends on KERNEL_SECURITY_SELINUX
  982. config KERNEL_SECURITY_SELINUX_DEVELOP
  983. bool "NSA SELinux Development Support"
  984. depends on KERNEL_SECURITY_SELINUX
  985. default y
  986. config KERNEL_SECURITY_SELINUX_SIDTAB_HASH_BITS
  987. int
  988. depends on KERNEL_SECURITY_SELINUX
  989. default 9
  990. config KERNEL_SECURITY_SELINUX_SID2STR_CACHE_SIZE
  991. int
  992. depends on KERNEL_SECURITY_SELINUX
  993. default 256
  994. config KERNEL_LSM
  995. string
  996. default "lockdown,yama,loadpin,safesetid,integrity,selinux"
  997. depends on KERNEL_SECURITY_SELINUX
  998. config KERNEL_EXT4_FS_SECURITY
  999. bool "Ext4 Security Labels"
  1000. config KERNEL_F2FS_FS_SECURITY
  1001. bool "F2FS Security Labels"
  1002. config KERNEL_UBIFS_FS_SECURITY
  1003. bool "UBIFS Security Labels"
  1004. config KERNEL_JFFS2_FS_SECURITY
  1005. bool "JFFS2 Security Labels"