Kconfig 16 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567
  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_ATTRS
  174. bool
  175. config HAVE_DMA_CONTIGUOUS
  176. bool
  177. config GENERIC_SMP_IDLE_THREAD
  178. bool
  179. config GENERIC_IDLE_POLL_SETUP
  180. bool
  181. # Select if arch init_task initializer is different to init/init_task.c
  182. config ARCH_INIT_TASK
  183. bool
  184. # Select if arch has its private alloc_task_struct() function
  185. config ARCH_TASK_STRUCT_ALLOCATOR
  186. bool
  187. # Select if arch has its private alloc_thread_info() function
  188. config ARCH_THREAD_INFO_ALLOCATOR
  189. bool
  190. # Select if arch wants to size task_struct dynamically via arch_task_struct_size:
  191. config ARCH_WANTS_DYNAMIC_TASK_STRUCT
  192. bool
  193. config HAVE_REGS_AND_STACK_ACCESS_API
  194. bool
  195. help
  196. This symbol should be selected by an architecure if it supports
  197. the API needed to access registers and stack entries from pt_regs,
  198. declared in asm/ptrace.h
  199. For example the kprobes-based event tracer needs this API.
  200. config HAVE_CLK
  201. bool
  202. help
  203. The <linux/clk.h> calls support software clock gating and
  204. thus are a key power management tool on many systems.
  205. config HAVE_DMA_API_DEBUG
  206. bool
  207. config HAVE_HW_BREAKPOINT
  208. bool
  209. depends on PERF_EVENTS
  210. config HAVE_MIXED_BREAKPOINTS_REGS
  211. bool
  212. depends on HAVE_HW_BREAKPOINT
  213. help
  214. Depending on the arch implementation of hardware breakpoints,
  215. some of them have separate registers for data and instruction
  216. breakpoints addresses, others have mixed registers to store
  217. them but define the access type in a control register.
  218. Select this option if your arch implements breakpoints under the
  219. latter fashion.
  220. config HAVE_USER_RETURN_NOTIFIER
  221. bool
  222. config HAVE_PERF_EVENTS_NMI
  223. bool
  224. help
  225. System hardware can generate an NMI using the perf event
  226. subsystem. Also has support for calculating CPU cycle events
  227. to determine how many clock cycles in a given period.
  228. config HAVE_PERF_REGS
  229. bool
  230. help
  231. Support selective register dumps for perf events. This includes
  232. bit-mapping of each registers and a unique architecture id.
  233. config HAVE_PERF_USER_STACK_DUMP
  234. bool
  235. help
  236. Support user stack dumps for perf event samples. This needs
  237. access to the user stack pointer which is not unified across
  238. architectures.
  239. config HAVE_ARCH_JUMP_LABEL
  240. bool
  241. config HAVE_RCU_TABLE_FREE
  242. bool
  243. config ARCH_HAVE_NMI_SAFE_CMPXCHG
  244. bool
  245. config HAVE_ALIGNED_STRUCT_PAGE
  246. bool
  247. help
  248. This makes sure that struct pages are double word aligned and that
  249. e.g. the SLUB allocator can perform double word atomic operations
  250. on a struct page for better performance. However selecting this
  251. might increase the size of a struct page by a word.
  252. config HAVE_CMPXCHG_LOCAL
  253. bool
  254. config HAVE_CMPXCHG_DOUBLE
  255. bool
  256. config ARCH_WANT_IPC_PARSE_VERSION
  257. bool
  258. config ARCH_WANT_COMPAT_IPC_PARSE_VERSION
  259. bool
  260. config ARCH_WANT_OLD_COMPAT_IPC
  261. select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
  262. bool
  263. config HAVE_ARCH_SECCOMP_FILTER
  264. bool
  265. help
  266. An arch should select this symbol if it provides all of these things:
  267. - syscall_get_arch()
  268. - syscall_get_arguments()
  269. - syscall_rollback()
  270. - syscall_set_return_value()
  271. - SIGSYS siginfo_t support
  272. - secure_computing is called from a ptrace_event()-safe context
  273. - secure_computing return value is checked and a return value of -1
  274. results in the system call being skipped immediately.
  275. - seccomp syscall wired up
  276. For best performance, an arch should use seccomp_phase1 and
  277. seccomp_phase2 directly. It should call seccomp_phase1 for all
  278. syscalls if TIF_SECCOMP is set, but seccomp_phase1 does not
  279. need to be called from a ptrace-safe context. It must then
  280. call seccomp_phase2 if seccomp_phase1 returns anything other
  281. than SECCOMP_PHASE1_OK or SECCOMP_PHASE1_SKIP.
  282. As an additional optimization, an arch may provide seccomp_data
  283. directly to seccomp_phase1; this avoids multiple calls
  284. to the syscall_xyz helpers for every syscall.
  285. config SECCOMP_FILTER
  286. def_bool y
  287. depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET
  288. help
  289. Enable tasks to build secure computing environments defined
  290. in terms of Berkeley Packet Filter programs which implement
  291. task-defined system call filtering polices.
  292. See Documentation/prctl/seccomp_filter.txt for details.
  293. config HAVE_CC_STACKPROTECTOR
  294. bool
  295. help
  296. An arch should select this symbol if:
  297. - its compiler supports the -fstack-protector option
  298. - it has implemented a stack canary (e.g. __stack_chk_guard)
  299. config CC_STACKPROTECTOR
  300. def_bool n
  301. help
  302. Set when a stack-protector mode is enabled, so that the build
  303. can enable kernel-side support for the GCC feature.
  304. choice
  305. prompt "Stack Protector buffer overflow detection"
  306. depends on HAVE_CC_STACKPROTECTOR
  307. default CC_STACKPROTECTOR_NONE
  308. help
  309. This option turns on the "stack-protector" GCC feature. This
  310. feature puts, at the beginning of functions, a canary value on
  311. the stack just before the return address, and validates
  312. the value just before actually returning. Stack based buffer
  313. overflows (that need to overwrite this return address) now also
  314. overwrite the canary, which gets detected and the attack is then
  315. neutralized via a kernel panic.
  316. config CC_STACKPROTECTOR_NONE
  317. bool "None"
  318. help
  319. Disable "stack-protector" GCC feature.
  320. config CC_STACKPROTECTOR_REGULAR
  321. bool "Regular"
  322. select CC_STACKPROTECTOR
  323. help
  324. Functions will have the stack-protector canary logic added if they
  325. have an 8-byte or larger character array on the stack.
  326. This feature requires gcc version 4.2 or above, or a distribution
  327. gcc with the feature backported ("-fstack-protector").
  328. On an x86 "defconfig" build, this feature adds canary checks to
  329. about 3% of all kernel functions, which increases kernel code size
  330. by about 0.3%.
  331. config CC_STACKPROTECTOR_STRONG
  332. bool "Strong"
  333. select CC_STACKPROTECTOR
  334. help
  335. Functions will have the stack-protector canary logic added in any
  336. of the following conditions:
  337. - local variable's address used as part of the right hand side of an
  338. assignment or function argument
  339. - local variable is an array (or union containing an array),
  340. regardless of array type or length
  341. - uses register local variables
  342. This feature requires gcc version 4.9 or above, or a distribution
  343. gcc with the feature backported ("-fstack-protector-strong").
  344. On an x86 "defconfig" build, this feature adds canary checks to
  345. about 20% of all kernel functions, which increases the kernel code
  346. size by about 2%.
  347. endchoice
  348. config HAVE_CONTEXT_TRACKING
  349. bool
  350. help
  351. Provide kernel/user boundaries probes necessary for subsystems
  352. that need it, such as userspace RCU extended quiescent state.
  353. Syscalls need to be wrapped inside user_exit()-user_enter() through
  354. the slow path using TIF_NOHZ flag. Exceptions handlers must be
  355. wrapped as well. Irqs are already protected inside
  356. rcu_irq_enter/rcu_irq_exit() but preemption or signal handling on
  357. irq exit still need to be protected.
  358. config HAVE_VIRT_CPU_ACCOUNTING
  359. bool
  360. config HAVE_VIRT_CPU_ACCOUNTING_GEN
  361. bool
  362. default y if 64BIT
  363. help
  364. With VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit.
  365. Before enabling this option, arch code must be audited
  366. to ensure there are no races in concurrent read/write of
  367. cputime_t. For example, reading/writing 64-bit cputime_t on
  368. some 32-bit arches may require multiple accesses, so proper
  369. locking is needed to protect against concurrent accesses.
  370. config HAVE_IRQ_TIME_ACCOUNTING
  371. bool
  372. help
  373. Archs need to ensure they use a high enough resolution clock to
  374. support irq time accounting and then call enable_sched_clock_irqtime().
  375. config HAVE_ARCH_TRANSPARENT_HUGEPAGE
  376. bool
  377. config HAVE_ARCH_HUGE_VMAP
  378. bool
  379. config HAVE_ARCH_SOFT_DIRTY
  380. bool
  381. config HAVE_MOD_ARCH_SPECIFIC
  382. bool
  383. help
  384. The arch uses struct mod_arch_specific to store data. Many arches
  385. just need a simple module loader without arch specific data - those
  386. should not enable this.
  387. config MODULES_USE_ELF_RELA
  388. bool
  389. help
  390. Modules only use ELF RELA relocations. Modules with ELF REL
  391. relocations will give an error.
  392. config MODULES_USE_ELF_REL
  393. bool
  394. help
  395. Modules only use ELF REL relocations. Modules with ELF RELA
  396. relocations will give an error.
  397. config HAVE_UNDERSCORE_SYMBOL_PREFIX
  398. bool
  399. help
  400. Some architectures generate an _ in front of C symbols; things like
  401. module loading and assembly files need to know about this.
  402. config HAVE_IRQ_EXIT_ON_IRQ_STACK
  403. bool
  404. help
  405. Architecture doesn't only execute the irq handler on the irq stack
  406. but also irq_exit(). This way we can process softirqs on this irq
  407. stack instead of switching to a new one when we call __do_softirq()
  408. in the end of an hardirq.
  409. This spares a stack switch and improves cache usage on softirq
  410. processing.
  411. config PGTABLE_LEVELS
  412. int
  413. default 2
  414. config ARCH_HAS_ELF_RANDOMIZE
  415. bool
  416. help
  417. An architecture supports choosing randomized locations for
  418. stack, mmap, brk, and ET_DYN. Defined functions:
  419. - arch_mmap_rnd()
  420. - arch_randomize_brk()
  421. config HAVE_COPY_THREAD_TLS
  422. bool
  423. help
  424. Architecture provides copy_thread_tls to accept tls argument via
  425. normal C parameter passing, rather than extracting the syscall
  426. argument from pt_regs.
  427. #
  428. # ABI hall of shame
  429. #
  430. config CLONE_BACKWARDS
  431. bool
  432. help
  433. Architecture has tls passed as the 4th argument of clone(2),
  434. not the 5th one.
  435. config CLONE_BACKWARDS2
  436. bool
  437. help
  438. Architecture has the first two arguments of clone(2) swapped.
  439. config CLONE_BACKWARDS3
  440. bool
  441. help
  442. Architecture has tls passed as the 3rd argument of clone(2),
  443. not the 5th one.
  444. config ODD_RT_SIGACTION
  445. bool
  446. help
  447. Architecture has unusual rt_sigaction(2) arguments
  448. config OLD_SIGSUSPEND
  449. bool
  450. help
  451. Architecture has old sigsuspend(2) syscall, of one-argument variety
  452. config OLD_SIGSUSPEND3
  453. bool
  454. help
  455. Even weirder antique ABI - three-argument sigsuspend(2)
  456. config OLD_SIGACTION
  457. bool
  458. help
  459. Architecture has old sigaction(2) syscall. Nope, not the same
  460. as OLD_SIGSUSPEND | OLD_SIGSUSPEND3 - alpha has sigsuspend(2),
  461. but fairly different variant of sigaction(2), thanks to OSF/1
  462. compatibility...
  463. config COMPAT_OLD_SIGACTION
  464. bool
  465. source "kernel/gcov/Kconfig"