Kconfig 55 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844
  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. config ARCH_CONFIGURES_CPU_MITIGATIONS
  11. bool
  12. if !ARCH_CONFIGURES_CPU_MITIGATIONS
  13. config CPU_MITIGATIONS
  14. def_bool y
  15. endif
  16. #
  17. # Selected by architectures that need custom DMA operations for e.g. legacy
  18. # IOMMUs not handled by dma-iommu. Drivers must never select this symbol.
  19. #
  20. config ARCH_HAS_DMA_OPS
  21. depends on HAS_DMA
  22. select DMA_OPS_HELPERS
  23. bool
  24. menu "General architecture-dependent options"
  25. config ARCH_HAS_SUBPAGE_FAULTS
  26. bool
  27. help
  28. Select if the architecture can check permissions at sub-page
  29. granularity (e.g. arm64 MTE). The probe_user_*() functions
  30. must be implemented.
  31. config HOTPLUG_SMT
  32. bool
  33. config SMT_NUM_THREADS_DYNAMIC
  34. bool
  35. config ARCH_SUPPORTS_SCHED_SMT
  36. bool
  37. config ARCH_SUPPORTS_SCHED_CLUSTER
  38. bool
  39. config ARCH_SUPPORTS_SCHED_MC
  40. bool
  41. config SCHED_SMT
  42. bool "SMT (Hyperthreading) scheduler support"
  43. depends on ARCH_SUPPORTS_SCHED_SMT
  44. default y
  45. help
  46. Improves the CPU scheduler's decision making when dealing with
  47. MultiThreading at a cost of slightly increased overhead in some
  48. places. If unsure say N here.
  49. config SCHED_CLUSTER
  50. bool "Cluster scheduler support"
  51. depends on ARCH_SUPPORTS_SCHED_CLUSTER
  52. default y
  53. help
  54. Cluster scheduler support improves the CPU scheduler's decision
  55. making when dealing with machines that have clusters of CPUs.
  56. Cluster usually means a couple of CPUs which are placed closely
  57. by sharing mid-level caches, last-level cache tags or internal
  58. busses.
  59. config SCHED_MC
  60. bool "Multi-Core Cache (MC) scheduler support"
  61. depends on ARCH_SUPPORTS_SCHED_MC
  62. default y
  63. help
  64. Multi-core scheduler support improves the CPU scheduler's decision
  65. making when dealing with multi-core CPU chips at a cost of slightly
  66. increased overhead in some places. If unsure say N here.
  67. # Selected by HOTPLUG_CORE_SYNC_DEAD or HOTPLUG_CORE_SYNC_FULL
  68. config HOTPLUG_CORE_SYNC
  69. bool
  70. # Basic CPU dead synchronization selected by architecture
  71. config HOTPLUG_CORE_SYNC_DEAD
  72. bool
  73. select HOTPLUG_CORE_SYNC
  74. # Full CPU synchronization with alive state selected by architecture
  75. config HOTPLUG_CORE_SYNC_FULL
  76. bool
  77. select HOTPLUG_CORE_SYNC_DEAD if HOTPLUG_CPU
  78. select HOTPLUG_CORE_SYNC
  79. config HOTPLUG_SPLIT_STARTUP
  80. bool
  81. select HOTPLUG_CORE_SYNC_FULL
  82. config HOTPLUG_PARALLEL
  83. bool
  84. select HOTPLUG_SPLIT_STARTUP
  85. config GENERIC_IRQ_ENTRY
  86. bool
  87. config GENERIC_SYSCALL
  88. bool
  89. depends on GENERIC_IRQ_ENTRY
  90. config GENERIC_ENTRY
  91. bool
  92. select GENERIC_IRQ_ENTRY
  93. select GENERIC_SYSCALL
  94. config KPROBES
  95. bool "Kprobes"
  96. depends on HAVE_KPROBES
  97. select KALLSYMS
  98. select EXECMEM
  99. select NEED_TASKS_RCU
  100. help
  101. Kprobes allows you to trap at almost any kernel address and
  102. execute a callback function. register_kprobe() establishes
  103. a probepoint and specifies the callback. Kprobes is useful
  104. for kernel debugging, non-intrusive instrumentation and testing.
  105. If in doubt, say "N".
  106. config JUMP_LABEL
  107. bool "Optimize very unlikely/likely branches"
  108. depends on HAVE_ARCH_JUMP_LABEL
  109. select OBJTOOL if HAVE_JUMP_LABEL_HACK
  110. help
  111. This option enables a transparent branch optimization that
  112. makes certain almost-always-true or almost-always-false branch
  113. conditions even cheaper to execute within the kernel.
  114. Certain performance-sensitive kernel code, such as trace points,
  115. scheduler functionality, networking code and KVM have such
  116. branches and include support for this optimization technique.
  117. If it is detected that the compiler has support for "asm goto",
  118. the kernel will compile such branches with just a nop
  119. instruction. When the condition flag is toggled to true, the
  120. nop will be converted to a jump instruction to execute the
  121. conditional block of instructions.
  122. This technique lowers overhead and stress on the branch prediction
  123. of the processor and generally makes the kernel faster. The update
  124. of the condition is slower, but those are always very rare.
  125. ( On 32-bit x86, the necessary options added to the compiler
  126. flags may increase the size of the kernel slightly. )
  127. config STATIC_KEYS_SELFTEST
  128. bool "Static key selftest"
  129. depends on JUMP_LABEL
  130. help
  131. Boot time self-test of the branch patching code.
  132. config STATIC_CALL_SELFTEST
  133. bool "Static call selftest"
  134. depends on HAVE_STATIC_CALL
  135. help
  136. Boot time self-test of the call patching code.
  137. config OPTPROBES
  138. def_bool y
  139. depends on KPROBES && HAVE_OPTPROBES
  140. select NEED_TASKS_RCU
  141. config KPROBES_ON_FTRACE
  142. def_bool y
  143. depends on KPROBES && HAVE_KPROBES_ON_FTRACE
  144. depends on DYNAMIC_FTRACE_WITH_REGS
  145. help
  146. If function tracer is enabled and the arch supports full
  147. passing of pt_regs to function tracing, then kprobes can
  148. optimize on top of function tracing.
  149. config UPROBES
  150. def_bool n
  151. depends on ARCH_SUPPORTS_UPROBES
  152. select TASKS_TRACE_RCU
  153. help
  154. Uprobes is the user-space counterpart to kprobes: they
  155. enable instrumentation applications (such as 'perf probe')
  156. to establish unintrusive probes in user-space binaries and
  157. libraries, by executing handler functions when the probes
  158. are hit by user-space applications.
  159. ( These probes come in the form of single-byte breakpoints,
  160. managed by the kernel and kept transparent to the probed
  161. application. )
  162. config HAVE_64BIT_ALIGNED_ACCESS
  163. def_bool 64BIT && !HAVE_EFFICIENT_UNALIGNED_ACCESS
  164. help
  165. Some architectures require 64 bit accesses to be 64 bit
  166. aligned, which also requires structs containing 64 bit values
  167. to be 64 bit aligned too. This includes some 32 bit
  168. architectures which can do 64 bit accesses, as well as 64 bit
  169. architectures without unaligned access.
  170. This symbol should be selected by an architecture if 64 bit
  171. accesses are required to be 64 bit aligned in this way even
  172. though it is not a 64 bit architecture.
  173. See Documentation/core-api/unaligned-memory-access.rst for
  174. more information on the topic of unaligned memory accesses.
  175. config HAVE_EFFICIENT_UNALIGNED_ACCESS
  176. bool
  177. help
  178. Some architectures are unable to perform unaligned accesses
  179. without the use of get_unaligned/put_unaligned. Others are
  180. unable to perform such accesses efficiently (e.g. trap on
  181. unaligned access and require fixing it up in the exception
  182. handler.)
  183. This symbol should be selected by an architecture if it can
  184. perform unaligned accesses efficiently to allow different
  185. code paths to be selected for these cases. Some network
  186. drivers, for example, could opt to not fix up alignment
  187. problems with received packets if doing so would not help
  188. much.
  189. See Documentation/core-api/unaligned-memory-access.rst for more
  190. information on the topic of unaligned memory accesses.
  191. config ARCH_USE_BUILTIN_BSWAP
  192. bool
  193. help
  194. GCC and Clang have builtin functions for handling byte-swapping.
  195. Using these allows the compiler to see what's happening and
  196. offers more opportunity for optimisation. In particular, the
  197. compiler will be able to combine the byteswap with a nearby load
  198. or store and use load-and-swap or store-and-swap instructions if
  199. the architecture has them. It should almost *never* result in code
  200. which is worse than the hand-coded assembler in <asm/swab.h>.
  201. But just in case it does, the use of the builtins is optional.
  202. Any architecture with load-and-swap or store-and-swap
  203. instructions should set this. And it shouldn't hurt to set it
  204. on architectures that don't have such instructions.
  205. config KRETPROBES
  206. def_bool y
  207. depends on KPROBES && (HAVE_KRETPROBES || HAVE_RETHOOK)
  208. config KRETPROBE_ON_RETHOOK
  209. def_bool y
  210. depends on HAVE_RETHOOK
  211. depends on KRETPROBES
  212. select RETHOOK
  213. config USER_RETURN_NOTIFIER
  214. bool
  215. depends on HAVE_USER_RETURN_NOTIFIER
  216. help
  217. Provide a kernel-internal notification when a cpu is about to
  218. switch to user mode.
  219. config HAVE_IOREMAP_PROT
  220. bool
  221. config HAVE_KPROBES
  222. bool
  223. config HAVE_KRETPROBES
  224. bool
  225. config HAVE_OPTPROBES
  226. bool
  227. config HAVE_KPROBES_ON_FTRACE
  228. bool
  229. config ARCH_CORRECT_STACKTRACE_ON_KRETPROBE
  230. bool
  231. help
  232. Since kretprobes modifies return address on the stack, the
  233. stacktrace may see the kretprobe trampoline address instead
  234. of correct one. If the architecture stacktrace code and
  235. unwinder can adjust such entries, select this configuration.
  236. config HAVE_FUNCTION_ERROR_INJECTION
  237. bool
  238. config HAVE_NMI
  239. bool
  240. config HAVE_FUNCTION_DESCRIPTORS
  241. bool
  242. config TRACE_IRQFLAGS_SUPPORT
  243. bool
  244. config TRACE_IRQFLAGS_NMI_SUPPORT
  245. bool
  246. #
  247. # An arch should select this if it provides all these things:
  248. #
  249. # task_pt_regs() in asm/processor.h or asm/ptrace.h
  250. # arch_has_single_step() if there is hardware single-step support
  251. # arch_has_block_step() if there is hardware block-step support
  252. # asm/syscall.h supplying asm-generic/syscall.h interface
  253. # linux/regset.h user_regset interfaces
  254. # CORE_DUMP_USE_REGSET #define'd in linux/elf.h
  255. # TIF_SYSCALL_TRACE calls ptrace_report_syscall_{entry,exit}
  256. # TIF_NOTIFY_RESUME calls resume_user_mode_work()
  257. #
  258. config HAVE_ARCH_TRACEHOOK
  259. bool
  260. config HAVE_DMA_CONTIGUOUS
  261. bool
  262. config GENERIC_SMP_IDLE_THREAD
  263. bool
  264. config GENERIC_IDLE_POLL_SETUP
  265. bool
  266. config ARCH_HAS_FORTIFY_SOURCE
  267. bool
  268. help
  269. An architecture should select this when it can successfully
  270. build and run with CONFIG_FORTIFY_SOURCE.
  271. #
  272. # Select if the arch provides a historic keepinit alias for the retain_initrd
  273. # command line option
  274. #
  275. config ARCH_HAS_KEEPINITRD
  276. bool
  277. # Select if arch has all set_memory_ro/rw/x/nx() functions in asm/cacheflush.h
  278. config ARCH_HAS_SET_MEMORY
  279. bool
  280. # Select if arch has all set_direct_map_invalid/default() functions
  281. config ARCH_HAS_SET_DIRECT_MAP
  282. bool
  283. #
  284. # Select if the architecture provides the arch_dma_set_uncached symbol to
  285. # either provide an uncached segment alias for a DMA allocation, or
  286. # to remap the page tables in place.
  287. #
  288. config ARCH_HAS_DMA_SET_UNCACHED
  289. bool
  290. #
  291. # Select if the architectures provides the arch_dma_clear_uncached symbol
  292. # to undo an in-place page table remap for uncached access.
  293. #
  294. config ARCH_HAS_DMA_CLEAR_UNCACHED
  295. bool
  296. config ARCH_HAS_CPU_FINALIZE_INIT
  297. bool
  298. # The architecture has a per-task state that includes the mm's PASID
  299. config ARCH_HAS_CPU_PASID
  300. bool
  301. select IOMMU_MM_DATA
  302. config HAVE_ARCH_THREAD_STRUCT_WHITELIST
  303. bool
  304. help
  305. An architecture should select this to provide hardened usercopy
  306. knowledge about what region of the thread_struct should be
  307. whitelisted for copying to userspace. Normally this is only the
  308. FPU registers. Specifically, arch_thread_struct_whitelist()
  309. should be implemented. Without this, the entire thread_struct
  310. field in task_struct will be left whitelisted.
  311. # Select if arch wants to size task_struct dynamically via arch_task_struct_size:
  312. config ARCH_WANTS_DYNAMIC_TASK_STRUCT
  313. bool
  314. config ARCH_WANTS_NO_INSTR
  315. bool
  316. help
  317. An architecture should select this if the noinstr macro is being used on
  318. functions to denote that the toolchain should avoid instrumenting such
  319. functions and is required for correctness.
  320. config ARCH_32BIT_OFF_T
  321. bool
  322. depends on !64BIT
  323. help
  324. All new 32-bit architectures should have 64-bit off_t type on
  325. userspace side which corresponds to the loff_t kernel type. This
  326. is the requirement for modern ABIs. Some existing architectures
  327. still support 32-bit off_t. This option is enabled for all such
  328. architectures explicitly.
  329. # Selected by 64 bit architectures which have a 32 bit f_tinode in struct ustat
  330. config ARCH_32BIT_USTAT_F_TINODE
  331. bool
  332. config HAVE_ASM_MODVERSIONS
  333. bool
  334. help
  335. This symbol should be selected by an architecture if it provides
  336. <asm/asm-prototypes.h> to support the module versioning for symbols
  337. exported from assembly code.
  338. config HAVE_REGS_AND_STACK_ACCESS_API
  339. bool
  340. help
  341. This symbol should be selected by an architecture if it supports
  342. the API needed to access registers and stack entries from pt_regs,
  343. declared in asm/ptrace.h
  344. For example the kprobes-based event tracer needs this API.
  345. config HAVE_RSEQ
  346. bool
  347. depends on HAVE_REGS_AND_STACK_ACCESS_API
  348. help
  349. This symbol should be selected by an architecture if it
  350. supports an implementation of restartable sequences.
  351. config HAVE_RUST
  352. bool
  353. help
  354. This symbol should be selected by an architecture if it
  355. supports Rust.
  356. config HAVE_FUNCTION_ARG_ACCESS_API
  357. bool
  358. help
  359. This symbol should be selected by an architecture if it supports
  360. the API needed to access function arguments from pt_regs,
  361. declared in asm/ptrace.h
  362. config HAVE_HW_BREAKPOINT
  363. bool
  364. depends on PERF_EVENTS
  365. config HAVE_MIXED_BREAKPOINTS_REGS
  366. bool
  367. depends on HAVE_HW_BREAKPOINT
  368. help
  369. Depending on the arch implementation of hardware breakpoints,
  370. some of them have separate registers for data and instruction
  371. breakpoints addresses, others have mixed registers to store
  372. them but define the access type in a control register.
  373. Select this option if your arch implements breakpoints under the
  374. latter fashion.
  375. config HAVE_USER_RETURN_NOTIFIER
  376. bool
  377. config HAVE_PERF_EVENTS_NMI
  378. bool
  379. help
  380. System hardware can generate an NMI using the perf event
  381. subsystem. Also has support for calculating CPU cycle events
  382. to determine how many clock cycles in a given period.
  383. config HAVE_HARDLOCKUP_DETECTOR_PERF
  384. bool
  385. depends on HAVE_PERF_EVENTS_NMI
  386. help
  387. The arch chooses to use the generic perf-NMI-based hardlockup
  388. detector. Must define HAVE_PERF_EVENTS_NMI.
  389. config HAVE_HARDLOCKUP_DETECTOR_ARCH
  390. bool
  391. help
  392. The arch provides its own hardlockup detector implementation instead
  393. of the generic ones.
  394. It uses the same command line parameters, and sysctl interface,
  395. as the generic hardlockup detectors.
  396. config UNWIND_USER
  397. bool
  398. config HAVE_UNWIND_USER_FP
  399. bool
  400. select UNWIND_USER
  401. config HAVE_PERF_REGS
  402. bool
  403. help
  404. Support selective register dumps for perf events. This includes
  405. bit-mapping of each registers and a unique architecture id.
  406. config HAVE_PERF_USER_STACK_DUMP
  407. bool
  408. help
  409. Support user stack dumps for perf event samples. This needs
  410. access to the user stack pointer which is not unified across
  411. architectures.
  412. config HAVE_ARCH_JUMP_LABEL
  413. bool
  414. config HAVE_ARCH_JUMP_LABEL_RELATIVE
  415. bool
  416. config MMU_GATHER_TABLE_FREE
  417. bool
  418. config MMU_GATHER_RCU_TABLE_FREE
  419. bool
  420. select MMU_GATHER_TABLE_FREE
  421. config MMU_GATHER_PAGE_SIZE
  422. bool
  423. config MMU_GATHER_NO_RANGE
  424. bool
  425. select MMU_GATHER_MERGE_VMAS
  426. config MMU_GATHER_NO_FLUSH_CACHE
  427. bool
  428. config MMU_GATHER_MERGE_VMAS
  429. bool
  430. config MMU_GATHER_NO_GATHER
  431. bool
  432. depends on MMU_GATHER_TABLE_FREE
  433. config ARCH_WANT_IRQS_OFF_ACTIVATE_MM
  434. bool
  435. help
  436. Temporary select until all architectures can be converted to have
  437. irqs disabled over activate_mm. Architectures that do IPI based TLB
  438. shootdowns should enable this.
  439. # Use normal mm refcounting for MMU_LAZY_TLB kernel thread references.
  440. # MMU_LAZY_TLB_REFCOUNT=n can improve the scalability of context switching
  441. # to/from kernel threads when the same mm is running on a lot of CPUs (a large
  442. # multi-threaded application), by reducing contention on the mm refcount.
  443. #
  444. # This can be disabled if the architecture ensures no CPUs are using an mm as a
  445. # "lazy tlb" beyond its final refcount (i.e., by the time __mmdrop frees the mm
  446. # or its kernel page tables). This could be arranged by arch_exit_mmap(), or
  447. # final exit(2) TLB flush, for example.
  448. #
  449. # To implement this, an arch *must*:
  450. # Ensure the _lazy_tlb variants of mmgrab/mmdrop are used when manipulating
  451. # the lazy tlb reference of a kthread's ->active_mm (non-arch code has been
  452. # converted already).
  453. config MMU_LAZY_TLB_REFCOUNT
  454. def_bool y
  455. depends on !MMU_LAZY_TLB_SHOOTDOWN
  456. # This option allows MMU_LAZY_TLB_REFCOUNT=n. It ensures no CPUs are using an
  457. # mm as a lazy tlb beyond its last reference count, by shooting down these
  458. # users before the mm is deallocated. __mmdrop() first IPIs all CPUs that may
  459. # be using the mm as a lazy tlb, so that they may switch themselves to using
  460. # init_mm for their active mm. mm_cpumask(mm) is used to determine which CPUs
  461. # may be using mm as a lazy tlb mm.
  462. #
  463. # To implement this, an arch *must*:
  464. # - At the time of the final mmdrop of the mm, ensure mm_cpumask(mm) contains
  465. # at least all possible CPUs in which the mm is lazy.
  466. # - It must meet the requirements for MMU_LAZY_TLB_REFCOUNT=n (see above).
  467. config MMU_LAZY_TLB_SHOOTDOWN
  468. bool
  469. config ARCH_HAVE_NMI_SAFE_CMPXCHG
  470. bool
  471. config ARCH_HAVE_EXTRA_ELF_NOTES
  472. bool
  473. help
  474. An architecture should select this in order to enable adding an
  475. arch-specific ELF note section to core files. It must provide two
  476. functions: elf_coredump_extra_notes_size() and
  477. elf_coredump_extra_notes_write() which are invoked by the ELF core
  478. dumper.
  479. config ARCH_HAS_NMI_SAFE_THIS_CPU_OPS
  480. bool
  481. config HAVE_ALIGNED_STRUCT_PAGE
  482. bool
  483. help
  484. This makes sure that struct pages are double word aligned and that
  485. e.g. the SLUB allocator can perform double word atomic operations
  486. on a struct page for better performance. However selecting this
  487. might increase the size of a struct page by a word.
  488. config HAVE_CMPXCHG_LOCAL
  489. bool
  490. config HAVE_CMPXCHG_DOUBLE
  491. bool
  492. config ARCH_WEAK_RELEASE_ACQUIRE
  493. bool
  494. config ARCH_WANT_IPC_PARSE_VERSION
  495. bool
  496. config ARCH_WANT_COMPAT_IPC_PARSE_VERSION
  497. bool
  498. config ARCH_WANT_OLD_COMPAT_IPC
  499. select ARCH_WANT_COMPAT_IPC_PARSE_VERSION
  500. bool
  501. config HAVE_ARCH_SECCOMP
  502. bool
  503. help
  504. An arch should select this symbol to support seccomp mode 1 (the fixed
  505. syscall policy), and must provide an overrides for __NR_seccomp_sigreturn,
  506. and compat syscalls if the asm-generic/seccomp.h defaults need adjustment:
  507. - __NR_seccomp_read_32
  508. - __NR_seccomp_write_32
  509. - __NR_seccomp_exit_32
  510. - __NR_seccomp_sigreturn_32
  511. config HAVE_ARCH_SECCOMP_FILTER
  512. bool
  513. select HAVE_ARCH_SECCOMP
  514. help
  515. An arch should select this symbol if it provides all of these things:
  516. - all the requirements for HAVE_ARCH_SECCOMP
  517. - syscall_get_arch()
  518. - syscall_get_arguments()
  519. - syscall_rollback()
  520. - syscall_set_return_value()
  521. - SIGSYS siginfo_t support
  522. - secure_computing is called from a ptrace_event()-safe context
  523. - secure_computing return value is checked and a return value of -1
  524. results in the system call being skipped immediately.
  525. - seccomp syscall wired up
  526. - if !HAVE_SPARSE_SYSCALL_NR, have SECCOMP_ARCH_NATIVE,
  527. SECCOMP_ARCH_NATIVE_NR, SECCOMP_ARCH_NATIVE_NAME defined. If
  528. COMPAT is supported, have the SECCOMP_ARCH_COMPAT* defines too.
  529. config SECCOMP
  530. prompt "Enable seccomp to safely execute untrusted bytecode"
  531. def_bool y
  532. depends on HAVE_ARCH_SECCOMP
  533. help
  534. This kernel feature is useful for number crunching applications
  535. that may need to handle untrusted bytecode during their
  536. execution. By using pipes or other transports made available
  537. to the process as file descriptors supporting the read/write
  538. syscalls, it's possible to isolate those applications in their
  539. own address space using seccomp. Once seccomp is enabled via
  540. prctl(PR_SET_SECCOMP) or the seccomp() syscall, it cannot be
  541. disabled and the task is only allowed to execute a few safe
  542. syscalls defined by each seccomp mode.
  543. If unsure, say Y.
  544. config SECCOMP_FILTER
  545. def_bool y
  546. depends on HAVE_ARCH_SECCOMP_FILTER && SECCOMP && NET
  547. help
  548. Enable tasks to build secure computing environments defined
  549. in terms of Berkeley Packet Filter programs which implement
  550. task-defined system call filtering polices.
  551. See Documentation/userspace-api/seccomp_filter.rst for details.
  552. config SECCOMP_CACHE_DEBUG
  553. bool "Show seccomp filter cache status in /proc/pid/seccomp_cache"
  554. depends on SECCOMP_FILTER && !HAVE_SPARSE_SYSCALL_NR
  555. depends on PROC_FS
  556. help
  557. This enables the /proc/pid/seccomp_cache interface to monitor
  558. seccomp cache data. The file format is subject to change. Reading
  559. the file requires CAP_SYS_ADMIN.
  560. This option is for debugging only. Enabling presents the risk that
  561. an adversary may be able to infer the seccomp filter logic.
  562. If unsure, say N.
  563. config HAVE_ARCH_KSTACK_ERASE
  564. bool
  565. help
  566. An architecture should select this if it has the code which
  567. fills the used part of the kernel stack with the KSTACK_ERASE_POISON
  568. value before returning from system calls.
  569. config HAVE_STACKPROTECTOR
  570. bool
  571. help
  572. An arch should select this symbol if:
  573. - it has implemented a stack canary (e.g. __stack_chk_guard)
  574. config STACKPROTECTOR
  575. bool "Stack Protector buffer overflow detection"
  576. depends on HAVE_STACKPROTECTOR
  577. depends on $(cc-option,-fstack-protector)
  578. default y
  579. help
  580. This option turns on the "stack-protector" GCC feature. This
  581. feature puts, at the beginning of functions, a canary value on
  582. the stack just before the return address, and validates
  583. the value just before actually returning. Stack based buffer
  584. overflows (that need to overwrite this return address) now also
  585. overwrite the canary, which gets detected and the attack is then
  586. neutralized via a kernel panic.
  587. Functions will have the stack-protector canary logic added if they
  588. have an 8-byte or larger character array on the stack.
  589. This feature requires gcc version 4.2 or above, or a distribution
  590. gcc with the feature backported ("-fstack-protector").
  591. On an x86 "defconfig" build, this feature adds canary checks to
  592. about 3% of all kernel functions, which increases kernel code size
  593. by about 0.3%.
  594. config STACKPROTECTOR_STRONG
  595. bool "Strong Stack Protector"
  596. depends on STACKPROTECTOR
  597. depends on $(cc-option,-fstack-protector-strong)
  598. default y
  599. help
  600. Functions will have the stack-protector canary logic added in any
  601. of the following conditions:
  602. - local variable's address used as part of the right hand side of an
  603. assignment or function argument
  604. - local variable is an array (or union containing an array),
  605. regardless of array type or length
  606. - uses register local variables
  607. This feature requires gcc version 4.9 or above, or a distribution
  608. gcc with the feature backported ("-fstack-protector-strong").
  609. On an x86 "defconfig" build, this feature adds canary checks to
  610. about 20% of all kernel functions, which increases the kernel code
  611. size by about 2%.
  612. config ARCH_SUPPORTS_SHADOW_CALL_STACK
  613. bool
  614. help
  615. An architecture should select this if it supports the compiler's
  616. Shadow Call Stack and implements runtime support for shadow stack
  617. switching.
  618. config SHADOW_CALL_STACK
  619. bool "Shadow Call Stack"
  620. depends on ARCH_SUPPORTS_SHADOW_CALL_STACK
  621. depends on DYNAMIC_FTRACE_WITH_ARGS || DYNAMIC_FTRACE_WITH_REGS || !FUNCTION_GRAPH_TRACER
  622. depends on MMU
  623. help
  624. This option enables the compiler's Shadow Call Stack, which
  625. uses a shadow stack to protect function return addresses from
  626. being overwritten by an attacker. More information can be found
  627. in the compiler's documentation:
  628. - Clang: https://clang.llvm.org/docs/ShadowCallStack.html
  629. - GCC: https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#Instrumentation-Options
  630. Note that security guarantees in the kernel differ from the
  631. ones documented for user space. The kernel must store addresses
  632. of shadow stacks in memory, which means an attacker capable of
  633. reading and writing arbitrary memory may be able to locate them
  634. and hijack control flow by modifying the stacks.
  635. config DYNAMIC_SCS
  636. bool
  637. help
  638. Set by the arch code if it relies on code patching to insert the
  639. shadow call stack push and pop instructions rather than on the
  640. compiler.
  641. config LTO
  642. bool
  643. help
  644. Selected if the kernel will be built using the compiler's LTO feature.
  645. config LTO_CLANG
  646. bool
  647. select LTO
  648. help
  649. Selected if the kernel will be built using Clang's LTO feature.
  650. config ARCH_SUPPORTS_LTO_CLANG
  651. bool
  652. help
  653. An architecture should select this option if it supports:
  654. - compiling with Clang,
  655. - compiling inline assembly with Clang's integrated assembler,
  656. - and linking with LLD.
  657. config ARCH_SUPPORTS_LTO_CLANG_THIN
  658. bool
  659. help
  660. An architecture should select this option if it can support Clang's
  661. ThinLTO mode.
  662. config HAS_LTO_CLANG
  663. def_bool y
  664. depends on CC_IS_CLANG && LD_IS_LLD && AS_IS_LLVM
  665. depends on $(success,$(NM) --help | head -n 1 | grep -qi llvm)
  666. depends on $(success,$(AR) --help | head -n 1 | grep -qi llvm)
  667. depends on ARCH_SUPPORTS_LTO_CLANG
  668. depends on !FTRACE_MCOUNT_USE_RECORDMCOUNT
  669. # https://github.com/ClangBuiltLinux/linux/issues/1721
  670. depends on (!KASAN || KASAN_HW_TAGS || CLANG_VERSION >= 170000) || !DEBUG_INFO
  671. depends on (!KCOV || CLANG_VERSION >= 170000) || !DEBUG_INFO
  672. depends on !GCOV_KERNEL
  673. help
  674. The compiler and Kconfig options support building with Clang's
  675. LTO.
  676. choice
  677. prompt "Link Time Optimization (LTO)"
  678. default LTO_NONE
  679. help
  680. This option enables Link Time Optimization (LTO), which allows the
  681. compiler to optimize binaries globally.
  682. If unsure, select LTO_NONE. Note that LTO is very resource-intensive
  683. so it's disabled by default.
  684. config LTO_NONE
  685. bool "None"
  686. help
  687. Build the kernel normally, without Link Time Optimization (LTO).
  688. config LTO_CLANG_FULL
  689. bool "Clang Full LTO (EXPERIMENTAL)"
  690. depends on HAS_LTO_CLANG
  691. depends on !COMPILE_TEST
  692. select LTO_CLANG
  693. help
  694. This option enables Clang's full Link Time Optimization (LTO), which
  695. allows the compiler to optimize the kernel globally. If you enable
  696. this option, the compiler generates LLVM bitcode instead of ELF
  697. object files, and the actual compilation from bitcode happens at
  698. the LTO link step, which may take several minutes depending on the
  699. kernel configuration. More information can be found from LLVM's
  700. documentation:
  701. https://llvm.org/docs/LinkTimeOptimization.html
  702. During link time, this option can use a large amount of RAM, and
  703. may take much longer than the ThinLTO option.
  704. config LTO_CLANG_THIN
  705. bool "Clang ThinLTO (EXPERIMENTAL)"
  706. depends on HAS_LTO_CLANG && ARCH_SUPPORTS_LTO_CLANG_THIN
  707. select LTO_CLANG
  708. help
  709. This option enables Clang's ThinLTO, which allows for parallel
  710. optimization and faster incremental compiles compared to the
  711. CONFIG_LTO_CLANG_FULL option. More information can be found
  712. from Clang's documentation:
  713. https://clang.llvm.org/docs/ThinLTO.html
  714. If unsure, say Y.
  715. endchoice
  716. config ARCH_SUPPORTS_AUTOFDO_CLANG
  717. bool
  718. config AUTOFDO_CLANG
  719. bool "Enable Clang's AutoFDO build (EXPERIMENTAL)"
  720. depends on ARCH_SUPPORTS_AUTOFDO_CLANG
  721. depends on CC_IS_CLANG && CLANG_VERSION >= 170000
  722. help
  723. This option enables Clang’s AutoFDO build. When
  724. an AutoFDO profile is specified in variable
  725. CLANG_AUTOFDO_PROFILE during the build process,
  726. Clang uses the profile to optimize the kernel.
  727. If no profile is specified, AutoFDO options are
  728. still passed to Clang to facilitate the collection
  729. of perf data for creating an AutoFDO profile in
  730. subsequent builds.
  731. If unsure, say N.
  732. config ARCH_SUPPORTS_PROPELLER_CLANG
  733. bool
  734. config PROPELLER_CLANG
  735. bool "Enable Clang's Propeller build"
  736. depends on ARCH_SUPPORTS_PROPELLER_CLANG
  737. depends on CC_IS_CLANG && CLANG_VERSION >= 190000
  738. help
  739. This option enables Clang’s Propeller build. When the Propeller
  740. profiles is specified in variable CLANG_PROPELLER_PROFILE_PREFIX
  741. during the build process, Clang uses the profiles to optimize
  742. the kernel.
  743. If no profile is specified, Propeller options are still passed
  744. to Clang to facilitate the collection of perf data for creating
  745. the Propeller profiles in subsequent builds.
  746. If unsure, say N.
  747. config ARCH_SUPPORTS_CFI
  748. bool
  749. help
  750. An architecture should select this option if it can support Kernel
  751. Control-Flow Integrity (CFI) checking (-fsanitize=kcfi).
  752. config ARCH_USES_CFI_TRAPS
  753. bool
  754. help
  755. An architecture should select this option if it requires the
  756. .kcfi_traps section for KCFI trap handling.
  757. config ARCH_USES_CFI_GENERIC_LLVM_PASS
  758. bool
  759. help
  760. An architecture should select this option if it uses the generic
  761. KCFIPass in LLVM to expand kCFI bundles instead of architecture-specific
  762. lowering.
  763. config CFI
  764. bool "Use Kernel Control Flow Integrity (kCFI)"
  765. default CFI_CLANG
  766. depends on ARCH_SUPPORTS_CFI
  767. depends on $(cc-option,-fsanitize=kcfi)
  768. help
  769. This option enables forward-edge Control Flow Integrity (CFI)
  770. checking, where the compiler injects a runtime check to each
  771. indirect function call to ensure the target is a valid function with
  772. the correct static type. This restricts possible call targets and
  773. makes it more difficult for an attacker to exploit bugs that allow
  774. the modification of stored function pointers. More information can be
  775. found from Clang's documentation:
  776. https://clang.llvm.org/docs/ControlFlowIntegrity.html
  777. config CFI_CLANG
  778. bool
  779. transitional
  780. help
  781. Transitional config for CFI_CLANG to CFI migration.
  782. config CFI_ICALL_NORMALIZE_INTEGERS
  783. bool "Normalize CFI tags for integers"
  784. depends on CFI
  785. depends on HAVE_CFI_ICALL_NORMALIZE_INTEGERS
  786. help
  787. This option normalizes the CFI tags for integer types so that all
  788. integer types of the same size and signedness receive the same CFI
  789. tag.
  790. The option is separate from CONFIG_RUST because it affects the ABI.
  791. When working with build systems that care about the ABI, it is
  792. convenient to be able to turn on this flag first, before Rust is
  793. turned on.
  794. This option is necessary for using CFI with Rust. If unsure, say N.
  795. config HAVE_CFI_ICALL_NORMALIZE_INTEGERS
  796. def_bool y
  797. depends on $(cc-option,-fsanitize=kcfi -fsanitize-cfi-icall-experimental-normalize-integers)
  798. # With GCOV/KASAN we need this fix: https://github.com/llvm/llvm-project/pull/104826
  799. depends on CLANG_VERSION >= 190103 || (!GCOV_KERNEL && !KASAN_GENERIC && !KASAN_SW_TAGS)
  800. config HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC
  801. def_bool y
  802. depends on HAVE_CFI_ICALL_NORMALIZE_INTEGERS
  803. depends on RUSTC_VERSION >= 107900
  804. depends on ARM64 || X86_64
  805. # With GCOV/KASAN we need this fix: https://github.com/rust-lang/rust/pull/129373
  806. depends on (RUSTC_LLVM_VERSION >= 190103 && RUSTC_VERSION >= 108200) || \
  807. (!GCOV_KERNEL && !KASAN_GENERIC && !KASAN_SW_TAGS)
  808. config CFI_PERMISSIVE
  809. bool "Use CFI in permissive mode"
  810. depends on CFI
  811. help
  812. When selected, Control Flow Integrity (CFI) violations result in a
  813. warning instead of a kernel panic. This option should only be used
  814. for finding indirect call type mismatches during development.
  815. If unsure, say N.
  816. config HAVE_ARCH_WITHIN_STACK_FRAMES
  817. bool
  818. help
  819. An architecture should select this if it can walk the kernel stack
  820. frames to determine if an object is part of either the arguments
  821. or local variables (i.e. that it excludes saved return addresses,
  822. and similar) by implementing an inline arch_within_stack_frames(),
  823. which is used by CONFIG_HARDENED_USERCOPY.
  824. config HAVE_CONTEXT_TRACKING_USER
  825. bool
  826. help
  827. Provide kernel/user boundaries probes necessary for subsystems
  828. that need it, such as userspace RCU extended quiescent state.
  829. Syscalls need to be wrapped inside user_exit()-user_enter(), either
  830. optimized behind static key or through the slow path using TIF_NOHZ
  831. flag. Exceptions handlers must be wrapped as well. Irqs are already
  832. protected inside ct_irq_enter/ct_irq_exit() but preemption or signal
  833. handling on irq exit still need to be protected.
  834. config HAVE_CONTEXT_TRACKING_USER_OFFSTACK
  835. bool
  836. help
  837. Architecture neither relies on exception_enter()/exception_exit()
  838. nor on schedule_user(). Also preempt_schedule_notrace() and
  839. preempt_schedule_irq() can't be called in a preemptible section
  840. while context tracking is CT_STATE_USER. This feature reflects a sane
  841. entry implementation where the following requirements are met on
  842. critical entry code, ie: before user_exit() or after user_enter():
  843. - Critical entry code isn't preemptible (or better yet:
  844. not interruptible).
  845. - No use of RCU read side critical sections, unless ct_nmi_enter()
  846. got called.
  847. - No use of instrumentation, unless instrumentation_begin() got
  848. called.
  849. config HAVE_TIF_NOHZ
  850. bool
  851. help
  852. Arch relies on TIF_NOHZ and syscall slow path to implement context
  853. tracking calls to user_enter()/user_exit().
  854. config HAVE_VIRT_CPU_ACCOUNTING
  855. bool
  856. config HAVE_VIRT_CPU_ACCOUNTING_IDLE
  857. bool
  858. help
  859. Architecture has its own way to account idle CPU time and therefore
  860. doesn't implement vtime_account_idle().
  861. config ARCH_HAS_SCALED_CPUTIME
  862. bool
  863. config HAVE_VIRT_CPU_ACCOUNTING_GEN
  864. bool
  865. default y if 64BIT
  866. help
  867. With VIRT_CPU_ACCOUNTING_GEN, cputime_t becomes 64-bit.
  868. Before enabling this option, arch code must be audited
  869. to ensure there are no races in concurrent read/write of
  870. cputime_t. For example, reading/writing 64-bit cputime_t on
  871. some 32-bit arches may require multiple accesses, so proper
  872. locking is needed to protect against concurrent accesses.
  873. config HAVE_IRQ_TIME_ACCOUNTING
  874. bool
  875. help
  876. Archs need to ensure they use a high enough resolution clock to
  877. support irq time accounting and then call enable_sched_clock_irqtime().
  878. config HAVE_PV_STEAL_CLOCK_GEN
  879. bool
  880. config HAVE_MOVE_PUD
  881. bool
  882. help
  883. Architectures that select this are able to move page tables at the
  884. PUD level. If there are only 3 page table levels, the move effectively
  885. happens at the PGD level.
  886. config HAVE_MOVE_PMD
  887. bool
  888. help
  889. Archs that select this are able to move page tables at the PMD level.
  890. config HAVE_ARCH_TRANSPARENT_HUGEPAGE
  891. bool
  892. config HAVE_ARCH_TRANSPARENT_HUGEPAGE_PUD
  893. bool
  894. config HAVE_ARCH_HUGE_VMAP
  895. bool
  896. #
  897. # Archs that select this would be capable of PMD-sized vmaps (i.e.,
  898. # arch_vmap_pmd_supported() returns true). The VM_ALLOW_HUGE_VMAP flag
  899. # must be used to enable allocations to use hugepages.
  900. #
  901. config HAVE_ARCH_HUGE_VMALLOC
  902. depends on HAVE_ARCH_HUGE_VMAP
  903. bool
  904. config ARCH_WANT_HUGE_PMD_SHARE
  905. bool
  906. # Archs that want to use pmd_mkwrite on kernel memory need it defined even
  907. # if there are no userspace memory management features that use it
  908. config ARCH_WANT_KERNEL_PMD_MKWRITE
  909. bool
  910. config ARCH_WANT_PMD_MKWRITE
  911. def_bool TRANSPARENT_HUGEPAGE || ARCH_WANT_KERNEL_PMD_MKWRITE
  912. config HAVE_ARCH_SOFT_DIRTY
  913. bool
  914. config HAVE_MOD_ARCH_SPECIFIC
  915. bool
  916. help
  917. The arch uses struct mod_arch_specific to store data. Many arches
  918. just need a simple module loader without arch specific data - those
  919. should not enable this.
  920. config MODULES_USE_ELF_RELA
  921. bool
  922. help
  923. Modules only use ELF RELA relocations. Modules with ELF REL
  924. relocations will give an error.
  925. config MODULES_USE_ELF_REL
  926. bool
  927. help
  928. Modules only use ELF REL relocations. Modules with ELF RELA
  929. relocations will give an error.
  930. config ARCH_WANTS_MODULES_DATA_IN_VMALLOC
  931. bool
  932. help
  933. For architectures like powerpc/32 which have constraints on module
  934. allocation and need to allocate module data outside of module area.
  935. config ARCH_WANTS_EXECMEM_LATE
  936. bool
  937. help
  938. For architectures that do not allocate executable memory early on
  939. boot, but rather require its initialization late when there is
  940. enough entropy for module space randomization, for instance
  941. arm64.
  942. config ARCH_HAS_EXECMEM_ROX
  943. bool
  944. depends on MMU && !HIGHMEM
  945. help
  946. For architectures that support allocations of executable memory
  947. with read-only execute permissions. Architecture must implement
  948. execmem_fill_trapping_insns() callback to enable this.
  949. config HAVE_IRQ_EXIT_ON_IRQ_STACK
  950. bool
  951. help
  952. Architecture doesn't only execute the irq handler on the irq stack
  953. but also irq_exit(). This way we can process softirqs on this irq
  954. stack instead of switching to a new one when we call __do_softirq()
  955. in the end of an hardirq.
  956. This spares a stack switch and improves cache usage on softirq
  957. processing.
  958. config HAVE_SOFTIRQ_ON_OWN_STACK
  959. bool
  960. help
  961. Architecture provides a function to run __do_softirq() on a
  962. separate stack.
  963. config SOFTIRQ_ON_OWN_STACK
  964. def_bool HAVE_SOFTIRQ_ON_OWN_STACK && !PREEMPT_RT
  965. config ALTERNATE_USER_ADDRESS_SPACE
  966. bool
  967. help
  968. Architectures set this when the CPU uses separate address
  969. spaces for kernel and user space pointers. In this case, the
  970. access_ok() check on a __user pointer is skipped.
  971. config PGTABLE_LEVELS
  972. int
  973. default 2
  974. config ARCH_HAS_ELF_RANDOMIZE
  975. bool
  976. help
  977. An architecture supports choosing randomized locations for
  978. stack, mmap, brk, and ET_DYN. Defined functions:
  979. - arch_mmap_rnd()
  980. - arch_randomize_brk()
  981. config HAVE_ARCH_MMAP_RND_BITS
  982. bool
  983. help
  984. An arch should select this symbol if it supports setting a variable
  985. number of bits for use in establishing the base address for mmap
  986. allocations, has MMU enabled and provides values for both:
  987. - ARCH_MMAP_RND_BITS_MIN
  988. - ARCH_MMAP_RND_BITS_MAX
  989. config HAVE_EXIT_THREAD
  990. bool
  991. help
  992. An architecture implements exit_thread.
  993. config ARCH_MMAP_RND_BITS_MIN
  994. int
  995. config ARCH_MMAP_RND_BITS_MAX
  996. int
  997. config ARCH_MMAP_RND_BITS_DEFAULT
  998. int
  999. config ARCH_MMAP_RND_BITS
  1000. int "Number of bits to use for ASLR of mmap base address" if EXPERT
  1001. range ARCH_MMAP_RND_BITS_MIN ARCH_MMAP_RND_BITS_MAX
  1002. default ARCH_MMAP_RND_BITS_DEFAULT if ARCH_MMAP_RND_BITS_DEFAULT
  1003. default ARCH_MMAP_RND_BITS_MIN
  1004. depends on HAVE_ARCH_MMAP_RND_BITS
  1005. help
  1006. This value can be used to select the number of bits to use to
  1007. determine the random offset to the base address of vma regions
  1008. resulting from mmap allocations. This value will be bounded
  1009. by the architecture's minimum and maximum supported values.
  1010. This value can be changed after boot using the
  1011. /proc/sys/vm/mmap_rnd_bits tunable
  1012. config HAVE_ARCH_MMAP_RND_COMPAT_BITS
  1013. bool
  1014. help
  1015. An arch should select this symbol if it supports running applications
  1016. in compatibility mode, supports setting a variable number of bits for
  1017. use in establishing the base address for mmap allocations, has MMU
  1018. enabled and provides values for both:
  1019. - ARCH_MMAP_RND_COMPAT_BITS_MIN
  1020. - ARCH_MMAP_RND_COMPAT_BITS_MAX
  1021. config ARCH_MMAP_RND_COMPAT_BITS_MIN
  1022. int
  1023. config ARCH_MMAP_RND_COMPAT_BITS_MAX
  1024. int
  1025. config ARCH_MMAP_RND_COMPAT_BITS_DEFAULT
  1026. int
  1027. config ARCH_MMAP_RND_COMPAT_BITS
  1028. int "Number of bits to use for ASLR of mmap base address for compatible applications" if EXPERT
  1029. range ARCH_MMAP_RND_COMPAT_BITS_MIN ARCH_MMAP_RND_COMPAT_BITS_MAX
  1030. default ARCH_MMAP_RND_COMPAT_BITS_DEFAULT if ARCH_MMAP_RND_COMPAT_BITS_DEFAULT
  1031. default ARCH_MMAP_RND_COMPAT_BITS_MIN
  1032. depends on HAVE_ARCH_MMAP_RND_COMPAT_BITS
  1033. help
  1034. This value can be used to select the number of bits to use to
  1035. determine the random offset to the base address of vma regions
  1036. resulting from mmap allocations for compatible applications This
  1037. value will be bounded by the architecture's minimum and maximum
  1038. supported values.
  1039. This value can be changed after boot using the
  1040. /proc/sys/vm/mmap_rnd_compat_bits tunable
  1041. config HAVE_ARCH_COMPAT_MMAP_BASES
  1042. bool
  1043. help
  1044. This allows 64bit applications to invoke 32-bit mmap() syscall
  1045. and vice-versa 32-bit applications to call 64-bit mmap().
  1046. Required for applications doing different bitness syscalls.
  1047. config HAVE_PAGE_SIZE_4KB
  1048. bool
  1049. config HAVE_PAGE_SIZE_8KB
  1050. bool
  1051. config HAVE_PAGE_SIZE_16KB
  1052. bool
  1053. config HAVE_PAGE_SIZE_32KB
  1054. bool
  1055. config HAVE_PAGE_SIZE_64KB
  1056. bool
  1057. config HAVE_PAGE_SIZE_256KB
  1058. bool
  1059. choice
  1060. prompt "MMU page size"
  1061. config PAGE_SIZE_4KB
  1062. bool "4KiB pages"
  1063. depends on HAVE_PAGE_SIZE_4KB
  1064. help
  1065. This option select the standard 4KiB Linux page size and the only
  1066. available option on many architectures. Using 4KiB page size will
  1067. minimize memory consumption and is therefore recommended for low
  1068. memory systems.
  1069. Some software that is written for x86 systems makes incorrect
  1070. assumptions about the page size and only runs on 4KiB pages.
  1071. config PAGE_SIZE_8KB
  1072. bool "8KiB pages"
  1073. depends on HAVE_PAGE_SIZE_8KB
  1074. help
  1075. This option is the only supported page size on a few older
  1076. processors, and can be slightly faster than 4KiB pages.
  1077. config PAGE_SIZE_16KB
  1078. bool "16KiB pages"
  1079. depends on HAVE_PAGE_SIZE_16KB
  1080. help
  1081. This option is usually a good compromise between memory
  1082. consumption and performance for typical desktop and server
  1083. workloads, often saving a level of page table lookups compared
  1084. to 4KB pages as well as reducing TLB pressure and overhead of
  1085. per-page operations in the kernel at the expense of a larger
  1086. page cache.
  1087. config PAGE_SIZE_32KB
  1088. bool "32KiB pages"
  1089. depends on HAVE_PAGE_SIZE_32KB
  1090. help
  1091. Using 32KiB page size will result in slightly higher performance
  1092. kernel at the price of higher memory consumption compared to
  1093. 16KiB pages. This option is available only on cnMIPS cores.
  1094. Note that you will need a suitable Linux distribution to
  1095. support this.
  1096. config PAGE_SIZE_64KB
  1097. bool "64KiB pages"
  1098. depends on HAVE_PAGE_SIZE_64KB
  1099. help
  1100. Using 64KiB page size will result in slightly higher performance
  1101. kernel at the price of much higher memory consumption compared to
  1102. 4KiB or 16KiB pages.
  1103. This is not suitable for general-purpose workloads but the
  1104. better performance may be worth the cost for certain types of
  1105. supercomputing or database applications that work mostly with
  1106. large in-memory data rather than small files.
  1107. config PAGE_SIZE_256KB
  1108. bool "256KiB pages"
  1109. depends on HAVE_PAGE_SIZE_256KB
  1110. help
  1111. 256KiB pages have little practical value due to their extreme
  1112. memory usage. The kernel will only be able to run applications
  1113. that have been compiled with '-zmax-page-size' set to 256KiB
  1114. (the default is 64KiB or 4KiB on most architectures).
  1115. endchoice
  1116. config PAGE_SIZE_LESS_THAN_64KB
  1117. def_bool y
  1118. depends on !PAGE_SIZE_64KB
  1119. depends on PAGE_SIZE_LESS_THAN_256KB
  1120. config PAGE_SIZE_LESS_THAN_256KB
  1121. def_bool y
  1122. depends on !PAGE_SIZE_256KB
  1123. config PAGE_SHIFT
  1124. int
  1125. default 12 if PAGE_SIZE_4KB
  1126. default 13 if PAGE_SIZE_8KB
  1127. default 14 if PAGE_SIZE_16KB
  1128. default 15 if PAGE_SIZE_32KB
  1129. default 16 if PAGE_SIZE_64KB
  1130. default 18 if PAGE_SIZE_256KB
  1131. # This allows to use a set of generic functions to determine mmap base
  1132. # address by giving priority to top-down scheme only if the process
  1133. # is not in legacy mode (compat task, unlimited stack size or
  1134. # sysctl_legacy_va_layout).
  1135. # Architecture that selects this option can provide its own version of:
  1136. # - STACK_RND_MASK
  1137. config ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT
  1138. bool
  1139. depends on MMU
  1140. select ARCH_HAS_ELF_RANDOMIZE
  1141. config HAVE_OBJTOOL
  1142. bool
  1143. config HAVE_JUMP_LABEL_HACK
  1144. bool
  1145. config HAVE_NOINSTR_HACK
  1146. bool
  1147. config HAVE_NOINSTR_VALIDATION
  1148. bool
  1149. config HAVE_UACCESS_VALIDATION
  1150. bool
  1151. select OBJTOOL
  1152. config HAVE_STACK_VALIDATION
  1153. bool
  1154. help
  1155. Architecture supports objtool compile-time frame pointer rule
  1156. validation.
  1157. config HAVE_RELIABLE_STACKTRACE
  1158. bool
  1159. help
  1160. Architecture has either save_stack_trace_tsk_reliable() or
  1161. arch_stack_walk_reliable() function which only returns a stack trace
  1162. if it can guarantee the trace is reliable.
  1163. config HAVE_ARCH_HASH
  1164. bool
  1165. default n
  1166. help
  1167. If this is set, the architecture provides an <asm/hash.h>
  1168. file which provides platform-specific implementations of some
  1169. functions in <linux/hash.h> or fs/namei.c.
  1170. config HAVE_ARCH_NVRAM_OPS
  1171. bool
  1172. config ISA_BUS_API
  1173. def_bool ISA
  1174. #
  1175. # ABI hall of shame
  1176. #
  1177. config CLONE_BACKWARDS
  1178. bool
  1179. help
  1180. Architecture has tls passed as the 4th argument of clone(2),
  1181. not the 5th one.
  1182. config CLONE_BACKWARDS2
  1183. bool
  1184. help
  1185. Architecture has the first two arguments of clone(2) swapped.
  1186. config CLONE_BACKWARDS3
  1187. bool
  1188. help
  1189. Architecture has tls passed as the 3rd argument of clone(2),
  1190. not the 5th one.
  1191. config ODD_RT_SIGACTION
  1192. bool
  1193. help
  1194. Architecture has unusual rt_sigaction(2) arguments
  1195. config OLD_SIGSUSPEND
  1196. bool
  1197. help
  1198. Architecture has old sigsuspend(2) syscall, of one-argument variety
  1199. config OLD_SIGSUSPEND3
  1200. bool
  1201. help
  1202. Even weirder antique ABI - three-argument sigsuspend(2)
  1203. config OLD_SIGACTION
  1204. bool
  1205. help
  1206. Architecture has old sigaction(2) syscall. Nope, not the same
  1207. as OLD_SIGSUSPEND | OLD_SIGSUSPEND3 - alpha has sigsuspend(2),
  1208. but fairly different variant of sigaction(2), thanks to OSF/1
  1209. compatibility...
  1210. config COMPAT_OLD_SIGACTION
  1211. bool
  1212. config COMPAT_32BIT_TIME
  1213. bool "Provide system calls for 32-bit time_t"
  1214. default !64BIT || COMPAT
  1215. help
  1216. This enables 32 bit time_t support in addition to 64 bit time_t support.
  1217. This is relevant on all 32-bit architectures, and 64-bit architectures
  1218. as part of compat syscall handling.
  1219. config ARCH_NO_PREEMPT
  1220. bool
  1221. config ARCH_SUPPORTS_RT
  1222. bool
  1223. config CPU_NO_EFFICIENT_FFS
  1224. def_bool n
  1225. config HAVE_ARCH_VMAP_STACK
  1226. def_bool n
  1227. help
  1228. An arch should select this symbol if it can support kernel stacks
  1229. in vmalloc space. This means:
  1230. - vmalloc space must be large enough to hold many kernel stacks.
  1231. This may rule out many 32-bit architectures.
  1232. - Stacks in vmalloc space need to work reliably. For example, if
  1233. vmap page tables are created on demand, either this mechanism
  1234. needs to work while the stack points to a virtual address with
  1235. unpopulated page tables or arch code (switch_to() and switch_mm(),
  1236. most likely) needs to ensure that the stack's page table entries
  1237. are populated before running on a possibly unpopulated stack.
  1238. - If the stack overflows into a guard page, something reasonable
  1239. should happen. The definition of "reasonable" is flexible, but
  1240. instantly rebooting without logging anything would be unfriendly.
  1241. config VMAP_STACK
  1242. default y
  1243. bool "Use a virtually-mapped stack"
  1244. depends on HAVE_ARCH_VMAP_STACK
  1245. depends on !KASAN || KASAN_HW_TAGS || KASAN_VMALLOC
  1246. help
  1247. Enable this if you want the use virtually-mapped kernel stacks
  1248. with guard pages. This causes kernel stack overflows to be
  1249. caught immediately rather than causing difficult-to-diagnose
  1250. corruption.
  1251. To use this with software KASAN modes, the architecture must support
  1252. backing virtual mappings with real shadow memory, and KASAN_VMALLOC
  1253. must be enabled.
  1254. config HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
  1255. def_bool n
  1256. help
  1257. An arch should select this symbol if it can support kernel stack
  1258. offset randomization with calls to add_random_kstack_offset()
  1259. during syscall entry and choose_random_kstack_offset() during
  1260. syscall exit. Careful removal of -fstack-protector-strong and
  1261. -fstack-protector should also be applied to the entry code and
  1262. closely examined, as the artificial stack bump looks like an array
  1263. to the compiler, so it will attempt to add canary checks regardless
  1264. of the static branch state.
  1265. config RANDOMIZE_KSTACK_OFFSET
  1266. bool "Support for randomizing kernel stack offset on syscall entry" if EXPERT
  1267. default y
  1268. depends on HAVE_ARCH_RANDOMIZE_KSTACK_OFFSET
  1269. help
  1270. The kernel stack offset can be randomized (after pt_regs) by
  1271. roughly 5 bits of entropy, frustrating memory corruption
  1272. attacks that depend on stack address determinism or
  1273. cross-syscall address exposures.
  1274. The feature is controlled via the "randomize_kstack_offset=on/off"
  1275. kernel boot param, and if turned off has zero overhead due to its use
  1276. of static branches (see JUMP_LABEL).
  1277. If unsure, say Y.
  1278. config RANDOMIZE_KSTACK_OFFSET_DEFAULT
  1279. bool "Default state of kernel stack offset randomization"
  1280. depends on RANDOMIZE_KSTACK_OFFSET
  1281. help
  1282. Kernel stack offset randomization is controlled by kernel boot param
  1283. "randomize_kstack_offset=on/off", and this config chooses the default
  1284. boot state.
  1285. config ARCH_OPTIONAL_KERNEL_RWX
  1286. def_bool n
  1287. config ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
  1288. def_bool n
  1289. config ARCH_HAS_STRICT_KERNEL_RWX
  1290. def_bool n
  1291. config STRICT_KERNEL_RWX
  1292. bool "Make kernel text and rodata read-only" if ARCH_OPTIONAL_KERNEL_RWX
  1293. depends on ARCH_HAS_STRICT_KERNEL_RWX
  1294. default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
  1295. help
  1296. If this is set, kernel text and rodata memory will be made read-only,
  1297. and non-text memory will be made non-executable. This provides
  1298. protection against certain security exploits (e.g. executing the heap
  1299. or modifying text)
  1300. These features are considered standard security practice these days.
  1301. You should say Y here in almost all cases.
  1302. config ARCH_HAS_STRICT_MODULE_RWX
  1303. def_bool n
  1304. config STRICT_MODULE_RWX
  1305. bool "Set loadable kernel module data as NX and text as RO" if ARCH_OPTIONAL_KERNEL_RWX
  1306. depends on ARCH_HAS_STRICT_MODULE_RWX && MODULES
  1307. default !ARCH_OPTIONAL_KERNEL_RWX || ARCH_OPTIONAL_KERNEL_RWX_DEFAULT
  1308. help
  1309. If this is set, module text and rodata memory will be made read-only,
  1310. and non-text memory will be made non-executable. This provides
  1311. protection against certain security exploits (e.g. writing to text)
  1312. # select if the architecture provides an asm/dma-direct.h header
  1313. config ARCH_HAS_PHYS_TO_DMA
  1314. bool
  1315. config ARCH_HAS_CPU_RESCTRL
  1316. bool
  1317. help
  1318. An architecture selects this option to indicate that the necessary
  1319. hooks are provided to support the common memory system usage
  1320. monitoring and control interfaces provided by the 'resctrl'
  1321. filesystem (see RESCTRL_FS).
  1322. config HAVE_ARCH_COMPILER_H
  1323. bool
  1324. help
  1325. An architecture can select this if it provides an
  1326. asm/compiler.h header that should be included after
  1327. linux/compiler-*.h in order to override macro definitions that those
  1328. headers generally provide.
  1329. config HAVE_ARCH_LIBGCC_H
  1330. bool
  1331. help
  1332. An architecture can select this if it provides an
  1333. asm/libgcc.h header that should be included after
  1334. linux/libgcc.h in order to override macro definitions that
  1335. header generally provides.
  1336. config HAVE_ARCH_PREL32_RELOCATIONS
  1337. bool
  1338. help
  1339. May be selected by an architecture if it supports place-relative
  1340. 32-bit relocations, both in the toolchain and in the module loader,
  1341. in which case relative references can be used in special sections
  1342. for PCI fixup, initcalls etc which are only half the size on 64 bit
  1343. architectures, and don't require runtime relocation on relocatable
  1344. kernels.
  1345. config ARCH_USE_MEMREMAP_PROT
  1346. bool
  1347. config LOCK_EVENT_COUNTS
  1348. bool "Locking event counts collection"
  1349. depends on DEBUG_FS
  1350. help
  1351. Enable light-weight counting of various locking related events
  1352. in the system with minimal performance impact. This reduces
  1353. the chance of application behavior change because of timing
  1354. differences. The counts are reported via debugfs.
  1355. # Select if the architecture has support for applying RELR relocations.
  1356. config ARCH_HAS_RELR
  1357. bool
  1358. config RELR
  1359. bool "Use RELR relocation packing"
  1360. depends on ARCH_HAS_RELR && TOOLS_SUPPORT_RELR
  1361. default y
  1362. help
  1363. Store the kernel's dynamic relocations in the RELR relocation packing
  1364. format. Requires a compatible linker (LLD supports this feature), as
  1365. well as compatible NM and OBJCOPY utilities (llvm-nm and llvm-objcopy
  1366. are compatible).
  1367. config ARCH_HAS_MEM_ENCRYPT
  1368. bool
  1369. config ARCH_HAS_CC_PLATFORM
  1370. bool
  1371. config HAVE_SPARSE_SYSCALL_NR
  1372. bool
  1373. help
  1374. An architecture should select this if its syscall numbering is sparse
  1375. to save space. For example, MIPS architecture has a syscall array with
  1376. entries at 4000, 5000 and 6000 locations. This option turns on syscall
  1377. related optimizations for a given architecture.
  1378. config ARCH_HAS_VDSO_ARCH_DATA
  1379. depends on HAVE_GENERIC_VDSO
  1380. bool
  1381. config ARCH_HAS_VDSO_TIME_DATA
  1382. bool
  1383. config HAVE_STATIC_CALL
  1384. bool
  1385. config HAVE_STATIC_CALL_INLINE
  1386. bool
  1387. depends on HAVE_STATIC_CALL
  1388. select OBJTOOL
  1389. config HAVE_PREEMPT_DYNAMIC
  1390. bool
  1391. config HAVE_PREEMPT_DYNAMIC_CALL
  1392. bool
  1393. depends on HAVE_STATIC_CALL
  1394. select HAVE_PREEMPT_DYNAMIC
  1395. help
  1396. An architecture should select this if it can handle the preemption
  1397. model being selected at boot time using static calls.
  1398. Where an architecture selects HAVE_STATIC_CALL_INLINE, any call to a
  1399. preemption function will be patched directly.
  1400. Where an architecture does not select HAVE_STATIC_CALL_INLINE, any
  1401. call to a preemption function will go through a trampoline, and the
  1402. trampoline will be patched.
  1403. It is strongly advised to support inline static call to avoid any
  1404. overhead.
  1405. config HAVE_PREEMPT_DYNAMIC_KEY
  1406. bool
  1407. depends on HAVE_ARCH_JUMP_LABEL
  1408. select HAVE_PREEMPT_DYNAMIC
  1409. help
  1410. An architecture should select this if it can handle the preemption
  1411. model being selected at boot time using static keys.
  1412. Each preemption function will be given an early return based on a
  1413. static key. This should have slightly lower overhead than non-inline
  1414. static calls, as this effectively inlines each trampoline into the
  1415. start of its callee. This may avoid redundant work, and may
  1416. integrate better with CFI schemes.
  1417. This will have greater overhead than using inline static calls as
  1418. the call to the preemption function cannot be entirely elided.
  1419. config ARCH_WANT_LD_ORPHAN_WARN
  1420. bool
  1421. help
  1422. An arch should select this symbol once all linker sections are explicitly
  1423. included, size-asserted, or discarded in the linker scripts. This is
  1424. important because we never want expected sections to be placed heuristically
  1425. by the linker, since the locations of such sections can change between linker
  1426. versions.
  1427. config HAVE_ARCH_PFN_VALID
  1428. bool
  1429. config ARCH_SUPPORTS_DEBUG_PAGEALLOC
  1430. bool
  1431. config ARCH_SUPPORTS_PAGE_TABLE_CHECK
  1432. bool
  1433. config ARCH_SPLIT_ARG64
  1434. bool
  1435. help
  1436. If a 32-bit architecture requires 64-bit arguments to be split into
  1437. pairs of 32-bit arguments, select this option.
  1438. config ARCH_HAS_ELFCORE_COMPAT
  1439. bool
  1440. config ARCH_HAS_PARANOID_L1D_FLUSH
  1441. bool
  1442. config ARCH_HAVE_TRACE_MMIO_ACCESS
  1443. bool
  1444. config DYNAMIC_SIGFRAME
  1445. bool
  1446. # Select, if arch has a named attribute group bound to NUMA device nodes.
  1447. config HAVE_ARCH_NODE_DEV_GROUP
  1448. bool
  1449. config ARCH_HAS_HW_PTE_YOUNG
  1450. bool
  1451. help
  1452. Architectures that select this option are capable of setting the
  1453. accessed bit in PTE entries when using them as part of linear address
  1454. translations. Architectures that require runtime check should select
  1455. this option and override arch_has_hw_pte_young().
  1456. config ARCH_HAS_NONLEAF_PMD_YOUNG
  1457. bool
  1458. help
  1459. Architectures that select this option are capable of setting the
  1460. accessed bit in non-leaf PMD entries when using them as part of linear
  1461. address translations. Page table walkers that clear the accessed bit
  1462. may use this capability to reduce their search space.
  1463. config ARCH_HAS_KERNEL_FPU_SUPPORT
  1464. bool
  1465. help
  1466. Architectures that select this option can run floating-point code in
  1467. the kernel, as described in Documentation/core-api/floating-point.rst.
  1468. config ARCH_VMLINUX_NEEDS_RELOCS
  1469. bool
  1470. help
  1471. Whether the architecture needs vmlinux to be built with static
  1472. relocations preserved. This is used by some architectures to
  1473. construct bespoke relocation tables for KASLR.
  1474. # Select if architecture uses the common generic TIF bits
  1475. config HAVE_GENERIC_TIF_BITS
  1476. bool
  1477. source "kernel/gcov/Kconfig"
  1478. source "scripts/gcc-plugins/Kconfig"
  1479. config FUNCTION_ALIGNMENT_4B
  1480. bool
  1481. config FUNCTION_ALIGNMENT_8B
  1482. bool
  1483. config FUNCTION_ALIGNMENT_16B
  1484. bool
  1485. config FUNCTION_ALIGNMENT_32B
  1486. bool
  1487. config FUNCTION_ALIGNMENT_64B
  1488. bool
  1489. config FUNCTION_ALIGNMENT
  1490. int
  1491. default 64 if FUNCTION_ALIGNMENT_64B
  1492. default 32 if FUNCTION_ALIGNMENT_32B
  1493. default 16 if FUNCTION_ALIGNMENT_16B
  1494. default 8 if FUNCTION_ALIGNMENT_8B
  1495. default 4 if FUNCTION_ALIGNMENT_4B
  1496. default 0
  1497. config CC_HAS_MIN_FUNCTION_ALIGNMENT
  1498. # Detect availability of the GCC option -fmin-function-alignment which
  1499. # guarantees minimal alignment for all functions, unlike
  1500. # -falign-functions which the compiler ignores for cold functions.
  1501. def_bool $(cc-option, -fmin-function-alignment=8)
  1502. config CC_HAS_SANE_FUNCTION_ALIGNMENT
  1503. # Set if the guaranteed alignment with -fmin-function-alignment is
  1504. # available or extra care is required in the kernel. Clang provides
  1505. # strict alignment always, even with -falign-functions.
  1506. def_bool CC_HAS_MIN_FUNCTION_ALIGNMENT || CC_IS_CLANG
  1507. config ARCH_NEED_CMPXCHG_1_EMU
  1508. bool
  1509. config ARCH_WANTS_PRE_LINK_VMLINUX
  1510. bool
  1511. help
  1512. An architecture can select this if it provides arch/<arch>/tools/Makefile
  1513. with .arch.vmlinux.o target to be linked into vmlinux.
  1514. config ARCH_HAS_CPU_ATTACK_VECTORS
  1515. bool
  1516. endmenu