Kconfig 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641
  1. #
  2. # General architecture dependent options
  3. #
  4. config KEXEC_CORE
  5. bool
  6. config OPROFILE
  7. tristate "OProfile system profiling"
  8. depends on PROFILING
  9. depends on HAVE_OPROFILE
  10. select RING_BUFFER
  11. select RING_BUFFER_ALLOW_SWAP
  12. help
  13. OProfile is a profiling system capable of profiling the
  14. whole system, include the kernel, kernel modules, libraries,
  15. and applications.
  16. If unsure, say N.
  17. config OPROFILE_EVENT_MULTIPLEX
  18. bool "OProfile multiplexing support (EXPERIMENTAL)"
  19. default n
  20. depends on OPROFILE && X86
  21. help
  22. The number of hardware counters is limited. The multiplexing
  23. feature enables OProfile to gather more events than counters
  24. are provided by the hardware. This is realized by switching
  25. between events at an user specified time interval.
  26. If unsure, say N.
  27. config HAVE_OPROFILE
  28. bool
  29. config OPROFILE_NMI_TIMER
  30. def_bool y
  31. depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !PPC64
  32. config KPROBES
  33. bool "Kprobes"
  34. depends on MODULES
  35. depends on HAVE_KPROBES
  36. select KALLSYMS
  37. help
  38. Kprobes allows you to trap at almost any kernel address and
  39. execute a callback function. register_kprobe() establishes
  40. a probepoint and specifies the callback. Kprobes is useful
  41. for kernel debugging, non-intrusive instrumentation and testing.
  42. If in doubt, say "N".
  43. config JUMP_LABEL
  44. bool "Optimize very unlikely/likely branches"
  45. depends on HAVE_ARCH_JUMP_LABEL
  46. help
  47. This option enables a transparent branch optimization that
  48. makes certain almost-always-true or almost-always-false branch
  49. conditions even cheaper to execute within the kernel.
  50. Certain performance-sensitive kernel code, such as trace points,
  51. scheduler functionality, networking code and KVM have such
  52. branches and include support for this optimization technique.
  53. If it is detected that the compiler has support for "asm goto",
  54. the kernel will compile such branches with just a nop
  55. instruction. When the condition flag is toggled to true, the
  56. nop will be converted to a jump instruction to execute the
  57. conditional block of instructions.
  58. This technique lowers overhead and stress on the branch prediction
  59. of the processor and generally makes the kernel faster. The update
  60. of the condition is slower, but those are always very rare.
  61. ( On 32-bit x86, the necessary options added to the compiler
  62. flags may increase the size of the kernel slightly. )
  63. config STATIC_KEYS_SELFTEST
  64. bool "Static key selftest"
  65. depends on JUMP_LABEL
  66. help
  67. Boot time self-test of the branch patching code.
  68. config OPTPROBES
  69. def_bool y
  70. depends on KPROBES && HAVE_OPTPROBES
  71. depends on !PREEMPT
  72. config KPROBES_ON_FTRACE
  73. def_bool y
  74. depends on KPROBES && HAVE_KPROBES_ON_FTRACE
  75. depends on DYNAMIC_FTRACE_WITH_REGS
  76. help
  77. If function tracer is enabled and the arch supports full
  78. passing of pt_regs to function tracing, then kprobes can
  79. optimize on top of function tracing.
  80. config UPROBES
  81. def_bool n
  82. help
  83. Uprobes is the user-space counterpart to kprobes: they
  84. enable instrumentation applications (such as 'perf probe')
  85. to establish unintrusive probes in user-space binaries and
  86. libraries, by executing handler functions when the probes
  87. are hit by user-space applications.
  88. ( These probes come in the form of single-byte breakpoints,
  89. managed by the kernel and kept transparent to the probed
  90. application. )
  91. config HAVE_64BIT_ALIGNED_ACCESS
  92. def_bool 64BIT && !HAVE_EFFICIENT_UNALIGNED_ACCESS
  93. help
  94. Some architectures require 64 bit accesses to be 64 bit
  95. aligned, which also requires structs containing 64 bit values
  96. to be 64 bit aligned too. This includes some 32 bit
  97. architectures which can do 64 bit accesses, as well as 64 bit
  98. architectures without unaligned access.
  99. This symbol should be selected by an architecture if 64 bit
  100. accesses are required to be 64 bit aligned in this way even
  101. though it is not a 64 bit architecture.
  102. See Documentation/unaligned-memory-access.txt for more
  103. information on the topic of unaligned memory accesses.
  104. config HAVE_EFFICIENT_UNALIGNED_ACCESS
  105. bool
  106. help
  107. Some architectures are unable to perform unaligned accesses
  108. without the use of get_unaligned/put_unaligned. Others are
  109. unable to perform such accesses efficiently (e.g. trap on
  110. unaligned access and require fixing it up in the exception
  111. handler.)
  112. This symbol should be selected by an architecture if it can
  113. perform unaligned accesses efficiently to allow different
  114. code paths to be selected for these cases. Some network
  115. drivers, for example, could opt to not fix up alignment
  116. problems with received packets if doing so would not help
  117. much.
  118. See Documentation/unaligned-memory-access.txt for more
  119. information on the topic of unaligned memory accesses.
  120. config ARCH_USE_BUILTIN_BSWAP
  121. bool
  122. help
  123. Modern versions of GCC (since 4.4) have builtin functions
  124. for handling byte-swapping. Using these, instead of the old
  125. inline assembler that the architecture code provides in the
  126. __arch_bswapXX() macros, allows the compiler to see what's
  127. happening and offers more opportunity for optimisation. In
  128. particular, the compiler will be able to combine the byteswap
  129. with a nearby load or store and use load-and-swap or
  130. store-and-swap instructions if the architecture has them. It
  131. should almost *never* result in code which is worse than the
  132. hand-coded assembler in <asm/swab.h>. But just in case it
  133. does, the use of the builtins is optional.
  134. Any architecture with load-and-swap or store-and-swap
  135. instructions should set this. And it shouldn't hurt to set it
  136. on architectures that don't have such instructions.
  137. config KRETPROBES
  138. def_bool y
  139. depends on KPROBES && HAVE_KRETPROBES
  140. config USER_RETURN_NOTIFIER
  141. bool
  142. depends on HAVE_USER_RETURN_NOTIFIER
  143. help
  144. Provide a kernel-internal notification when a cpu is about to
  145. switch to user mode.
  146. config HAVE_IOREMAP_PROT
  147. bool
  148. config HAVE_KPROBES
  149. bool
  150. config HAVE_KRETPROBES
  151. bool
  152. config HAVE_OPTPROBES
  153. bool
  154. config HAVE_KPROBES_ON_FTRACE
  155. bool
  156. config HAVE_NMI_WATCHDOG
  157. bool
  158. #
  159. # An arch should select this if it provides all these things:
  160. #
  161. # task_pt_regs() in asm/processor.h or asm/ptrace.h
  162. # arch_has_single_step() if there is hardware single-step support
  163. # arch_has_block_step() if there is hardware block-step support
  164. # asm/syscall.h supplying asm-generic/syscall.h interface
  165. # linux/regset.h user_regset interfaces
  166. # CORE_DUMP_USE_REGSET #define'd in linux/elf.h
  167. # TIF_SYSCALL_TRACE calls tracehook_report_syscall_{entry,exit}
  168. # TIF_NOTIFY_RESUME calls tracehook_notify_resume()
  169. # signal delivery calls tracehook_signal_handler()
  170. #
  171. config HAVE_ARCH_TRACEHOOK
  172. bool
  173. config HAVE_DMA_CONTIGUOUS
  174. bool
  175. config GENERIC_SMP_IDLE_THREAD
  176. bool
  177. config GENERIC_IDLE_POLL_SETUP
  178. bool
  179. # Select if arch init_task initializer is different to init/init_task.c
  180. config ARCH_INIT_TASK
  181. bool
  182. # Select if arch has its private alloc_task_struct() function
  183. config ARCH_TASK_STRUCT_ALLOCATOR
  184. bool
  185. # Select if arch has its private alloc_thread_info() function
  186. config ARCH_THREAD_INFO_ALLOCATOR
  187. bool
  188. # Select if arch wants to size task_struct dynamically via arch_task_struct_size:
  189. config ARCH_WANTS_DYNAMIC_TASK_STRUCT
  190. bool
  191. config HAVE_REGS_AND_STACK_ACCESS_API
  192. bool
  193. help
  194. This symbol should be selected by an architecure if it supports
  195. the API needed to access registers and stack entries from pt_regs,
  196. declared in asm/ptrace.h
  197. For example the kprobes-based event tracer needs this API.
  198. config HAVE_CLK
  199. bool
  200. help
  201. The <linux/clk.h> calls support software clock gating and
  202. thus are a key power management tool on many systems.
  203. config HAVE_DMA_API_DEBUG
  204. bool
  205. config HAVE_HW_BREAKPOINT
  206. bool
  207. depends on PERF_EVENTS
  208. config HAVE_MIXED_BREAKPOINTS_REGS
  209. bool
  210. depends on HAVE_HW_BREAKPOINT
  211. help
  212. Depending on the arch implementation of hardware breakpoints,
  213. some of them have separate registers for data and instruction
  214. breakpoints addresses, others have mixed registers to store
  215. them but define the access type in a control register.
  216. Select this option if your arch implements breakpoints under the
  217. latter fashion.
  218. config HAVE_USER_RETURN_NOTIFIER
  219. bool
  220. config HAVE_PERF_EVENTS_NMI
  221. bool
  222. help
  223. System hardware can generate an NMI using the perf event
  224. subsystem. Also has support for calculating CPU cycle events
  225. to determine how many clock cycles in a given period.
  226. config HAVE_PERF_REGS
  227. bool
  228. help
  229. Support selective register dumps for perf events. This includes
  230. bit-mapping of each registers and a unique architecture id.
  231. config HAVE_PERF_USER_STACK_DUMP
  232. bool
  233. help
  234. Support user stack dumps for perf event samples. This needs
  235. access to the user stack pointer which is not unified across
  236. architectures.
  237. config HAVE_ARCH_JUMP_LABEL
  238. bool
  239. config HAVE_RCU_TABLE_FREE
  240. bool
  241. config ARCH_HAVE_NMI_SAFE_CMPXCHG
  242. bool
  243. config HAVE_ALIGNED_STRUCT_PAGE
  244. bool
  245. help
  246. This makes sure that struct pages are double word aligned and that
  247. e.g. the SLUB allocator can perform double word atomic operations
  248. on a struct page for better performance. However selecting this
  249. might increase the size of a struct page by a word.
  250. config HAVE_CMPXCHG_LOCAL
  251. bool
  252. config HAVE_CMPXCHG_DOUBLE
  253. bool
  254. config ARCH_WANT_IPC_PARSE_VERSION
  255. bool
  256. config ARCH_WANT_COMPAT_IPC_PARSE_VERSION
  257. bool
  258. config ARCH_WANT_OLD_COMPAT_IPC
  259. select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
  260. bool
  261. config HAVE_ARCH_SECCOMP_FILTER
  262. bool
  263. help
  264. An arch should select this symbol if it provides all of these things:
  265. - syscall_get_arch()
  266. - syscall_get_arguments()
  267. - syscall_rollback()
  268. - syscall_set_return_value()
  269. - SIGSYS siginfo_t support
  270. - secure_computing is called from a ptrace_event()-safe context
  271. - secure_computing return value is checked and a return value of -1
  272. results in the system call being skipped immediately.
  273. - seccomp syscall wired up
  274. For best performance, an arch should use seccomp_phase1 and
  275. seccomp_phase2 directly. It should call seccomp_phase1 for all
  276. syscalls if TIF_SECCOMP is set, but seccomp_phase1 does not
  277. need to be called from a ptrace-safe context. It must then
  278. call seccomp_phase2 if seccomp_phase1 returns anything other
  279. than SECCOMP_PHASE1_OK or SECCOMP_PHASE1_SKIP.
  280. As an additional optimization, an arch may provide seccomp_data
  281. directly to seccomp_phase1; this avoids multiple calls
  282. to the syscall_xyz helpers for every syscall.
  283. config SECCOMP_FILTER
  284. def_bool y
  285. depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET
  286. help
  287. Enable tasks to build secure computing environments defined
  288. in terms of Berkeley Packet Filter programs which implement
  289. task-defined system call filtering polices.
  290. See Documentation/prctl/seccomp_filter.txt for details.
  291. config HAVE_CC_STACKPROTECTOR
  292. bool
  293. help
  294. An arch should select this symbol if:
  295. - its compiler supports the -fstack-protector option
  296. - it has implemented a stack canary (e.g. __stack_chk_guard)
  297. config CC_STACKPROTECTOR
  298. def_bool n
  299. help
  300. Set when a stack-protector mode is enabled, so that the build
  301. can enable kernel-side support for the GCC feature.
  302. choice
  303. prompt "Stack Protector buffer overflow detection"
  304. depends on HAVE_CC_STACKPROTECTOR
  305. default CC_STACKPROTECTOR_NONE
  306. help
  307. This option turns on the "stack-protector" GCC feature. This
  308. feature puts, at the beginning of functions, a canary value on
  309. the stack just before the return address, and validates
  310. the value just before actually returning. Stack based buffer
  311. overflows (that need to overwrite this return address) now also
  312. overwrite the canary, which gets detected and the attack is then
  313. neutralized via a kernel panic.
  314. config CC_STACKPROTECTOR_NONE
  315. bool "None"
  316. help
  317. Disable "stack-protector" GCC feature.
  318. config CC_STACKPROTECTOR_REGULAR
  319. bool "Regular"
  320. select CC_STACKPROTECTOR
  321. help
  322. Functions will have the stack-protector canary logic added if they
  323. have an 8-byte or larger character array on the stack.
  324. This feature requires gcc version 4.2 or above, or a distribution
  325. gcc with the feature backported ("-fstack-protector").
  326. On an x86 "defconfig" build, this feature adds canary checks to
  327. about 3% of all kernel functions, which increases kernel code size
  328. by about 0.3%.
  329. config CC_STACKPROTECTOR_STRONG
  330. bool "Strong"
  331. select CC_STACKPROTECTOR
  332. help
  333. Functions will have the stack-protector canary logic added in any
  334. of the following conditions:
  335. - local variable's address used as part of the right hand side of an
  336. assignment or function argument
  337. - local variable is an array (or union containing an array),
  338. regardless of array type or length
  339. - uses register local variables
  340. This feature requires gcc version 4.9 or above, or a distribution
  341. gcc with the feature backported ("-fstack-protector-strong").
  342. On an x86 "defconfig" build, this feature adds canary checks to
  343. about 20% of all kernel functions, which increases the kernel code
  344. size by about 2%.
  345. endchoice
  346. config HAVE_CONTEXT_TRACKING
  347. bool
  348. help
  349. Provide kernel/user boundaries probes necessary for subsystems
  350. that need it, such as userspace RCU extended quiescent state.
  351. Syscalls need to be wrapped inside user_exit()-user_enter() through
  352. the slow path using TIF_NOHZ flag. Exceptions handlers must be
  353. wrapped as well. Irqs are already protected inside
  354. rcu_irq_enter/rcu_irq_exit() but preemption or signal handling on
  355. irq exit still need to be protected.
  356. config HAVE_VIRT_CPU_ACCOUNTING
  357. bool
  358. config HAVE_VIRT_CPU_ACCOUNTING_GEN
  359. bool
  360. default y if 64BIT
  361. help
  362. With VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit.
  363. Before enabling this option, arch code must be audited
  364. to ensure there are no races in concurrent read/write of
  365. cputime_t. For example, reading/writing 64-bit cputime_t on
  366. some 32-bit arches may require multiple accesses, so proper
  367. locking is needed to protect against concurrent accesses.
  368. config HAVE_IRQ_TIME_ACCOUNTING
  369. bool
  370. help
  371. Archs need to ensure they use a high enough resolution clock to
  372. support irq time accounting and then call enable_sched_clock_irqtime().
  373. config HAVE_ARCH_TRANSPARENT_HUGEPAGE
  374. bool
  375. config HAVE_ARCH_HUGE_VMAP
  376. bool
  377. config HAVE_ARCH_SOFT_DIRTY
  378. bool
  379. config HAVE_MOD_ARCH_SPECIFIC
  380. bool
  381. help
  382. The arch uses struct mod_arch_specific to store data. Many arches
  383. just need a simple module loader without arch specific data - those
  384. should not enable this.
  385. config MODULES_USE_ELF_RELA
  386. bool
  387. help
  388. Modules only use ELF RELA relocations. Modules with ELF REL
  389. relocations will give an error.
  390. config MODULES_USE_ELF_REL
  391. bool
  392. help
  393. Modules only use ELF REL relocations. Modules with ELF RELA
  394. relocations will give an error.
  395. config HAVE_UNDERSCORE_SYMBOL_PREFIX
  396. bool
  397. help
  398. Some architectures generate an _ in front of C symbols; things like
  399. module loading and assembly files need to know about this.
  400. config HAVE_IRQ_EXIT_ON_IRQ_STACK
  401. bool
  402. help
  403. Architecture doesn't only execute the irq handler on the irq stack
  404. but also irq_exit(). This way we can process softirqs on this irq
  405. stack instead of switching to a new one when we call __do_softirq()
  406. in the end of an hardirq.
  407. This spares a stack switch and improves cache usage on softirq
  408. processing.
  409. config PGTABLE_LEVELS
  410. int
  411. default 2
  412. config ARCH_HAS_ELF_RANDOMIZE
  413. bool
  414. help
  415. An architecture supports choosing randomized locations for
  416. stack, mmap, brk, and ET_DYN. Defined functions:
  417. - arch_mmap_rnd()
  418. - arch_randomize_brk()
  419. config HAVE_ARCH_MMAP_RND_BITS
  420. bool
  421. help
  422. An arch should select this symbol if it supports setting a variable
  423. number of bits for use in establishing the base address for mmap
  424. allocations, has MMU enabled and provides values for both:
  425. - ARCH_MMAP_RND_BITS_MIN
  426. - ARCH_MMAP_RND_BITS_MAX
  427. config ARCH_MMAP_RND_BITS_MIN
  428. int
  429. config ARCH_MMAP_RND_BITS_MAX
  430. int
  431. config ARCH_MMAP_RND_BITS_DEFAULT
  432. int
  433. config ARCH_MMAP_RND_BITS
  434. int "Number of bits to use for ASLR of mmap base address" if EXPERT
  435. range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX
  436. default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT
  437. default ARCH_MMAP_RND_BITS_MIN
  438. depends on HAVE_ARCH_MMAP_RND_BITS
  439. help
  440. This value can be used to select the number of bits to use to
  441. determine the random offset to the base address of vma regions
  442. resulting from mmap allocations. This value will be bounded
  443. by the architecture's minimum and maximum supported values.
  444. This value can be changed after boot using the
  445. /proc/sys/vm/mmap_rnd_bits tunable
  446. config HAVE_ARCH_MMAP_RND_COMPAT_BITS
  447. bool
  448. help
  449. An arch should select this symbol if it supports running applications
  450. in compatibility mode, supports setting a variable number of bits for
  451. use in establishing the base address for mmap allocations, has MMU
  452. enabled and provides values for both:
  453. - ARCH_MMAP_RND_COMPAT_BITS_MIN
  454. - ARCH_MMAP_RND_COMPAT_BITS_MAX
  455. config ARCH_MMAP_RND_COMPAT_BITS_MIN
  456. int
  457. config ARCH_MMAP_RND_COMPAT_BITS_MAX
  458. int
  459. config ARCH_MMAP_RND_COMPAT_BITS_DEFAULT
  460. int
  461. config ARCH_MMAP_RND_COMPAT_BITS
  462. int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT
  463. range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX
  464. default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT
  465. default ARCH_MMAP_RND_COMPAT_BITS_MIN
  466. depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS
  467. help
  468. This value can be used to select the number of bits to use to
  469. determine the random offset to the base address of vma regions
  470. resulting from mmap allocations for compatible applications This
  471. value will be bounded by the architecture's minimum and maximum
  472. supported values.
  473. This value can be changed after boot using the
  474. /proc/sys/vm/mmap_rnd_compat_bits tunable
  475. config HAVE_COPY_THREAD_TLS
  476. bool
  477. help
  478. Architecture provides copy_thread_tls to accept tls argument via
  479. normal C parameter passing, rather than extracting the syscall
  480. argument from pt_regs.
  481. config HAVE_STACK_VALIDATION
  482. bool
  483. help
  484. Architecture supports the 'objtool check' host tool command, which
  485. performs compile-time stack metadata validation.
  486. #
  487. # ABI hall of shame
  488. #
  489. config CLONE_BACKWARDS
  490. bool
  491. help
  492. Architecture has tls passed as the 4th argument of clone(2),
  493. not the 5th one.
  494. config CLONE_BACKWARDS2
  495. bool
  496. help
  497. Architecture has the first two arguments of clone(2) swapped.
  498. config CLONE_BACKWARDS3
  499. bool
  500. help
  501. Architecture has tls passed as the 3rd argument of clone(2),
  502. not the 5th one.
  503. config ODD_RT_SIGACTION
  504. bool
  505. help
  506. Architecture has unusual rt_sigaction(2) arguments
  507. config OLD_SIGSUSPEND
  508. bool
  509. help
  510. Architecture has old sigsuspend(2) syscall, of one-argument variety
  511. config OLD_SIGSUSPEND3
  512. bool
  513. help
  514. Even weirder antique ABI - three-argument sigsuspend(2)
  515. config OLD_SIGACTION
  516. bool
  517. help
  518. Architecture has old sigaction(2) syscall. Nope, not the same
  519. as OLD_SIGSUSPEND | OLD_SIGSUSPEND3 - alpha has sigsuspend(2),
  520. but fairly different variant of sigaction(2), thanks to OSF/1
  521. compatibility...
  522. config COMPAT_OLD_SIGACTION
  523. bool
  524. config ARCH_NO_COHERENT_DMA_MMAP
  525. bool
  526. source "kernel/gcov/Kconfig"