Kconfig 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871
  1. # SPDX-License-Identifier: GPL-2.0
  2. #
  3. # General architecture dependent options
  4. #
  5. #
  6. # Note: arch/$(SRCARCH)/Kconfig needs to be included first so that it can
  7. # override the default values in this file.
  8. #
  9. source "arch/$(SRCARCH)/Kconfig"
  10. menu "General architecture-dependent options"
  11. config CRASH_CORE
  12. bool
  13. config KEXEC_CORE
  14. select CRASH_CORE
  15. bool
  16. config HAVE_IMA_KEXEC
  17. bool
  18. config HOTPLUG_SMT
  19. bool
  20. config OPROFILE
  21. tristate "OProfile system profiling"
  22. depends on PROFILING
  23. depends on HAVE_OPROFILE
  24. select RING_BUFFER
  25. select RING_BUFFER_ALLOW_SWAP
  26. help
  27. OProfile is a profiling system capable of profiling the
  28. whole system, include the kernel, kernel modules, libraries,
  29. and applications.
  30. If unsure, say N.
  31. config OPROFILE_EVENT_MULTIPLEX
  32. bool "OProfile multiplexing support (EXPERIMENTAL)"
  33. default n
  34. depends on OPROFILE && X86
  35. help
  36. The number of hardware counters is limited. The multiplexing
  37. feature enables OProfile to gather more events than counters
  38. are provided by the hardware. This is realized by switching
  39. between events at a user specified time interval.
  40. If unsure, say N.
  41. config HAVE_OPROFILE
  42. bool
  43. config OPROFILE_NMI_TIMER
  44. def_bool y
  45. depends on PERF_EVENTS && HAVE_PERF_EVENTS_NMI && !PPC64
  46. config KPROBES
  47. bool "Kprobes"
  48. depends on MODULES
  49. depends on HAVE_KPROBES
  50. select KALLSYMS
  51. help
  52. Kprobes allows you to trap at almost any kernel address and
  53. execute a callback function. register_kprobe() establishes
  54. a probepoint and specifies the callback. Kprobes is useful
  55. for kernel debugging, non-intrusive instrumentation and testing.
  56. If in doubt, say "N".
  57. config JUMP_LABEL
  58. bool "Optimize very unlikely/likely branches"
  59. depends on HAVE_ARCH_JUMP_LABEL
  60. depends on CC_HAS_ASM_GOTO
  61. help
  62. This option enables a transparent branch optimization that
  63. makes certain almost-always-true or almost-always-false branch
  64. conditions even cheaper to execute within the kernel.
  65. Certain performance-sensitive kernel code, such as trace points,
  66. scheduler functionality, networking code and KVM have such
  67. branches and include support for this optimization technique.
  68. If it is detected that the compiler has support for "asm goto",
  69. the kernel will compile such branches with just a nop
  70. instruction. When the condition flag is toggled to true, the
  71. nop will be converted to a jump instruction to execute the
  72. conditional block of instructions.
  73. This technique lowers overhead and stress on the branch prediction
  74. of the processor and generally makes the kernel faster. The update
  75. of the condition is slower, but those are always very rare.
  76. ( On 32-bit x86, the necessary options added to the compiler
  77. flags may increase the size of the kernel slightly. )
  78. config STATIC_KEYS_SELFTEST
  79. bool "Static key selftest"
  80. depends on JUMP_LABEL
  81. help
  82. Boot time self-test of the branch patching code.
  83. config OPTPROBES
  84. def_bool y
  85. depends on KPROBES && HAVE_OPTPROBES
  86. select TASKS_RCU if PREEMPT
  87. config KPROBES_ON_FTRACE
  88. def_bool y
  89. depends on KPROBES && HAVE_KPROBES_ON_FTRACE
  90. depends on DYNAMIC_FTRACE_WITH_REGS
  91. help
  92. If function tracer is enabled and the arch supports full
  93. passing of pt_regs to function tracing, then kprobes can
  94. optimize on top of function tracing.
  95. config UPROBES
  96. def_bool n
  97. depends on ARCH_SUPPORTS_UPROBES
  98. help
  99. Uprobes is the user-space counterpart to kprobes: they
  100. enable instrumentation applications (such as 'perf probe')
  101. to establish unintrusive probes in user-space binaries and
  102. libraries, by executing handler functions when the probes
  103. are hit by user-space applications.
  104. ( These probes come in the form of single-byte breakpoints,
  105. managed by the kernel and kept transparent to the probed
  106. application. )
  107. config HAVE_64BIT_ALIGNED_ACCESS
  108. def_bool 64BIT && !HAVE_EFFICIENT_UNALIGNED_ACCESS
  109. help
  110. Some architectures require 64 bit accesses to be 64 bit
  111. aligned, which also requires structs containing 64 bit values
  112. to be 64 bit aligned too. This includes some 32 bit
  113. architectures which can do 64 bit accesses, as well as 64 bit
  114. architectures without unaligned access.
  115. This symbol should be selected by an architecture if 64 bit
  116. accesses are required to be 64 bit aligned in this way even
  117. though it is not a 64 bit architecture.
  118. See Documentation/unaligned-memory-access.txt for more
  119. information on the topic of unaligned memory accesses.
  120. config HAVE_EFFICIENT_UNALIGNED_ACCESS
  121. bool
  122. help
  123. Some architectures are unable to perform unaligned accesses
  124. without the use of get_unaligned/put_unaligned. Others are
  125. unable to perform such accesses efficiently (e.g. trap on
  126. unaligned access and require fixing it up in the exception
  127. handler.)
  128. This symbol should be selected by an architecture if it can
  129. perform unaligned accesses efficiently to allow different
  130. code paths to be selected for these cases. Some network
  131. drivers, for example, could opt to not fix up alignment
  132. problems with received packets if doing so would not help
  133. much.
  134. See Documentation/unaligned-memory-access.txt for more
  135. information on the topic of unaligned memory accesses.
  136. config ARCH_USE_BUILTIN_BSWAP
  137. bool
  138. help
  139. Modern versions of GCC (since 4.4) have builtin functions
  140. for handling byte-swapping. Using these, instead of the old
  141. inline assembler that the architecture code provides in the
  142. __arch_bswapXX() macros, allows the compiler to see what's
  143. happening and offers more opportunity for optimisation. In
  144. particular, the compiler will be able to combine the byteswap
  145. with a nearby load or store and use load-and-swap or
  146. store-and-swap instructions if the architecture has them. It
  147. should almost *never* result in code which is worse than the
  148. hand-coded assembler in <asm/swab.h>. But just in case it
  149. does, the use of the builtins is optional.
  150. Any architecture with load-and-swap or store-and-swap
  151. instructions should set this. And it shouldn't hurt to set it
  152. on architectures that don't have such instructions.
  153. config KRETPROBES
  154. def_bool y
  155. depends on KPROBES && HAVE_KRETPROBES
  156. config USER_RETURN_NOTIFIER
  157. bool
  158. depends on HAVE_USER_RETURN_NOTIFIER
  159. help
  160. Provide a kernel-internal notification when a cpu is about to
  161. switch to user mode.
  162. config HAVE_IOREMAP_PROT
  163. bool
  164. config HAVE_KPROBES
  165. bool
  166. config HAVE_KRETPROBES
  167. bool
  168. config HAVE_OPTPROBES
  169. bool
  170. config HAVE_KPROBES_ON_FTRACE
  171. bool
  172. config HAVE_FUNCTION_ERROR_INJECTION
  173. bool
  174. config HAVE_NMI
  175. bool
  176. #
  177. # An arch should select this if it provides all these things:
  178. #
  179. # task_pt_regs() in asm/processor.h or asm/ptrace.h
  180. # arch_has_single_step() if there is hardware single-step support
  181. # arch_has_block_step() if there is hardware block-step support
  182. # asm/syscall.h supplying asm-generic/syscall.h interface
  183. # linux/regset.h user_regset interfaces
  184. # CORE_DUMP_USE_REGSET #define'd in linux/elf.h
  185. # TIF_SYSCALL_TRACE calls tracehook_report_syscall_{entry,exit}
  186. # TIF_NOTIFY_RESUME calls tracehook_notify_resume()
  187. # signal delivery calls tracehook_signal_handler()
  188. #
  189. config HAVE_ARCH_TRACEHOOK
  190. bool
  191. config HAVE_DMA_CONTIGUOUS
  192. bool
  193. config GENERIC_SMP_IDLE_THREAD
  194. bool
  195. config GENERIC_IDLE_POLL_SETUP
  196. bool
  197. config ARCH_HAS_FORTIFY_SOURCE
  198. bool
  199. help
  200. An architecture should select this when it can successfully
  201. build and run with CONFIG_FORTIFY_SOURCE.
  202. # Select if arch has all set_memory_ro/rw/x/nx() functions in asm/cacheflush.h
  203. config ARCH_HAS_SET_MEMORY
  204. bool
  205. # Select if arch init_task must go in the __init_task_data section
  206. config ARCH_TASK_STRUCT_ON_STACK
  207. bool
  208. # Select if arch has its private alloc_task_struct() function
  209. config ARCH_TASK_STRUCT_ALLOCATOR
  210. bool
  211. config HAVE_ARCH_THREAD_STRUCT_WHITELIST
  212. bool
  213. depends on !ARCH_TASK_STRUCT_ALLOCATOR
  214. help
  215. An architecture should select this to provide hardened usercopy
  216. knowledge about what region of the thread_struct should be
  217. whitelisted for copying to userspace. Normally this is only the
  218. FPU registers. Specifically, arch_thread_struct_whitelist()
  219. should be implemented. Without this, the entire thread_struct
  220. field in task_struct will be left whitelisted.
  221. # Select if arch has its private alloc_thread_stack() function
  222. config ARCH_THREAD_STACK_ALLOCATOR
  223. bool
  224. # Select if arch wants to size task_struct dynamically via arch_task_struct_size:
  225. config ARCH_WANTS_DYNAMIC_TASK_STRUCT
  226. bool
  227. config HAVE_REGS_AND_STACK_ACCESS_API
  228. bool
  229. help
  230. This symbol should be selected by an architecure if it supports
  231. the API needed to access registers and stack entries from pt_regs,
  232. declared in asm/ptrace.h
  233. For example the kprobes-based event tracer needs this API.
  234. config HAVE_RSEQ
  235. bool
  236. depends on HAVE_REGS_AND_STACK_ACCESS_API
  237. help
  238. This symbol should be selected by an architecture if it
  239. supports an implementation of restartable sequences.
  240. config HAVE_CLK
  241. bool
  242. help
  243. The <linux/clk.h> calls support software clock gating and
  244. thus are a key power management tool on many systems.
  245. config HAVE_HW_BREAKPOINT
  246. bool
  247. depends on PERF_EVENTS
  248. config HAVE_MIXED_BREAKPOINTS_REGS
  249. bool
  250. depends on HAVE_HW_BREAKPOINT
  251. help
  252. Depending on the arch implementation of hardware breakpoints,
  253. some of them have separate registers for data and instruction
  254. breakpoints addresses, others have mixed registers to store
  255. them but define the access type in a control register.
  256. Select this option if your arch implements breakpoints under the
  257. latter fashion.
  258. config HAVE_USER_RETURN_NOTIFIER
  259. bool
  260. config HAVE_PERF_EVENTS_NMI
  261. bool
  262. help
  263. System hardware can generate an NMI using the perf event
  264. subsystem. Also has support for calculating CPU cycle events
  265. to determine how many clock cycles in a given period.
  266. config HAVE_HARDLOCKUP_DETECTOR_PERF
  267. bool
  268. depends on HAVE_PERF_EVENTS_NMI
  269. help
  270. The arch chooses to use the generic perf-NMI-based hardlockup
  271. detector. Must define HAVE_PERF_EVENTS_NMI.
  272. config HAVE_NMI_WATCHDOG
  273. depends on HAVE_NMI
  274. bool
  275. help
  276. The arch provides a low level NMI watchdog. It provides
  277. asm/nmi.h, and defines its own arch_touch_nmi_watchdog().
  278. config HAVE_HARDLOCKUP_DETECTOR_ARCH
  279. bool
  280. select HAVE_NMI_WATCHDOG
  281. help
  282. The arch chooses to provide its own hardlockup detector, which is
  283. a superset of the HAVE_NMI_WATCHDOG. It also conforms to config
  284. interfaces and parameters provided by hardlockup detector subsystem.
  285. config HAVE_PERF_REGS
  286. bool
  287. help
  288. Support selective register dumps for perf events. This includes
  289. bit-mapping of each registers and a unique architecture id.
  290. config HAVE_PERF_USER_STACK_DUMP
  291. bool
  292. help
  293. Support user stack dumps for perf event samples. This needs
  294. access to the user stack pointer which is not unified across
  295. architectures.
  296. config HAVE_ARCH_JUMP_LABEL
  297. bool
  298. config HAVE_RCU_TABLE_FREE
  299. bool
  300. config HAVE_RCU_TABLE_INVALIDATE
  301. bool
  302. config ARCH_HAVE_NMI_SAFE_CMPXCHG
  303. bool
  304. config HAVE_ALIGNED_STRUCT_PAGE
  305. bool
  306. help
  307. This makes sure that struct pages are double word aligned and that
  308. e.g. the SLUB allocator can perform double word atomic operations
  309. on a struct page for better performance. However selecting this
  310. might increase the size of a struct page by a word.
  311. config HAVE_CMPXCHG_LOCAL
  312. bool
  313. config HAVE_CMPXCHG_DOUBLE
  314. bool
  315. config ARCH_WEAK_RELEASE_ACQUIRE
  316. bool
  317. config ARCH_WANT_IPC_PARSE_VERSION
  318. bool
  319. config ARCH_WANT_COMPAT_IPC_PARSE_VERSION
  320. bool
  321. config ARCH_WANT_OLD_COMPAT_IPC
  322. select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
  323. bool
  324. config HAVE_ARCH_SECCOMP_FILTER
  325. bool
  326. help
  327. An arch should select this symbol if it provides all of these things:
  328. - syscall_get_arch()
  329. - syscall_get_arguments()
  330. - syscall_rollback()
  331. - syscall_set_return_value()
  332. - SIGSYS siginfo_t support
  333. - secure_computing is called from a ptrace_event()-safe context
  334. - secure_computing return value is checked and a return value of -1
  335. results in the system call being skipped immediately.
  336. - seccomp syscall wired up
  337. config SECCOMP_FILTER
  338. def_bool y
  339. depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET
  340. help
  341. Enable tasks to build secure computing environments defined
  342. in terms of Berkeley Packet Filter programs which implement
  343. task-defined system call filtering polices.
  344. See Documentation/userspace-api/seccomp_filter.rst for details.
  345. config HAVE_STACKPROTECTOR
  346. bool
  347. help
  348. An arch should select this symbol if:
  349. - it has implemented a stack canary (e.g. __stack_chk_guard)
  350. config CC_HAS_STACKPROTECTOR_NONE
  351. def_bool $(cc-option,-fno-stack-protector)
  352. config STACKPROTECTOR
  353. bool "Stack Protector buffer overflow detection"
  354. depends on HAVE_STACKPROTECTOR
  355. depends on $(cc-option,-fstack-protector)
  356. default y
  357. help
  358. This option turns on the "stack-protector" GCC feature. This
  359. feature puts, at the beginning of functions, a canary value on
  360. the stack just before the return address, and validates
  361. the value just before actually returning. Stack based buffer
  362. overflows (that need to overwrite this return address) now also
  363. overwrite the canary, which gets detected and the attack is then
  364. neutralized via a kernel panic.
  365. Functions will have the stack-protector canary logic added if they
  366. have an 8-byte or larger character array on the stack.
  367. This feature requires gcc version 4.2 or above, or a distribution
  368. gcc with the feature backported ("-fstack-protector").
  369. On an x86 "defconfig" build, this feature adds canary checks to
  370. about 3% of all kernel functions, which increases kernel code size
  371. by about 0.3%.
  372. config STACKPROTECTOR_STRONG
  373. bool "Strong Stack Protector"
  374. depends on STACKPROTECTOR
  375. depends on $(cc-option,-fstack-protector-strong)
  376. default y
  377. help
  378. Functions will have the stack-protector canary logic added in any
  379. of the following conditions:
  380. - local variable's address used as part of the right hand side of an
  381. assignment or function argument
  382. - local variable is an array (or union containing an array),
  383. regardless of array type or length
  384. - uses register local variables
  385. This feature requires gcc version 4.9 or above, or a distribution
  386. gcc with the feature backported ("-fstack-protector-strong").
  387. On an x86 "defconfig" build, this feature adds canary checks to
  388. about 20% of all kernel functions, which increases the kernel code
  389. size by about 2%.
  390. config HAVE_ARCH_WITHIN_STACK_FRAMES
  391. bool
  392. help
  393. An architecture should select this if it can walk the kernel stack
  394. frames to determine if an object is part of either the arguments
  395. or local variables (i.e. that it excludes saved return addresses,
  396. and similar) by implementing an inline arch_within_stack_frames(),
  397. which is used by CONFIG_HARDENED_USERCOPY.
  398. config HAVE_CONTEXT_TRACKING
  399. bool
  400. help
  401. Provide kernel/user boundaries probes necessary for subsystems
  402. that need it, such as userspace RCU extended quiescent state.
  403. Syscalls need to be wrapped inside user_exit()-user_enter() through
  404. the slow path using TIF_NOHZ flag. Exceptions handlers must be
  405. wrapped as well. Irqs are already protected inside
  406. rcu_irq_enter/rcu_irq_exit() but preemption or signal handling on
  407. irq exit still need to be protected.
  408. config HAVE_VIRT_CPU_ACCOUNTING
  409. bool
  410. config ARCH_HAS_SCALED_CPUTIME
  411. bool
  412. config HAVE_VIRT_CPU_ACCOUNTING_GEN
  413. bool
  414. default y if 64BIT
  415. help
  416. With VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit.
  417. Before enabling this option, arch code must be audited
  418. to ensure there are no races in concurrent read/write of
  419. cputime_t. For example, reading/writing 64-bit cputime_t on
  420. some 32-bit arches may require multiple accesses, so proper
  421. locking is needed to protect against concurrent accesses.
  422. config HAVE_IRQ_TIME_ACCOUNTING
  423. bool
  424. help
  425. Archs need to ensure they use a high enough resolution clock to
  426. support irq time accounting and then call enable_sched_clock_irqtime().
  427. config HAVE_ARCH_TRANSPARENT_HUGEPAGE
  428. bool
  429. config HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
  430. bool
  431. config HAVE_ARCH_HUGE_VMAP
  432. bool
  433. config HAVE_ARCH_SOFT_DIRTY
  434. bool
  435. config HAVE_MOD_ARCH_SPECIFIC
  436. bool
  437. help
  438. The arch uses struct mod_arch_specific to store data. Many arches
  439. just need a simple module loader without arch specific data - those
  440. should not enable this.
  441. config MODULES_USE_ELF_RELA
  442. bool
  443. help
  444. Modules only use ELF RELA relocations. Modules with ELF REL
  445. relocations will give an error.
  446. config MODULES_USE_ELF_REL
  447. bool
  448. help
  449. Modules only use ELF REL relocations. Modules with ELF RELA
  450. relocations will give an error.
  451. config HAVE_IRQ_EXIT_ON_IRQ_STACK
  452. bool
  453. help
  454. Architecture doesn't only execute the irq handler on the irq stack
  455. but also irq_exit(). This way we can process softirqs on this irq
  456. stack instead of switching to a new one when we call __do_softirq()
  457. in the end of an hardirq.
  458. This spares a stack switch and improves cache usage on softirq
  459. processing.
  460. config PGTABLE_LEVELS
  461. int
  462. default 2
  463. config ARCH_HAS_ELF_RANDOMIZE
  464. bool
  465. help
  466. An architecture supports choosing randomized locations for
  467. stack, mmap, brk, and ET_DYN. Defined functions:
  468. - arch_mmap_rnd()
  469. - arch_randomize_brk()
  470. config HAVE_ARCH_MMAP_RND_BITS
  471. bool
  472. help
  473. An arch should select this symbol if it supports setting a variable
  474. number of bits for use in establishing the base address for mmap
  475. allocations, has MMU enabled and provides values for both:
  476. - ARCH_MMAP_RND_BITS_MIN
  477. - ARCH_MMAP_RND_BITS_MAX
  478. config HAVE_EXIT_THREAD
  479. bool
  480. help
  481. An architecture implements exit_thread.
  482. config ARCH_MMAP_RND_BITS_MIN
  483. int
  484. config ARCH_MMAP_RND_BITS_MAX
  485. int
  486. config ARCH_MMAP_RND_BITS_DEFAULT
  487. int
  488. config ARCH_MMAP_RND_BITS
  489. int "Number of bits to use for ASLR of mmap base address" if EXPERT
  490. range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX
  491. default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT
  492. default ARCH_MMAP_RND_BITS_MIN
  493. depends on HAVE_ARCH_MMAP_RND_BITS
  494. help
  495. This value can be used to select the number of bits to use to
  496. determine the random offset to the base address of vma regions
  497. resulting from mmap allocations. This value will be bounded
  498. by the architecture's minimum and maximum supported values.
  499. This value can be changed after boot using the
  500. /proc/sys/vm/mmap_rnd_bits tunable
  501. config HAVE_ARCH_MMAP_RND_COMPAT_BITS
  502. bool
  503. help
  504. An arch should select this symbol if it supports running applications
  505. in compatibility mode, supports setting a variable number of bits for
  506. use in establishing the base address for mmap allocations, has MMU
  507. enabled and provides values for both:
  508. - ARCH_MMAP_RND_COMPAT_BITS_MIN
  509. - ARCH_MMAP_RND_COMPAT_BITS_MAX
  510. config ARCH_MMAP_RND_COMPAT_BITS_MIN
  511. int
  512. config ARCH_MMAP_RND_COMPAT_BITS_MAX
  513. int
  514. config ARCH_MMAP_RND_COMPAT_BITS_DEFAULT
  515. int
  516. config ARCH_MMAP_RND_COMPAT_BITS
  517. int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT
  518. range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX
  519. default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT
  520. default ARCH_MMAP_RND_COMPAT_BITS_MIN
  521. depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS
  522. help
  523. This value can be used to select the number of bits to use to
  524. determine the random offset to the base address of vma regions
  525. resulting from mmap allocations for compatible applications This
  526. value will be bounded by the architecture's minimum and maximum
  527. supported values.
  528. This value can be changed after boot using the
  529. /proc/sys/vm/mmap_rnd_compat_bits tunable
  530. config HAVE_ARCH_COMPAT_MMAP_BASES
  531. bool
  532. help
  533. This allows 64bit applications to invoke 32-bit mmap() syscall
  534. and vice-versa 32-bit applications to call 64-bit mmap().
  535. Required for applications doing different bitness syscalls.
  536. config HAVE_COPY_THREAD_TLS
  537. bool
  538. help
  539. Architecture provides copy_thread_tls to accept tls argument via
  540. normal C parameter passing, rather than extracting the syscall
  541. argument from pt_regs.
  542. config HAVE_STACK_VALIDATION
  543. bool
  544. help
  545. Architecture supports the 'objtool check' host tool command, which
  546. performs compile-time stack metadata validation.
  547. config HAVE_RELIABLE_STACKTRACE
  548. bool
  549. help
  550. Architecture has a save_stack_trace_tsk_reliable() function which
  551. only returns a stack trace if it can guarantee the trace is reliable.
  552. config HAVE_ARCH_HASH
  553. bool
  554. default n
  555. help
  556. If this is set, the architecture provides an <asm/hash.h>
  557. file which provides platform-specific implementations of some
  558. functions in <linux/hash.h> or fs/namei.c.
  559. config ISA_BUS_API
  560. def_bool ISA
  561. #
  562. # ABI hall of shame
  563. #
  564. config CLONE_BACKWARDS
  565. bool
  566. help
  567. Architecture has tls passed as the 4th argument of clone(2),
  568. not the 5th one.
  569. config CLONE_BACKWARDS2
  570. bool
  571. help
  572. Architecture has the first two arguments of clone(2) swapped.
  573. config CLONE_BACKWARDS3
  574. bool
  575. help
  576. Architecture has tls passed as the 3rd argument of clone(2),
  577. not the 5th one.
  578. config ODD_RT_SIGACTION
  579. bool
  580. help
  581. Architecture has unusual rt_sigaction(2) arguments
  582. config OLD_SIGSUSPEND
  583. bool
  584. help
  585. Architecture has old sigsuspend(2) syscall, of one-argument variety
  586. config OLD_SIGSUSPEND3
  587. bool
  588. help
  589. Even weirder antique ABI - three-argument sigsuspend(2)
  590. config OLD_SIGACTION
  591. bool
  592. help
  593. Architecture has old sigaction(2) syscall. Nope, not the same
  594. as OLD_SIGSUSPEND | OLD_SIGSUSPEND3 - alpha has sigsuspend(2),
  595. but fairly different variant of sigaction(2), thanks to OSF/1
  596. compatibility...
  597. config COMPAT_OLD_SIGACTION
  598. bool
  599. config 64BIT_TIME
  600. def_bool ARCH_HAS_64BIT_TIME
  601. help
  602. This should be selected by all architectures that need to support
  603. new system calls with a 64-bit time_t. This is relevant on all 32-bit
  604. architectures, and 64-bit architectures as part of compat syscall
  605. handling.
  606. config COMPAT_32BIT_TIME
  607. def_bool (!64BIT && 64BIT_TIME) || COMPAT
  608. help
  609. This enables 32 bit time_t support in addition to 64 bit time_t support.
  610. This is relevant on all 32-bit architectures, and 64-bit architectures
  611. as part of compat syscall handling.
  612. config ARCH_NO_COHERENT_DMA_MMAP
  613. bool
  614. config ARCH_NO_PREEMPT
  615. bool
  616. config CPU_NO_EFFICIENT_FFS
  617. def_bool n
  618. config HAVE_ARCH_VMAP_STACK
  619. def_bool n
  620. help
  621. An arch should select this symbol if it can support kernel stacks
  622. in vmalloc space. This means:
  623. - vmalloc space must be large enough to hold many kernel stacks.
  624. This may rule out many 32-bit architectures.
  625. - Stacks in vmalloc space need to work reliably. For example, if
  626. vmap page tables are created on demand, either this mechanism
  627. needs to work while the stack points to a virtual address with
  628. unpopulated page tables or arch code (switch_to() and switch_mm(),
  629. most likely) needs to ensure that the stack's page table entries
  630. are populated before running on a possibly unpopulated stack.
  631. - If the stack overflows into a guard page, something reasonable
  632. should happen. The definition of "reasonable" is flexible, but
  633. instantly rebooting without logging anything would be unfriendly.
  634. config VMAP_STACK
  635. default y
  636. bool "Use a virtually-mapped stack"
  637. depends on HAVE_ARCH_VMAP_STACK && !KASAN
  638. ---help---
  639. Enable this if you want the use virtually-mapped kernel stacks
  640. with guard pages. This causes kernel stack overflows to be
  641. caught immediately rather than causing difficult-to-diagnose
  642. corruption.
  643. This is presently incompatible with KASAN because KASAN expects
  644. the stack to map directly to the KASAN shadow map using a formula
  645. that is incorrect if the stack is in vmalloc space.
  646. config ARCH_OPTIONAL_KERNEL_RWX
  647. def_bool n
  648. config ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
  649. def_bool n
  650. config ARCH_HAS_STRICT_KERNEL_RWX
  651. def_bool n
  652. config STRICT_KERNEL_RWX
  653. bool "Make kernel text and rodata read-only" if ARCH_OPTIONAL_KERNEL_RWX
  654. depends on ARCH_HAS_STRICT_KERNEL_RWX
  655. default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
  656. help
  657. If this is set, kernel text and rodata memory will be made read-only,
  658. and non-text memory will be made non-executable. This provides
  659. protection against certain security exploits (e.g. executing the heap
  660. or modifying text)
  661. These features are considered standard security practice these days.
  662. You should say Y here in almost all cases.
  663. config ARCH_HAS_STRICT_MODULE_RWX
  664. def_bool n
  665. config STRICT_MODULE_RWX
  666. bool "Set loadable kernel module data as NX and text as RO" if ARCH_OPTIONAL_KERNEL_RWX
  667. depends on ARCH_HAS_STRICT_MODULE_RWX && MODULES
  668. default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
  669. help
  670. If this is set, module text and rodata memory will be made read-only,
  671. and non-text memory will be made non-executable. This provides
  672. protection against certain security exploits (e.g. writing to text)
  673. # select if the architecture provides an asm/dma-direct.h header
  674. config ARCH_HAS_PHYS_TO_DMA
  675. bool
  676. config ARCH_HAS_REFCOUNT
  677. bool
  678. help
  679. An architecture selects this when it has implemented refcount_t
  680. using open coded assembly primitives that provide an optimized
  681. refcount_t implementation, possibly at the expense of some full
  682. refcount state checks of CONFIG_REFCOUNT_FULL=y.
  683. The refcount overflow check behavior, however, must be retained.
  684. Catching overflows is the primary security concern for protecting
  685. against bugs in reference counts.
  686. config REFCOUNT_FULL
  687. bool "Perform full reference count validation at the expense of speed"
  688. help
  689. Enabling this switches the refcounting infrastructure from a fast
  690. unchecked atomic_t implementation to a fully state checked
  691. implementation, which can be (slightly) slower but provides protections
  692. against various use-after-free conditions that can be used in
  693. security flaw exploits.
  694. config HAVE_ARCH_COMPILER_H
  695. bool
  696. help
  697. An architecture can select this if it provides an
  698. asm/compiler.h header that should be included after
  699. linux/compiler-*.h in order to override macro definitions that those
  700. headers generally provide.
  701. config HAVE_ARCH_PREL32_RELOCATIONS
  702. bool
  703. help
  704. May be selected by an architecture if it supports place-relative
  705. 32-bit relocations, both in the toolchain and in the module loader,
  706. in which case relative references can be used in special sections
  707. for PCI fixup, initcalls etc which are only half the size on 64 bit
  708. architectures, and don't require runtime relocation on relocatable
  709. kernels.
  710. source "kernel/gcov/Kconfig"
  711. source "scripts/gcc-plugins/Kconfig"
  712. endmenu