Kconfig 15 KB

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