Kconfig 16 KB

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