Config-kernel.in 36 KB

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