Kconfig 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522
  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. - seccomp syscall wired up
  267. config SECCOMP_FILTER
  268. def_bool y
  269. depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET
  270. help
  271. Enable tasks to build secure computing environments defined
  272. in terms of Berkeley Packet Filter programs which implement
  273. task-defined system call filtering polices.
  274. See Documentation/prctl/seccomp_filter.txt for details.
  275. config HAVE_CC_STACKPROTECTOR
  276. bool
  277. help
  278. An arch should select this symbol if:
  279. - its compiler supports the -fstack-protector option
  280. - it has implemented a stack canary (e.g. __stack_chk_guard)
  281. config CC_STACKPROTECTOR
  282. def_bool n
  283. help
  284. Set when a stack-protector mode is enabled, so that the build
  285. can enable kernel-side support for the GCC feature.
  286. choice
  287. prompt "Stack Protector buffer overflow detection"
  288. depends on HAVE_CC_STACKPROTECTOR
  289. default CC_STACKPROTECTOR_NONE
  290. help
  291. This option turns on the "stack-protector" GCC feature. This
  292. feature puts, at the beginning of functions, a canary value on
  293. the stack just before the return address, and validates
  294. the value just before actually returning. Stack based buffer
  295. overflows (that need to overwrite this return address) now also
  296. overwrite the canary, which gets detected and the attack is then
  297. neutralized via a kernel panic.
  298. config CC_STACKPROTECTOR_NONE
  299. bool "None"
  300. help
  301. Disable "stack-protector" GCC feature.
  302. config CC_STACKPROTECTOR_REGULAR
  303. bool "Regular"
  304. select CC_STACKPROTECTOR
  305. help
  306. Functions will have the stack-protector canary logic added if they
  307. have an 8-byte or larger character array on the stack.
  308. This feature requires gcc version 4.2 or above, or a distribution
  309. gcc with the feature backported ("-fstack-protector").
  310. On an x86 "defconfig" build, this feature adds canary checks to
  311. about 3% of all kernel functions, which increases kernel code size
  312. by about 0.3%.
  313. config CC_STACKPROTECTOR_STRONG
  314. bool "Strong"
  315. select CC_STACKPROTECTOR
  316. help
  317. Functions will have the stack-protector canary logic added in any
  318. of the following conditions:
  319. - local variable's address used as part of the right hand side of an
  320. assignment or function argument
  321. - local variable is an array (or union containing an array),
  322. regardless of array type or length
  323. - uses register local variables
  324. This feature requires gcc version 4.9 or above, or a distribution
  325. gcc with the feature backported ("-fstack-protector-strong").
  326. On an x86 "defconfig" build, this feature adds canary checks to
  327. about 20% of all kernel functions, which increases the kernel code
  328. size by about 2%.
  329. endchoice
  330. config HAVE_CONTEXT_TRACKING
  331. bool
  332. help
  333. Provide kernel/user boundaries probes necessary for subsystems
  334. that need it, such as userspace RCU extended quiescent state.
  335. Syscalls need to be wrapped inside user_exit()-user_enter() through
  336. the slow path using TIF_NOHZ flag. Exceptions handlers must be
  337. wrapped as well. Irqs are already protected inside
  338. rcu_irq_enter/rcu_irq_exit() but preemption or signal handling on
  339. irq exit still need to be protected.
  340. config HAVE_VIRT_CPU_ACCOUNTING
  341. bool
  342. config HAVE_VIRT_CPU_ACCOUNTING_GEN
  343. bool
  344. default y if 64BIT
  345. help
  346. With VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit.
  347. Before enabling this option, arch code must be audited
  348. to ensure there are no races in concurrent read/write of
  349. cputime_t. For example, reading/writing 64-bit cputime_t on
  350. some 32-bit arches may require multiple accesses, so proper
  351. locking is needed to protect against concurrent accesses.
  352. config HAVE_IRQ_TIME_ACCOUNTING
  353. bool
  354. help
  355. Archs need to ensure they use a high enough resolution clock to
  356. support irq time accounting and then call enable_sched_clock_irqtime().
  357. config HAVE_ARCH_TRANSPARENT_HUGEPAGE
  358. bool
  359. config HAVE_ARCH_SOFT_DIRTY
  360. bool
  361. config HAVE_MOD_ARCH_SPECIFIC
  362. bool
  363. help
  364. The arch uses struct mod_arch_specific to store data. Many arches
  365. just need a simple module loader without arch specific data - those
  366. should not enable this.
  367. config MODULES_USE_ELF_RELA
  368. bool
  369. help
  370. Modules only use ELF RELA relocations. Modules with ELF REL
  371. relocations will give an error.
  372. config MODULES_USE_ELF_REL
  373. bool
  374. help
  375. Modules only use ELF REL relocations. Modules with ELF RELA
  376. relocations will give an error.
  377. config HAVE_UNDERSCORE_SYMBOL_PREFIX
  378. bool
  379. help
  380. Some architectures generate an _ in front of C symbols; things like
  381. module loading and assembly files need to know about this.
  382. config HAVE_IRQ_EXIT_ON_IRQ_STACK
  383. bool
  384. help
  385. Architecture doesn't only execute the irq handler on the irq stack
  386. but also irq_exit(). This way we can process softirqs on this irq
  387. stack instead of switching to a new one when we call __do_softirq()
  388. in the end of an hardirq.
  389. This spares a stack switch and improves cache usage on softirq
  390. processing.
  391. #
  392. # ABI hall of shame
  393. #
  394. config CLONE_BACKWARDS
  395. bool
  396. help
  397. Architecture has tls passed as the 4th argument of clone(2),
  398. not the 5th one.
  399. config CLONE_BACKWARDS2
  400. bool
  401. help
  402. Architecture has the first two arguments of clone(2) swapped.
  403. config CLONE_BACKWARDS3
  404. bool
  405. help
  406. Architecture has tls passed as the 3rd argument of clone(2),
  407. not the 5th one.
  408. config ODD_RT_SIGACTION
  409. bool
  410. help
  411. Architecture has unusual rt_sigaction(2) arguments
  412. config OLD_SIGSUSPEND
  413. bool
  414. help
  415. Architecture has old sigsuspend(2) syscall, of one-argument variety
  416. config OLD_SIGSUSPEND3
  417. bool
  418. help
  419. Even weirder antique ABI - three-argument sigsuspend(2)
  420. config OLD_SIGACTION
  421. bool
  422. help
  423. Architecture has old sigaction(2) syscall. Nope, not the same
  424. as OLD_SIGSUSPEND | OLD_SIGSUSPEND3 - alpha has sigsuspend(2),
  425. but fairly different variant of sigaction(2), thanks to OSF/1
  426. compatibility...
  427. config COMPAT_OLD_SIGACTION
  428. bool
  429. source "kernel/gcov/Kconfig"