Kconfig (5270316c9fec8cc99aa0e0a258509c5c7f789d12) | Kconfig (c4ca2276f18ee638e4bb156126e6e1bf5e09f28e) |
---|---|
1# SPDX-License-Identifier: GPL-2.0 2# 3# General architecture dependent options 4# 5 6# 7# Note: arch/$(SRCARCH)/Kconfig needs to be included first so that it can 8# override the default values in this file. --- 785 unchanged lines hidden (view full) --- 794config ARCH_USES_CFI_TRAPS 795 bool 796 797config CFI_CLANG 798 bool "Use Clang's Control Flow Integrity (CFI)" 799 depends on ARCH_SUPPORTS_CFI_CLANG 800 depends on $(cc-option,-fsanitize=kcfi) 801 help | 1# SPDX-License-Identifier: GPL-2.0 2# 3# General architecture dependent options 4# 5 6# 7# Note: arch/$(SRCARCH)/Kconfig needs to be included first so that it can 8# override the default values in this file. --- 785 unchanged lines hidden (view full) --- 794config ARCH_USES_CFI_TRAPS 795 bool 796 797config CFI_CLANG 798 bool "Use Clang's Control Flow Integrity (CFI)" 799 depends on ARCH_SUPPORTS_CFI_CLANG 800 depends on $(cc-option,-fsanitize=kcfi) 801 help |
802 This option enables Clang’s forward-edge Control Flow Integrity | 802 This option enables Clang's forward-edge Control Flow Integrity |
803 (CFI) checking, where the compiler injects a runtime check to each 804 indirect function call to ensure the target is a valid function with 805 the correct static type. This restricts possible call targets and 806 makes it more difficult for an attacker to exploit bugs that allow 807 the modification of stored function pointers. More information can be 808 found from Clang's documentation: 809 810 https://clang.llvm.org/docs/ControlFlowIntegrity.html --- 262 unchanged lines hidden (view full) --- 1073 1074config HAVE_ARCH_COMPAT_MMAP_BASES 1075 bool 1076 help 1077 This allows 64bit applications to invoke 32-bit mmap() syscall 1078 and vice-versa 32-bit applications to call 64-bit mmap(). 1079 Required for applications doing different bitness syscalls. 1080 | 803 (CFI) checking, where the compiler injects a runtime check to each 804 indirect function call to ensure the target is a valid function with 805 the correct static type. This restricts possible call targets and 806 makes it more difficult for an attacker to exploit bugs that allow 807 the modification of stored function pointers. More information can be 808 found from Clang's documentation: 809 810 https://clang.llvm.org/docs/ControlFlowIntegrity.html --- 262 unchanged lines hidden (view full) --- 1073 1074config HAVE_ARCH_COMPAT_MMAP_BASES 1075 bool 1076 help 1077 This allows 64bit applications to invoke 32-bit mmap() syscall 1078 and vice-versa 32-bit applications to call 64-bit mmap(). 1079 Required for applications doing different bitness syscalls. 1080 |
1081config HAVE_PAGE_SIZE_4KB 1082 bool 1083 1084config HAVE_PAGE_SIZE_8KB 1085 bool 1086 1087config HAVE_PAGE_SIZE_16KB 1088 bool 1089 1090config HAVE_PAGE_SIZE_32KB 1091 bool 1092 1093config HAVE_PAGE_SIZE_64KB 1094 bool 1095 1096config HAVE_PAGE_SIZE_256KB 1097 bool 1098 1099choice 1100 prompt "MMU page size" 1101 1102config PAGE_SIZE_4KB 1103 bool "4KiB pages" 1104 depends on HAVE_PAGE_SIZE_4KB 1105 help 1106 This option select the standard 4KiB Linux page size and the only 1107 available option on many architectures. Using 4KiB page size will 1108 minimize memory consumption and is therefore recommended for low 1109 memory systems. 1110 Some software that is written for x86 systems makes incorrect 1111 assumptions about the page size and only runs on 4KiB pages. 1112 1113config PAGE_SIZE_8KB 1114 bool "8KiB pages" 1115 depends on HAVE_PAGE_SIZE_8KB 1116 help 1117 This option is the only supported page size on a few older 1118 processors, and can be slightly faster than 4KiB pages. 1119 1120config PAGE_SIZE_16KB 1121 bool "16KiB pages" 1122 depends on HAVE_PAGE_SIZE_16KB 1123 help 1124 This option is usually a good compromise between memory 1125 consumption and performance for typical desktop and server 1126 workloads, often saving a level of page table lookups compared 1127 to 4KB pages as well as reducing TLB pressure and overhead of 1128 per-page operations in the kernel at the expense of a larger 1129 page cache. 1130 1131config PAGE_SIZE_32KB 1132 bool "32KiB pages" 1133 depends on HAVE_PAGE_SIZE_32KB 1134 help 1135 Using 32KiB page size will result in slightly higher performance 1136 kernel at the price of higher memory consumption compared to 1137 16KiB pages. This option is available only on cnMIPS cores. 1138 Note that you will need a suitable Linux distribution to 1139 support this. 1140 1141config PAGE_SIZE_64KB 1142 bool "64KiB pages" 1143 depends on HAVE_PAGE_SIZE_64KB 1144 help 1145 Using 64KiB page size will result in slightly higher performance 1146 kernel at the price of much higher memory consumption compared to 1147 4KiB or 16KiB pages. 1148 This is not suitable for general-purpose workloads but the 1149 better performance may be worth the cost for certain types of 1150 supercomputing or database applications that work mostly with 1151 large in-memory data rather than small files. 1152 1153config PAGE_SIZE_256KB 1154 bool "256KiB pages" 1155 depends on HAVE_PAGE_SIZE_256KB 1156 help 1157 256KiB pages have little practical value due to their extreme 1158 memory usage. The kernel will only be able to run applications 1159 that have been compiled with '-zmax-page-size' set to 256KiB 1160 (the default is 64KiB or 4KiB on most architectures). 1161 1162endchoice 1163 |
|
1081config PAGE_SIZE_LESS_THAN_64KB 1082 def_bool y | 1164config PAGE_SIZE_LESS_THAN_64KB 1165 def_bool y |
1083 depends on !ARM64_64K_PAGES | |
1084 depends on !PAGE_SIZE_64KB | 1166 depends on !PAGE_SIZE_64KB |
1085 depends on !PARISC_PAGE_SIZE_64KB | |
1086 depends on PAGE_SIZE_LESS_THAN_256KB 1087 1088config PAGE_SIZE_LESS_THAN_256KB 1089 def_bool y 1090 depends on !PAGE_SIZE_256KB 1091 | 1167 depends on PAGE_SIZE_LESS_THAN_256KB 1168 1169config PAGE_SIZE_LESS_THAN_256KB 1170 def_bool y 1171 depends on !PAGE_SIZE_256KB 1172 |
1173config PAGE_SHIFT 1174 int 1175 default 12 if PAGE_SIZE_4KB 1176 default 13 if PAGE_SIZE_8KB 1177 default 14 if PAGE_SIZE_16KB 1178 default 15 if PAGE_SIZE_32KB 1179 default 16 if PAGE_SIZE_64KB 1180 default 18 if PAGE_SIZE_256KB 1181 |
|
1092# This allows to use a set of generic functions to determine mmap base 1093# address by giving priority to top-down scheme only if the process 1094# is not in legacy mode (compat task, unlimited stack size or 1095# sysctl_legacy_va_layout). 1096# Architecture that selects this option can provide its own version of: 1097# - STACK_RND_MASK 1098config ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT 1099 bool --- 402 unchanged lines hidden (view full) --- 1502 int 1503 default 64 if FUNCTION_ALIGNMENT_64B 1504 default 32 if FUNCTION_ALIGNMENT_32B 1505 default 16 if FUNCTION_ALIGNMENT_16B 1506 default 8 if FUNCTION_ALIGNMENT_8B 1507 default 4 if FUNCTION_ALIGNMENT_4B 1508 default 0 1509 | 1182# This allows to use a set of generic functions to determine mmap base 1183# address by giving priority to top-down scheme only if the process 1184# is not in legacy mode (compat task, unlimited stack size or 1185# sysctl_legacy_va_layout). 1186# Architecture that selects this option can provide its own version of: 1187# - STACK_RND_MASK 1188config ARCH_WANT_DEFAULT_TOPDOWN_MMAP_LAYOUT 1189 bool --- 402 unchanged lines hidden (view full) --- 1592 int 1593 default 64 if FUNCTION_ALIGNMENT_64B 1594 default 32 if FUNCTION_ALIGNMENT_32B 1595 default 16 if FUNCTION_ALIGNMENT_16B 1596 default 8 if FUNCTION_ALIGNMENT_8B 1597 default 4 if FUNCTION_ALIGNMENT_4B 1598 default 0 1599 |
1510config CC_HAS_MIN_FUNCTION_ALIGNMENT 1511 # Detect availability of the GCC option -fmin-function-alignment which 1512 # guarantees minimal alignment for all functions, unlike 1513 # -falign-functions which the compiler ignores for cold functions. 1514 def_bool $(cc-option, -fmin-function-alignment=8) 1515 1516config CC_HAS_SANE_FUNCTION_ALIGNMENT 1517 # Set if the guaranteed alignment with -fmin-function-alignment is 1518 # available or extra care is required in the kernel. Clang provides 1519 # strict alignment always, even with -falign-functions. 1520 def_bool CC_HAS_MIN_FUNCTION_ALIGNMENT || CC_IS_CLANG 1521 | |
1522endmenu | 1600endmenu |