forked from ~ljy/RK356X_SDK_RELEASE

hc
2023-12-08 01573e231f18eb2d99162747186f59511f56b64d
kernel/init/Kconfig
....@@ -1,3 +1,4 @@
1
+# SPDX-License-Identifier: GPL-2.0-only
12 config DEFCONFIG_LIST
23 string
34 depends on !UML
....@@ -5,19 +6,39 @@
56 default "/lib/modules/$(shell,uname -r)/.config"
67 default "/etc/kernel-config"
78 default "/boot/config-$(shell,uname -r)"
8
- default ARCH_DEFCONFIG
9
- default "arch/$(ARCH)/defconfig"
9
+ default "arch/$(SRCARCH)/configs/$(KBUILD_DEFCONFIG)"
10
+
11
+config CC_VERSION_TEXT
12
+ string
13
+ default "$(CC_VERSION_TEXT)"
14
+ help
15
+ This is used in unclear ways:
16
+
17
+ - Re-run Kconfig when the compiler is updated
18
+ The 'default' property references the environment variable,
19
+ CC_VERSION_TEXT so it is recorded in include/config/auto.conf.cmd.
20
+ When the compiler is updated, Kconfig will be invoked.
21
+
22
+ - Ensure full rebuild when the compier is updated
23
+ include/linux/kconfig.h contains this option in the comment line so
24
+ fixdep adds include/config/cc/version/text.h into the auto-generated
25
+ dependency. When the compiler is updated, syncconfig will touch it
26
+ and then every file will be rebuilt.
1027
1128 config CC_IS_GCC
12
- def_bool $(success,$(CC) --version | head -n 1 | grep -q gcc)
29
+ def_bool $(success,echo "$(CC_VERSION_TEXT)" | grep -q gcc)
1330
1431 config GCC_VERSION
1532 int
16
- default $(shell,$(srctree)/scripts/gcc-version.sh -p $(CC) | sed 's/^0*//') if CC_IS_GCC
33
+ default $(shell,$(srctree)/scripts/gcc-version.sh $(CC)) if CC_IS_GCC
1734 default 0
1835
36
+config LD_VERSION
37
+ int
38
+ default $(shell,$(LD) --version | $(srctree)/scripts/ld-version.sh)
39
+
1940 config CC_IS_CLANG
20
- def_bool $(success,$(CC) --version | head -n 1 | grep -q clang)
41
+ def_bool $(success,echo "$(CC_VERSION_TEXT)" | grep -q clang)
2142
2243 config LD_IS_LLD
2344 def_bool $(success,$(LD) -v | head -n 1 | grep -q LLD)
....@@ -30,11 +51,33 @@
3051 int
3152 default $(shell,$(srctree)/scripts/lld-version.sh $(LD))
3253
54
+config CC_CAN_LINK
55
+ bool
56
+ default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m64-flag)) if 64BIT
57
+ default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m32-flag))
58
+
59
+config CC_CAN_LINK_STATIC
60
+ bool
61
+ default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m64-flag) -static) if 64BIT
62
+ default $(success,$(srctree)/scripts/cc-can-link.sh $(CC) $(CLANG_FLAGS) $(USERCFLAGS) $(USERLDFLAGS) $(m32-flag) -static)
63
+
3364 config CC_HAS_ASM_GOTO
3465 def_bool $(success,$(srctree)/scripts/gcc-goto.sh $(CC))
3566
67
+config CC_HAS_ASM_GOTO_OUTPUT
68
+ depends on CC_HAS_ASM_GOTO
69
+ def_bool $(success,echo 'int foo(int x) { asm goto ("": "=r"(x) ::: bar); return x; bar: return 0; }' | $(CC) -x c - -c -o /dev/null)
70
+
71
+config CC_HAS_ASM_GOTO_TIED_OUTPUT
72
+ depends on CC_HAS_ASM_GOTO_OUTPUT
73
+ # Detect buggy gcc and clang, fixed in gcc-11 clang-14.
74
+ def_bool $(success,echo 'int foo(int *x) { asm goto (".long (%l[bar]) - .": "+m"(*x) ::: bar); return *x; bar: return 0; }' | $CC -x c - -c -o /dev/null)
75
+
3676 config TOOLS_SUPPORT_RELR
3777 def_bool $(success,env "CC=$(CC)" "LD=$(LD)" "NM=$(NM)" "OBJCOPY=$(OBJCOPY)" $(srctree)/scripts/tools-support-relr.sh)
78
+
79
+config CC_HAS_ASM_INLINE
80
+ def_bool $(success,echo 'void foo(void) { asm inline (""); }' | $(CC) -x c - -c -o /dev/null)
3881
3982 config CONSTRUCTORS
4083 bool
....@@ -43,7 +86,7 @@
4386 config IRQ_WORK
4487 bool
4588
46
-config BUILDTIME_EXTABLE_SORT
89
+config BUILDTIME_TABLE_SORT
4790 bool
4891
4992 config THREAD_INFO_IN_TASK
....@@ -88,6 +131,30 @@
88131 here. If you are a user/distributor, say N here to exclude useless
89132 drivers to be distributed.
90133
134
+config WERROR
135
+ bool "Compile the kernel with warnings as errors"
136
+ default y
137
+ help
138
+ A kernel build should not cause any compiler warnings, and this
139
+ enables the '-Werror' flag to enforce that rule by default.
140
+
141
+ However, if you have a new (or very old) compiler with odd and
142
+ unusual warnings, or you have some architecture with problems,
143
+ you may need to disable this config option in order to
144
+ successfully build the kernel.
145
+
146
+ If in doubt, say Y.
147
+
148
+config UAPI_HEADER_TEST
149
+ bool "Compile test UAPI headers"
150
+ depends on HEADERS_INSTALL && CC_CAN_LINK
151
+ help
152
+ Compile test headers exported to user-space to ensure they are
153
+ self-contained, i.e. compilable as standalone units.
154
+
155
+ If you are a developer or tester and want to ensure the exported
156
+ headers are self-contained, say Y here. Otherwise, choose N.
157
+
91158 config LOCALVERSION
92159 string "Local version - append to kernel release"
93160 help
....@@ -120,13 +187,13 @@
120187 which is done within the script "scripts/setlocalversion".)
121188
122189 config BUILD_SALT
123
- string "Build ID Salt"
124
- default ""
125
- help
126
- The build ID is used to link binaries and their debug info. Setting
127
- this option will use the value in the calculation of the build id.
128
- This is mostly useful for distributions which want to ensure the
129
- build is unique between builds. It's safe to leave the default.
190
+ string "Build ID Salt"
191
+ default ""
192
+ help
193
+ The build ID is used to link binaries and their debug info. Setting
194
+ this option will use the value in the calculation of the build id.
195
+ This is mostly useful for distributions which want to ensure the
196
+ build is unique between builds. It's safe to leave the default.
130197
131198 config HAVE_KERNEL_GZIP
132199 bool
....@@ -146,13 +213,16 @@
146213 config HAVE_KERNEL_LZ4
147214 bool
148215
216
+config HAVE_KERNEL_ZSTD
217
+ bool
218
+
149219 config HAVE_KERNEL_UNCOMPRESSED
150220 bool
151221
152222 choice
153223 prompt "Kernel compression mode"
154224 default KERNEL_GZIP
155
- depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO || HAVE_KERNEL_LZ4 || HAVE_KERNEL_UNCOMPRESSED
225
+ depends on HAVE_KERNEL_GZIP || HAVE_KERNEL_BZIP2 || HAVE_KERNEL_LZMA || HAVE_KERNEL_XZ || HAVE_KERNEL_LZO || HAVE_KERNEL_LZ4 || HAVE_KERNEL_ZSTD || HAVE_KERNEL_UNCOMPRESSED
156226 help
157227 The linux kernel is a kind of self-extracting executable.
158228 Several compression algorithms are available, which differ
....@@ -231,6 +301,16 @@
231301 is about 8% bigger than LZO. But the decompression speed is
232302 faster than LZO.
233303
304
+config KERNEL_ZSTD
305
+ bool "ZSTD"
306
+ depends on HAVE_KERNEL_ZSTD
307
+ help
308
+ ZSTD is a compression algorithm targeting intermediate compression
309
+ with fast decompression speed. It will compress better than GZIP and
310
+ decompress around the same speed as LZO, but slower than LZ4. You
311
+ will need at least 192 KB RAM or more for booting. The zstd command
312
+ line tool is required for compression.
313
+
234314 config KERNEL_UNCOMPRESSED
235315 bool "None"
236316 depends on HAVE_KERNEL_UNCOMPRESSED
....@@ -242,6 +322,16 @@
242322 and jump right at uncompressed kernel image.
243323
244324 endchoice
325
+
326
+config DEFAULT_INIT
327
+ string "Default init path"
328
+ default ""
329
+ help
330
+ This option determines the default init for the system if no init=
331
+ option is passed on the kernel command line. If the requested path is
332
+ not present, we will still then move on to attempting further
333
+ locations (e.g. /sbin/init, etc). If this is empty, we will just use
334
+ the fallback list when init= is not passed.
245335
246336 config DEFAULT_HOSTNAME
247337 string "Default hostname"
....@@ -271,7 +361,7 @@
271361
272362 config SYSVIPC
273363 bool "System V IPC"
274
- ---help---
364
+ help
275365 Inter Process Communication is a suite of library functions and
276366 system calls which let processes (running programs) synchronize and
277367 exchange information. It is generally considered to be a good thing,
....@@ -293,7 +383,7 @@
293383 config POSIX_MQUEUE
294384 bool "POSIX Message Queues"
295385 depends on NET
296
- ---help---
386
+ help
297387 POSIX variant of message queues is a part of IPC. In POSIX message
298388 queues every message has a priority which decides about succession
299389 of receiving it by a process. If you want to compile and run
....@@ -311,6 +401,18 @@
311401 depends on POSIX_MQUEUE
312402 depends on SYSCTL
313403 default y
404
+
405
+config WATCH_QUEUE
406
+ bool "General notification queue"
407
+ default n
408
+ help
409
+
410
+ This is a general notification queue for the kernel to pass events to
411
+ userspace by splicing them into pipes. It can be used in conjunction
412
+ with watches for key/keyring change notifications and device
413
+ notifications.
414
+
415
+ See Documentation/watch_queue.rst
314416
315417 config CROSS_MEMORY_ATTACH
316418 bool "Enable process_vm_readv/writev syscalls"
....@@ -338,29 +440,15 @@
338440 help
339441 Enable auditing infrastructure that can be used with another
340442 kernel subsystem, such as SELinux (which requires this for
341
- logging of avc messages output). Does not do system-call
342
- auditing without CONFIG_AUDITSYSCALL.
443
+ logging of avc messages output). System call auditing is included
444
+ on architectures which support it.
343445
344446 config HAVE_ARCH_AUDITSYSCALL
345447 bool
346448
347449 config AUDITSYSCALL
348
- bool "Enable system-call auditing support"
450
+ def_bool y
349451 depends on AUDIT && HAVE_ARCH_AUDITSYSCALL
350
- default y if SECURITY_SELINUX
351
- help
352
- Enable low-overhead system-call auditing infrastructure that
353
- can be used independently or with another kernel subsystem,
354
- such as SELinux.
355
-
356
-config AUDIT_WATCH
357
- def_bool y
358
- depends on AUDITSYSCALL
359
- select FSNOTIFY
360
-
361
-config AUDIT_TREE
362
- def_bool y
363
- depends on AUDITSYSCALL
364452 select FSNOTIFY
365453
366454 source "kernel/irq/Kconfig"
....@@ -405,6 +493,7 @@
405493 bool "Full dynticks CPU time accounting"
406494 depends on HAVE_CONTEXT_TRACKING
407495 depends on HAVE_VIRT_CPU_ACCOUNTING_GEN
496
+ depends on GENERIC_CLOCKEVENTS
408497 select VIRT_CPU_ACCOUNTING
409498 select CONTEXT_TRACKING
410499 help
....@@ -436,6 +525,25 @@
436525 def_bool y
437526 depends on IRQ_TIME_ACCOUNTING || PARAVIRT_TIME_ACCOUNTING
438527 depends on SMP
528
+
529
+config SCHED_THERMAL_PRESSURE
530
+ bool
531
+ default y if ARM && ARM_CPU_TOPOLOGY
532
+ default y if ARM64
533
+ depends on SMP
534
+ depends on CPU_FREQ_THERMAL
535
+ help
536
+ Select this option to enable thermal pressure accounting in the
537
+ scheduler. Thermal pressure is the value conveyed to the scheduler
538
+ that reflects the reduction in CPU compute capacity resulted from
539
+ thermal throttling. Thermal throttling occurs when the performance of
540
+ a CPU is capped due to high operating temperatures.
541
+
542
+ If selected, the scheduler will be able to balance tasks accordingly,
543
+ i.e. put less load on throttled CPUs than on non/less throttled ones.
544
+
545
+ This requires the architecture to implement
546
+ arch_set_thermal_pressure() and arch_get_thermal_pressure().
439547
440548 config BSD_PROCESS_ACCT
441549 bool "BSD Process Accounting"
....@@ -522,7 +630,7 @@
522630 have cpu.pressure, memory.pressure, and io.pressure files,
523631 which aggregate pressure stalls for the grouped tasks only.
524632
525
- For more details see Documentation/accounting/psi.txt.
633
+ For more details see Documentation/accounting/psi.rst.
526634
527635 Say N if unsure.
528636
....@@ -568,8 +676,7 @@
568676
569677 config IKCONFIG
570678 tristate "Kernel .config support"
571
- select BUILD_BIN2C
572
- ---help---
679
+ help
573680 This option enables the complete Linux kernel ".config" file
574681 contents to be saved in the kernel. It provides documentation
575682 of which kernel options are used in a running kernel or in an
....@@ -582,7 +689,7 @@
582689 config IKCONFIG_PROC
583690 bool "Enable access to .config through /proc/config.gz"
584691 depends on IKCONFIG && PROC_FS
585
- ---help---
692
+ help
586693 This option enables access to the kernel configuration file
587694 through /proc/config.gz.
588695
....@@ -634,7 +741,7 @@
634741 with more CPUs. Therefore this value is used only when the sum of
635742 contributions is greater than the half of the default kernel ring
636743 buffer as defined by LOG_BUF_SHIFT. The default values are set
637
- so that more than 64 CPUs are needed to trigger the allocation.
744
+ so that more than 16 CPUs are needed to trigger the allocation.
638745
639746 Also this option is ignored when "log_buf_len" kernel parameter is
640747 used as it forces an exact (power of two) size of the ring buffer.
....@@ -754,6 +861,9 @@
754861 config ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
755862 bool
756863
864
+config CC_HAS_INT128
865
+ def_bool !$(cc-option,$(m64-flag) -D__SIZEOF_INT128__=0) && 64BIT
866
+
757867 #
758868 # For architectures that know their GCC __int128 support is sound
759869 #
....@@ -770,7 +880,7 @@
770880 bool "Memory placement aware NUMA scheduler"
771881 depends on ARCH_SUPPORTS_NUMA_BALANCING
772882 depends on !ARCH_WANT_NUMA_VARIABLE_LOCALITY
773
- depends on SMP && NUMA && MIGRATION
883
+ depends on SMP && NUMA && MIGRATION && !PREEMPT_RT
774884 help
775885 This option adds support for automatic NUMA aware memory/task placement.
776886 The mechanism is quite primitive and is based on migrating memory when
....@@ -794,8 +904,8 @@
794904 use with process control subsystems such as Cpusets, CFS, memory
795905 controls or device isolation.
796906 See
797
- - Documentation/scheduler/sched-design-CFS.txt (CFS)
798
- - Documentation/cgroup-v1/ (features for grouping, isolation
907
+ - Documentation/scheduler/sched-design-CFS.rst (CFS)
908
+ - Documentation/admin-guide/cgroup-v1/ (features for grouping, isolation
799909 and resource control)
800910
801911 Say N if unsure.
....@@ -803,7 +913,7 @@
803913 if CGROUPS
804914
805915 config PAGE_COUNTER
806
- bool
916
+ bool
807917
808918 config MEMCG
809919 bool "Memory controller"
....@@ -813,24 +923,9 @@
813923 Provides control over the memory footprint of tasks in a cgroup.
814924
815925 config MEMCG_SWAP
816
- bool "Swap controller"
926
+ bool
817927 depends on MEMCG && SWAP
818
- help
819
- Provides control over the swap space consumed by tasks in a cgroup.
820
-
821
-config MEMCG_SWAP_ENABLED
822
- bool "Swap controller enabled by default"
823
- depends on MEMCG_SWAP
824928 default y
825
- help
826
- Memory Resource Controller Swap Extension comes with its price in
827
- a bigger memory consumption. General purpose distribution kernels
828
- which want to enable the feature but keep it disabled by default
829
- and let the user enable it by swapaccount=1 boot command line
830
- parameter should have this option unselected.
831
- For those who want to have the feature enabled by default should
832
- select this option (if, for some reason, they need to disable it
833
- then swapaccount=0 does the trick).
834929
835930 config MEMCG_KMEM
836931 bool
....@@ -841,7 +936,7 @@
841936 bool "IO controller"
842937 depends on BLOCK
843938 default n
844
- ---help---
939
+ help
845940 Generic block IO controller cgroup interface. This is the common
846941 cgroup interface which should be used by various IO controlling
847942 policies.
....@@ -854,18 +949,10 @@
854949 This option only enables generic Block IO controller infrastructure.
855950 One needs to also enable actual IO controlling logic/policy. For
856951 enabling proportional weight division of disk bandwidth in CFQ, set
857
- CONFIG_CFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
952
+ CONFIG_BFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
858953 CONFIG_BLK_DEV_THROTTLING=y.
859954
860
- See Documentation/cgroup-v1/blkio-controller.txt for more information.
861
-
862
-config DEBUG_BLK_CGROUP
863
- bool "IO controller debugging"
864
- depends on BLK_CGROUP
865
- default n
866
- ---help---
867
- Enable some debugging help. Currently it exports additional stat
868
- files in a cgroup which can be useful for debugging.
955
+ See Documentation/admin-guide/cgroup-v1/blkio-controller.rst for more information.
869956
870957 config CGROUP_WRITEBACK
871958 bool
....@@ -895,18 +982,19 @@
895982 tasks running within the fair group scheduler. Groups with no limit
896983 set are considered to be unconstrained and will run with no
897984 restriction.
898
- See Documentation/scheduler/sched-bwc.txt for more information.
985
+ See Documentation/scheduler/sched-bwc.rst for more information.
899986
900987 config RT_GROUP_SCHED
901988 bool "Group scheduling for SCHED_RR/FIFO"
902989 depends on CGROUP_SCHED
990
+ depends on !PREEMPT_RT
903991 default n
904992 help
905993 This feature lets you explicitly allocate real CPU bandwidth
906994 to task groups. If enabled, it will also make it impossible to
907995 schedule realtime tasks for non-root users until you allocate
908996 realtime bandwidth for them.
909
- See Documentation/scheduler/sched-rt-group.txt for more information.
997
+ See Documentation/scheduler/sched-rt-group.rst for more information.
910998
911999 endif #CGROUP_SCHED
9121000
....@@ -944,7 +1032,7 @@
9441032 PIDs controller is designed to stop this from happening.
9451033
9461034 It should be noted that organisational operations (such as attaching
947
- to a cgroup hierarchy will *not* be blocked by the PIDs controller),
1035
+ to a cgroup hierarchy) will *not* be blocked by the PIDs controller,
9481036 since the PIDs limit only affects a process's ability to fork, not to
9491037 attach to a cgroup.
9501038
....@@ -1019,7 +1107,8 @@
10191107 help
10201108 This option extends the perf per-cpu mode to restrict monitoring
10211109 to threads which belong to the cgroup specified and run on the
1022
- designated cpu.
1110
+ designated cpu. Or this can be used to have cgroup ID in samples
1111
+ so that it can monitor performance events among cgroups.
10231112
10241113 Say N if unsure.
10251114
....@@ -1073,6 +1162,14 @@
10731162 In this namespace tasks see different info provided with the
10741163 uname() system call
10751164
1165
+config TIME_NS
1166
+ bool "TIME namespace"
1167
+ depends on GENERIC_VDSO_TIME_NS
1168
+ default y
1169
+ help
1170
+ In this namespace boottime and monotonic clocks can be set.
1171
+ The time will keep going with the same pace.
1172
+
10761173 config IPC_NS
10771174 bool "IPC namespace"
10781175 depends on (SYSVIPC || POSIX_MQUEUE)
....@@ -1116,6 +1213,7 @@
11161213 config CHECKPOINT_RESTORE
11171214 bool "Checkpoint/restore support"
11181215 select PROC_CHILDREN
1216
+ select KCMP
11191217 default n
11201218 help
11211219 Enables additional kernel features in a sake of checkpoint/restore.
....@@ -1137,29 +1235,16 @@
11371235 desktop applications. Task group autogeneration is currently based
11381236 upon task session.
11391237
1140
-config SCHED_TUNE
1141
- bool "Boosting for CFS tasks (EXPERIMENTAL)"
1142
- depends on !UCLAMP_TASK
1143
- depends on SMP
1144
- help
1145
- This option enables support for task classification using a new
1146
- cgroup controller, schedtune. Schedtune allows tasks to be given
1147
- a boost value and marked as latency-sensitive or not. This option
1148
- provides the "schedtune" controller.
1149
-
1150
- This new controller:
1151
- 1. allows only a two layers hierarchy, where the root defines the
1152
- system-wide boost value and its direct childrens define each one a
1153
- different "class of tasks" to be boosted with a different value
1154
- 2. supports up to 16 different task classes, each one which could be
1155
- configured with a different boost value
1156
-
1157
- Latency-sensitive tasks are not subject to energy-aware wakeup
1158
- task placement. The boost value assigned to tasks is used to
1159
- influence task placement and CPU frequency selection (if
1160
- utilization-driven frequency selection is in use).
1161
-
1162
- If unsure, say N.
1238
+config RT_SOFTINT_OPTIMIZATION
1239
+ bool "Improve RT scheduling during long softint execution"
1240
+ depends on ARM64
1241
+ depends on SMP
1242
+ default n
1243
+ help
1244
+ Enable an optimization which tries to avoid placing RT tasks on CPUs
1245
+ occupied by nonpreemptible tasks, such as a long softint, or CPUs
1246
+ which may soon block preemptions, such as a CPU running a ksoftirq
1247
+ thread which handles slow softints.
11631248
11641249 config SYSFS_DEPRECATED
11651250 bool "Enable deprecated sysfs features to support old userspace tools"
....@@ -1232,16 +1317,9 @@
12321317
12331318 config INITRD_ASYNC
12341319 bool "Initrd async"
1320
+ depends on NO_GKI
12351321 help
12361322 Init ramdisk async, can reduce kernel init time.
1237
-
1238
-config ROCKCHIP_ONE_INITRD
1239
- bool "Detect only one initrd"
1240
- depends on ARCH_ROCKCHIP
1241
- default ARCH_ROCKCHIP
1242
- help
1243
- RK bootloader does not put a correct size to cmdline.
1244
- Directly return when we get a good initrd.
12451323
12461324 endif
12471325
....@@ -1254,24 +1332,41 @@
12541332 initcall_nr_threads default is 0, which disable intcall async.
12551333 initcall_nr_threads=-1, auto selected the number of threads.
12561334
1335
+config BOOT_CONFIG
1336
+ bool "Boot config support"
1337
+ select BLK_DEV_INITRD
1338
+ help
1339
+ Extra boot config allows system admin to pass a config file as
1340
+ complemental extension of kernel cmdline when booting.
1341
+ The boot config file must be attached at the end of initramfs
1342
+ with checksum, size and magic word.
1343
+ See <file:Documentation/admin-guide/bootconfig.rst> for details.
1344
+
1345
+ If unsure, say Y.
1346
+
12571347 choice
12581348 prompt "Compiler optimization level"
12591349 default CC_OPTIMIZE_FOR_PERFORMANCE
12601350
12611351 config CC_OPTIMIZE_FOR_PERFORMANCE
1262
- bool "Optimize for performance"
1352
+ bool "Optimize for performance (-O2)"
12631353 help
12641354 This is the default optimization level for the kernel, building
12651355 with the "-O2" compiler flag for best performance and most
12661356 helpful compile-time warnings.
12671357
1268
-config CC_OPTIMIZE_FOR_SIZE
1269
- bool "Optimize for size"
1358
+config CC_OPTIMIZE_FOR_PERFORMANCE_O3
1359
+ bool "Optimize more for performance (-O3)"
1360
+ depends on ARC
12701361 help
1271
- Enabling this option will pass "-Os" instead of "-O2" to
1272
- your compiler resulting in a smaller kernel.
1362
+ Choosing this option will pass "-O3" to your compiler to optimize
1363
+ the kernel yet more for performance.
12731364
1274
- If unsure, say N.
1365
+config CC_OPTIMIZE_FOR_SIZE
1366
+ bool "Optimize for size (-Os)"
1367
+ help
1368
+ Choosing this option will pass "-Os" to your compiler resulting
1369
+ in a smaller kernel.
12751370
12761371 endchoice
12771372
....@@ -1289,7 +1384,6 @@
12891384 bool "Dead code and data elimination (EXPERIMENTAL)"
12901385 depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION
12911386 depends on EXPERT
1292
- depends on !(FUNCTION_TRACER && CC_IS_GCC && GCC_VERSION < 40800)
12931387 depends on $(cc-option,-ffunction-sections -fdata-sections)
12941388 depends on $(ld-option,--gc-sections)
12951389 help
....@@ -1303,6 +1397,12 @@
13031397 silently broken kernel if the required annotations are not
13041398 present. This option is not well tested yet, so use at your
13051399 own risk.
1400
+
1401
+config LD_ORPHAN_WARN
1402
+ def_bool y
1403
+ depends on ARCH_WANT_LD_ORPHAN_WARN
1404
+ depends on !LD_IS_LLD || LLD_VERSION >= 110000
1405
+ depends on $(ld-option,--orphan-handling=warn)
13061406
13071407 config SYSCTL
13081408 bool
....@@ -1343,9 +1443,9 @@
13431443 select DEBUG_KERNEL
13441444 help
13451445 This option allows certain base kernel options and settings
1346
- to be disabled or tweaked. This is for specialized
1347
- environments which can tolerate a "non-standard" kernel.
1348
- Only use this if you really know what you are doing.
1446
+ to be disabled or tweaked. This is for specialized
1447
+ environments which can tolerate a "non-standard" kernel.
1448
+ Only use this if you really know what you are doing.
13491449
13501450 config UID16
13511451 bool "Enable 16-bit UID system calls" if EXPERT
....@@ -1371,7 +1471,7 @@
13711471 config SGETMASK_SYSCALL
13721472 bool "sgetmask/ssetmask syscalls support" if EXPERT
13731473 def_bool PARISC || M68K || PPC || MIPS || X86 || SPARC || MICROBLAZE || SUPERH
1374
- ---help---
1474
+ help
13751475 sys_sgetmask and sys_ssetmask are obsolete system calls
13761476 no longer supported in libc but still enabled by default in some
13771477 architectures.
....@@ -1381,29 +1481,12 @@
13811481 config SYSFS_SYSCALL
13821482 bool "Sysfs syscall support" if EXPERT
13831483 default y
1384
- ---help---
1484
+ help
13851485 sys_sysfs is an obsolete system call no longer supported in libc.
13861486 Note that disabling this option is more secure but might break
13871487 compatibility with some systems.
13881488
13891489 If unsure say Y here.
1390
-
1391
-config SYSCTL_SYSCALL
1392
- bool "Sysctl syscall support" if EXPERT
1393
- depends on PROC_SYSCTL
1394
- default n
1395
- select SYSCTL
1396
- ---help---
1397
- sys_sysctl uses binary paths that have been found challenging
1398
- to properly maintain and use. The interface in /proc/sys
1399
- using paths with ascii names is now the primary path to this
1400
- information.
1401
-
1402
- Almost nothing using the binary sysctl interface so if you are
1403
- trying to save some space it is probably safe to disable this,
1404
- making your kernel marginally smaller.
1405
-
1406
- If unsure say N here.
14071490
14081491 config FHANDLE
14091492 bool "open by fhandle syscalls" if EXPERT
....@@ -1455,11 +1538,11 @@
14551538 bool "BUG() support" if EXPERT
14561539 default y
14571540 help
1458
- Disabling this option eliminates support for BUG and WARN, reducing
1459
- the size of your kernel image and potentially quietly ignoring
1460
- numerous fatal conditions. You should only consider disabling this
1461
- option for embedded systems with no facilities for reporting errors.
1462
- Just say Y.
1541
+ Disabling this option eliminates support for BUG and WARN, reducing
1542
+ the size of your kernel image and potentially quietly ignoring
1543
+ numerous fatal conditions. You should only consider disabling this
1544
+ option for embedded systems with no facilities for reporting errors.
1545
+ Just say Y.
14631546
14641547 config ELF_CORE
14651548 depends on COREDUMP
....@@ -1475,8 +1558,8 @@
14751558 select I8253_LOCK
14761559 default y
14771560 help
1478
- This option allows to disable the internal PC-Speaker
1479
- support, saving some memory.
1561
+ This option allows to disable the internal PC-Speaker
1562
+ support, saving some memory.
14801563
14811564 config BASE_FULL
14821565 default y
....@@ -1561,6 +1644,15 @@
15611644 by some high performance threaded applications. Disabling
15621645 this option saves about 7k.
15631646
1647
+config IO_URING
1648
+ bool "Enable IO uring support" if EXPERT
1649
+ select IO_WQ
1650
+ default y
1651
+ help
1652
+ This option enables support for the io_uring interface, enabling
1653
+ applications to submit and complete IO through submission and
1654
+ completion rings that are shared between the kernel and application.
1655
+
15641656 config ADVISE_SYSCALLS
15651657 bool "Enable madvise/fadvise syscalls" if EXPERT
15661658 default y
....@@ -1570,6 +1662,16 @@
15701662 usage, improving performance. If building an embedded system where no
15711663 applications use these syscalls, you can disable this option to save
15721664 space.
1665
+
1666
+config HAVE_ARCH_USERFAULTFD_WP
1667
+ bool
1668
+ help
1669
+ Arch has userfaultfd write protection support
1670
+
1671
+config HAVE_ARCH_USERFAULTFD_MINOR
1672
+ bool
1673
+ help
1674
+ Arch has userfaultfd minor fault support
15731675
15741676 config MEMBARRIER
15751677 bool "Enable membarrier() system call" if EXPERT
....@@ -1584,29 +1686,29 @@
15841686 If unsure, say Y.
15851687
15861688 config KALLSYMS
1587
- bool "Load all symbols for debugging/ksymoops" if EXPERT
1588
- default y
1589
- help
1590
- Say Y here to let the kernel print out symbolic crash information and
1591
- symbolic stack backtraces. This increases the size of the kernel
1592
- somewhat, as all symbols have to be loaded into the kernel image.
1689
+ bool "Load all symbols for debugging/ksymoops" if EXPERT
1690
+ default y
1691
+ help
1692
+ Say Y here to let the kernel print out symbolic crash information and
1693
+ symbolic stack backtraces. This increases the size of the kernel
1694
+ somewhat, as all symbols have to be loaded into the kernel image.
15931695
15941696 config KALLSYMS_ALL
15951697 bool "Include all symbols in kallsyms"
15961698 depends on DEBUG_KERNEL && KALLSYMS
15971699 help
1598
- Normally kallsyms only contains the symbols of functions for nicer
1599
- OOPS messages and backtraces (i.e., symbols from the text and inittext
1600
- sections). This is sufficient for most cases. And only in very rare
1601
- cases (e.g., when a debugger is used) all symbols are required (e.g.,
1602
- names of variables from the data sections, etc).
1700
+ Normally kallsyms only contains the symbols of functions for nicer
1701
+ OOPS messages and backtraces (i.e., symbols from the text and inittext
1702
+ sections). This is sufficient for most cases. And only in very rare
1703
+ cases (e.g., when a debugger is used) all symbols are required (e.g.,
1704
+ names of variables from the data sections, etc).
16031705
1604
- This option makes sure that all symbols are loaded into the kernel
1605
- image (i.e., symbols from all sections) in cost of increased kernel
1606
- size (depending on the kernel configuration, it may be 300KiB or
1607
- something like this).
1706
+ This option makes sure that all symbols are loaded into the kernel
1707
+ image (i.e., symbols from all sections) in cost of increased kernel
1708
+ size (depending on the kernel configuration, it may be 300KiB or
1709
+ something like this).
16081710
1609
- Say N unless you really need all symbols.
1711
+ Say N unless you really need all symbols.
16101712
16111713 config KALLSYMS_ABSOLUTE_PERCPU
16121714 bool
....@@ -1634,14 +1736,31 @@
16341736 # end of the "standard kernel features (expert users)" menu
16351737
16361738 # syscall, maps, verifier
1739
+
1740
+config BPF_LSM
1741
+ bool "LSM Instrumentation with BPF"
1742
+ depends on BPF_EVENTS
1743
+ depends on BPF_SYSCALL
1744
+ depends on SECURITY
1745
+ depends on BPF_JIT
1746
+ help
1747
+ Enables instrumentation of the security hooks with eBPF programs for
1748
+ implementing dynamic MAC and Audit Policies.
1749
+
1750
+ If you are unsure how to answer this question, answer N.
1751
+
16371752 config BPF_SYSCALL
16381753 bool "Enable bpf() system call"
16391754 select BPF
16401755 select IRQ_WORK
1756
+ select TASKS_TRACE_RCU
16411757 default n
16421758 help
16431759 Enable the bpf() system call that allows to manipulate eBPF
16441760 programs and maps via file descriptors.
1761
+
1762
+config ARCH_WANT_DEFAULT_BPF_JIT
1763
+ bool
16451764
16461765 config BPF_JIT_ALWAYS_ON
16471766 bool "Permanently enable BPF JIT and remove BPF interpreter"
....@@ -1649,6 +1768,10 @@
16491768 help
16501769 Enables BPF JIT and removes BPF interpreter to avoid
16511770 speculative execution of BPF instructions by the interpreter
1771
+
1772
+config BPF_JIT_DEFAULT_ON
1773
+ def_bool ARCH_WANT_DEFAULT_BPF_JIT || BPF_JIT_ALWAYS_ON
1774
+ depends on HAVE_EBPF_JIT && BPF_JIT
16521775
16531776 config BPF_UNPRIV_DEFAULT_OFF
16541777 bool "Disable unprivileged BPF by default"
....@@ -1659,6 +1782,8 @@
16591782 still reenable it by setting it to 0 later on, or permanently
16601783 disable it by setting it to 1 (from which no other transition to
16611784 0 is possible anymore).
1785
+
1786
+source "kernel/bpf/preload/Kconfig"
16621787
16631788 config USERFAULTFD
16641789 bool "Enable userfaultfd() system call"
....@@ -1672,6 +1797,16 @@
16721797
16731798 config ARCH_HAS_MEMBARRIER_SYNC_CORE
16741799 bool
1800
+
1801
+config KCMP
1802
+ bool "Enable kcmp() system call" if EXPERT
1803
+ help
1804
+ Enable the kernel resource comparison system call. It provides
1805
+ user-space with the ability to compare two processes to see if they
1806
+ share a common resource, such as a file descriptor or even virtual
1807
+ memory space.
1808
+
1809
+ If unsure, say N.
16751810
16761811 config RSEQ
16771812 bool "Enable rseq() system call" if EXPERT
....@@ -1759,12 +1894,12 @@
17591894 depends on PERF_EVENTS && DEBUG_KERNEL && !PPC
17601895 select PERF_USE_VMALLOC
17611896 help
1762
- Use vmalloc memory to back perf mmap() buffers.
1897
+ Use vmalloc memory to back perf mmap() buffers.
17631898
1764
- Mostly useful for debugging the vmalloc code on platforms
1765
- that don't require it.
1899
+ Mostly useful for debugging the vmalloc code on platforms
1900
+ that don't require it.
17661901
1767
- Say N if unsure.
1902
+ Say N if unsure.
17681903
17691904 endmenu
17701905
....@@ -1786,7 +1921,6 @@
17861921 default y
17871922 bool "Enable SLUB debugging support" if EXPERT
17881923 depends on SLUB && SYSFS
1789
- select SLUB_SYSFS
17901924 help
17911925 SLUB has extensive debug support features. Disabling these can
17921926 result in significant savings in code size. This also disables
....@@ -1827,6 +1961,7 @@
18271961
18281962 config SLAB
18291963 bool "SLAB"
1964
+ depends on !PREEMPT_RT
18301965 select HAVE_HARDENED_USERCOPY_ALLOCATOR
18311966 help
18321967 The regular slab allocator that is established and known to work
....@@ -1847,6 +1982,7 @@
18471982 config SLOB
18481983 depends on EXPERT
18491984 bool "SLOB (Simple Allocator)"
1985
+ depends on !PREEMPT_RT
18501986 help
18511987 SLOB replaces the stock allocator with a drastically simpler
18521988 allocator. SLOB is generally more space efficient but
....@@ -1869,9 +2005,8 @@
18692005 command line.
18702006
18712007 config SLAB_FREELIST_RANDOM
1872
- default n
2008
+ bool "Randomize slab freelist"
18732009 depends on SLAB || SLUB
1874
- bool "SLAB freelist randomization"
18752010 help
18762011 Randomizes the freelist order used on creating new pages. This
18772012 security feature reduces the predictability of the kernel slab
....@@ -1879,19 +2014,45 @@
18792014
18802015 config SLAB_FREELIST_HARDENED
18812016 bool "Harden slab freelist metadata"
1882
- depends on SLUB
2017
+ depends on SLAB || SLUB
18832018 help
18842019 Many kernel heap attacks try to target slab cache metadata and
18852020 other infrastructure. This options makes minor performance
1886
- sacrifies to harden the kernel slab allocator against common
1887
- freelist exploit methods.
2021
+ sacrifices to harden the kernel slab allocator against common
2022
+ freelist exploit methods. Some slab implementations have more
2023
+ sanity-checking than others. This option is most effective with
2024
+ CONFIG_SLUB.
2025
+
2026
+config SHUFFLE_PAGE_ALLOCATOR
2027
+ bool "Page allocator randomization"
2028
+ default SLAB_FREELIST_RANDOM && ACPI_NUMA
2029
+ help
2030
+ Randomization of the page allocator improves the average
2031
+ utilization of a direct-mapped memory-side-cache. See section
2032
+ 5.2.27 Heterogeneous Memory Attribute Table (HMAT) in the ACPI
2033
+ 6.2a specification for an example of how a platform advertises
2034
+ the presence of a memory-side-cache. There are also incidental
2035
+ security benefits as it reduces the predictability of page
2036
+ allocations to compliment SLAB_FREELIST_RANDOM, but the
2037
+ default granularity of shuffling on the "MAX_ORDER - 1" i.e,
2038
+ 10th order of pages is selected based on cache utilization
2039
+ benefits on x86.
2040
+
2041
+ While the randomization improves cache utilization it may
2042
+ negatively impact workloads on platforms without a cache. For
2043
+ this reason, by default, the randomization is enabled only
2044
+ after runtime detection of a direct-mapped memory-side-cache.
2045
+ Otherwise, the randomization may be force enabled with the
2046
+ 'page_alloc.shuffle' kernel command line parameter.
2047
+
2048
+ Say Y if unsure.
18882049
18892050 config SLUB_CPU_PARTIAL
18902051 default y
1891
- depends on SLUB && SMP
2052
+ depends on SLUB && SMP && !PREEMPT_RT
18922053 bool "SLUB per cpu partial cache"
18932054 help
1894
- Per cpu partial caches accellerate objects allocation and freeing
2055
+ Per cpu partial caches accelerate objects allocation and freeing
18952056 that is local to a processor at the price of more indeterminism
18962057 in the latency of the free. On overflow these caches will be cleared
18972058 which requires the taking of locks that may cause latency spikes.
....@@ -1917,7 +2078,7 @@
19172078 userspace. Since that isn't generally a problem on no-MMU systems,
19182079 it is normally safe to say Y here.
19192080
1920
- See Documentation/nommu-mmap.txt for more information.
2081
+ See Documentation/admin-guide/mm/nommu-mmap.rst for more information.
19212082
19222083 config SYSTEM_DATA_VERIFICATION
19232084 def_bool n
....@@ -1961,6 +2122,10 @@
19612122 int
19622123 default 0 if BASE_FULL
19632124 default 1 if !BASE_FULL
2125
+
2126
+config MODULE_SIG_FORMAT
2127
+ def_bool n
2128
+ select SYSTEM_DATA_VERIFICATION
19642129
19652130 menuconfig MODULES
19662131 bool "Enable loadable module support"
....@@ -2021,6 +2186,14 @@
20212186 make them incompatible with the kernel you are running. If
20222187 unsure, say N.
20232188
2189
+config ASM_MODVERSIONS
2190
+ bool
2191
+ default HAVE_ASM_MODVERSIONS && MODVERSIONS
2192
+ help
2193
+ This enables module versioning for exported symbols also from
2194
+ assembly. This can be enabled only when the target architecture
2195
+ supports it.
2196
+
20242197 config MODULE_REL_CRCS
20252198 bool
20262199 depends on MODVERSIONS
....@@ -2036,10 +2209,23 @@
20362209 the version). With this option, such a "srcversion" field
20372210 will be created for all modules. If unsure, say N.
20382211
2212
+config MODULE_SCMVERSION
2213
+ bool "SCM version for modules"
2214
+ depends on LOCALVERSION_AUTO
2215
+ help
2216
+ This enables the module attribute "scmversion" which can be used
2217
+ by developers to identify the SCM version of a given module, e.g.
2218
+ git sha1 or hg sha1. The SCM version can be queried by modinfo or
2219
+ via the sysfs node: /sys/modules/MODULENAME/scmversion. This is
2220
+ useful when the kernel or kernel modules are updated separately
2221
+ since that causes the vermagic of the kernel and the module to
2222
+ differ.
2223
+
2224
+ If unsure, say N.
2225
+
20392226 config MODULE_SIG
20402227 bool "Module signature verification"
2041
- depends on MODULES
2042
- select SYSTEM_DATA_VERIFICATION
2228
+ select MODULE_SIG_FORMAT
20432229 help
20442230 Check modules for valid signatures upon load: the signature
20452231 is simply appended to the module. For more information see
....@@ -2048,6 +2234,11 @@
20482234 Note that this option adds the OpenSSL development packages as a
20492235 kernel build dependency so that the signing tool can use its crypto
20502236 library.
2237
+
2238
+ You should enable this option if you wish to use either
2239
+ CONFIG_SECURITY_LOCKDOWN_LSM or lockdown functionality imposed via
2240
+ another LSM - otherwise unsigned modules will be loadable regardless
2241
+ of the lockdown policy.
20512242
20522243 !!!WARNING!!! If you enable this option, you MUST make sure that the
20532244 module DOES NOT get stripped after being signed. This includes the
....@@ -2115,7 +2306,6 @@
21152306
21162307 config MODULE_COMPRESS
21172308 bool "Compress modules on installation"
2118
- depends on MODULES
21192309 help
21202310
21212311 Compresses kernel modules when 'make modules_install' is run; gzip or
....@@ -2151,9 +2341,38 @@
21512341
21522342 endchoice
21532343
2344
+config MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS
2345
+ bool "Allow loading of modules with missing namespace imports"
2346
+ help
2347
+ Symbols exported with EXPORT_SYMBOL_NS*() are considered exported in
2348
+ a namespace. A module that makes use of a symbol exported with such a
2349
+ namespace is required to import the namespace via MODULE_IMPORT_NS().
2350
+ There is no technical reason to enforce correct namespace imports,
2351
+ but it creates consistency between symbols defining namespaces and
2352
+ users importing namespaces they make use of. This option relaxes this
2353
+ requirement and lifts the enforcement when loading a module.
2354
+
2355
+ If unsure, say N.
2356
+
2357
+config UNUSED_SYMBOLS
2358
+ bool "Enable unused/obsolete exported symbols"
2359
+ default y if X86
2360
+ help
2361
+ Unused but exported symbols make the kernel needlessly bigger. For
2362
+ that reason most of these unused exports will soon be removed. This
2363
+ option is provided temporarily to provide a transition period in case
2364
+ some external kernel module needs one of these symbols anyway. If you
2365
+ encounter such a case in your module, consider if you are actually
2366
+ using the right API. (rationale: since nobody in the kernel is using
2367
+ this in a module, there is a pretty good chance it's actually the
2368
+ wrong interface to use). If you really need the symbol, please send a
2369
+ mail to the linux kernel mailing list mentioning the symbol and why
2370
+ you really need it, and what the merge plan to the mainline kernel for
2371
+ your module is.
2372
+
21542373 config TRIM_UNUSED_KSYMS
21552374 bool "Trim unused exported kernel symbols"
2156
- depends on MODULES && !UNUSED_SYMBOLS
2375
+ depends on !UNUSED_SYMBOLS
21572376 help
21582377 The kernel and some modules make many symbols available for
21592378 other modules to use via EXPORT_SYMBOL() and variants. Depending
....@@ -2214,6 +2433,9 @@
22142433
22152434 source "kernel/Kconfig.locks"
22162435
2436
+config ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
2437
+ bool
2438
+
22172439 config ARCH_HAS_SYNC_CORE_BEFORE_USERMODE
22182440 bool
22192441
....@@ -2227,4 +2449,6 @@
22272449 config ARCH_HAS_SYSCALL_WRAPPER
22282450 def_bool n
22292451
2452
+if !ROCKCHIP_MINI_KERNEL
22302453 source "init/Kconfig.gki"
2454
+endif