Config-kernel.in 34 KB

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