Config-kernel.in 34 KB

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