xref: /linux/init/Kconfig (revision 67f8bc848ee31831336bd478e57d2f993551902e)
1ec8f24b7SThomas Gleixner# SPDX-License-Identifier: GPL-2.0-only
28b59cd81SMasahiro Yamadaconfig CC_VERSION_TEXT
38b59cd81SMasahiro Yamada	string
48b59cd81SMasahiro Yamada	default "$(CC_VERSION_TEXT)"
58b59cd81SMasahiro Yamada	help
68b59cd81SMasahiro Yamada	  This is used in unclear ways:
78b59cd81SMasahiro Yamada
88b59cd81SMasahiro Yamada	  - Re-run Kconfig when the compiler is updated
98b59cd81SMasahiro Yamada	    The 'default' property references the environment variable,
108b59cd81SMasahiro Yamada	    CC_VERSION_TEXT so it is recorded in include/config/auto.conf.cmd.
118b59cd81SMasahiro Yamada	    When the compiler is updated, Kconfig will be invoked.
128b59cd81SMasahiro Yamada
13f9c8bc46SBhaskar Chowdhury	  - Ensure full rebuild when the compiler is updated
14ce6ed1c4SMasahiro Yamada	    include/linux/compiler-version.h contains this option in the comment
150e0345b7SAlexey Dobriyan	    line so fixdep adds include/config/CC_VERSION_TEXT into the
16ce6ed1c4SMasahiro Yamada	    auto-generated dependency. When the compiler is updated, syncconfig
17ce6ed1c4SMasahiro Yamada	    will touch it and then every file will be rebuilt.
188b59cd81SMasahiro Yamada
19a4353898SMasahiro Yamadaconfig CC_IS_GCC
20aec6c60aSMasahiro Yamada	def_bool $(success,test "$(cc-name)" = GCC)
21a4353898SMasahiro Yamada
22a4353898SMasahiro Yamadaconfig GCC_VERSION
23a4353898SMasahiro Yamada	int
24aec6c60aSMasahiro Yamada	default $(cc-version) if CC_IS_GCC
25a4353898SMasahiro Yamada	default 0
26a4353898SMasahiro Yamada
27469cb737SMasahiro Yamadaconfig CC_IS_CLANG
28aec6c60aSMasahiro Yamada	def_bool $(success,test "$(cc-name)" = Clang)
29b744b43fSSami Tolvanen
30469cb737SMasahiro Yamadaconfig CLANG_VERSION
31469cb737SMasahiro Yamada	int
32aec6c60aSMasahiro Yamada	default $(cc-version) if CC_IS_CLANG
33aec6c60aSMasahiro Yamada	default 0
34469cb737SMasahiro Yamada
35ba64beb1SMasahiro Yamadaconfig AS_IS_GNU
36ba64beb1SMasahiro Yamada	def_bool $(success,test "$(as-name)" = GNU)
37ba64beb1SMasahiro Yamada
38ba64beb1SMasahiro Yamadaconfig AS_IS_LLVM
39ba64beb1SMasahiro Yamada	def_bool $(success,test "$(as-name)" = LLVM)
40ba64beb1SMasahiro Yamada
41ba64beb1SMasahiro Yamadaconfig AS_VERSION
42ba64beb1SMasahiro Yamada	int
43ba64beb1SMasahiro Yamada	# Use clang version if this is the integrated assembler
44ba64beb1SMasahiro Yamada	default CLANG_VERSION if AS_IS_LLVM
45ba64beb1SMasahiro Yamada	default $(as-version)
46ba64beb1SMasahiro Yamada
4702aff859SMasahiro Yamadaconfig LD_IS_BFD
4802aff859SMasahiro Yamada	def_bool $(success,test "$(ld-name)" = BFD)
4902aff859SMasahiro Yamada
5002aff859SMasahiro Yamadaconfig LD_VERSION
5102aff859SMasahiro Yamada	int
5202aff859SMasahiro Yamada	default $(ld-version) if LD_IS_BFD
5302aff859SMasahiro Yamada	default 0
5402aff859SMasahiro Yamada
5502aff859SMasahiro Yamadaconfig LD_IS_LLD
5602aff859SMasahiro Yamada	def_bool $(success,test "$(ld-name)" = LLD)
57c65eacbeSAndy Lutomirski
58d5750cd3SNathan Chancellorconfig LLD_VERSION
59d5750cd3SNathan Chancellor	int
6002aff859SMasahiro Yamada	default $(ld-version) if LD_IS_LLD
6102aff859SMasahiro Yamada	default 0
62d5750cd3SNathan Chancellor
636e74c6b5SMiguel Ojedaconfig RUSTC_VERSION
646e74c6b5SMiguel Ojeda	int
65af0121c2SGary Guo	default $(rustc-version)
666e74c6b5SMiguel Ojeda	help
676e74c6b5SMiguel Ojeda	  It does not depend on `RUST` since that one may need to use the version
686e74c6b5SMiguel Ojeda	  in a `depends on`.
696e74c6b5SMiguel Ojeda
702f7ab126SMiguel Ojedaconfig RUST_IS_AVAILABLE
712f7ab126SMiguel Ojeda	def_bool $(success,$(srctree)/scripts/rust_is_available.sh)
722f7ab126SMiguel Ojeda	help
732f7ab126SMiguel Ojeda	  This shows whether a suitable Rust toolchain is available (found).
742f7ab126SMiguel Ojeda
752f7ab126SMiguel Ojeda	  Please see Documentation/rust/quick-start.rst for instructions on how
76eacf96d2SColin Ian King	  to satisfy the build requirements of Rust support.
772f7ab126SMiguel Ojeda
782f7ab126SMiguel Ojeda	  In particular, the Makefile target 'rustavailable' is useful to check
792f7ab126SMiguel Ojeda	  why the Rust toolchain is not being detected.
802f7ab126SMiguel Ojeda
81af0121c2SGary Guoconfig RUSTC_LLVM_VERSION
82af0121c2SGary Guo	int
83af0121c2SGary Guo	default $(rustc-llvm-version)
84af0121c2SGary Guo
85e90f97ceSGary Guoconfig RUSTC_LLVM_MAJOR_VERSION
86e90f97ceSGary Guo	int
87e90f97ceSGary Guo	default $(shell,expr $(rustc-llvm-version) / 10000)
88e90f97ceSGary Guo
89e90f97ceSGary Guoconfig RUSTC_CLANG_LLVM_COMPATIBLE
90e90f97ceSGary Guo	bool
91e90f97ceSGary Guo	default y if CC_IS_CLANG && RUSTC_LLVM_MAJOR_VERSION = $(shell,expr $(cc-version) / 10000)
92e90f97ceSGary Guo	help
93e90f97ceSGary Guo	  This indicates whether Rust and Clang use LLVM of the same major
94e90f97ceSGary Guo	  version.
95e90f97ceSGary Guo
96e90f97ceSGary Guo	  Operations involving handling LLVM IR or bitcode (e.g. cross-language
97e90f97ceSGary Guo	  LTO) require the same LLVM major version to work properly. For best
98e90f97ceSGary Guo	  compatibility it is recommended that the exact same LLVM is used.
99e90f97ceSGary Guo
100deab487eSThomas Weißschuhconfig ARCH_HAS_CC_CAN_LINK
101deab487eSThomas Weißschuh	bool
102deab487eSThomas Weißschuh
1031a927fd3SMasahiro Yamadaconfig CC_CAN_LINK
1049371f86eSMasahiro Yamada	bool
105deab487eSThomas Weißschuh	default ARCH_CC_CAN_LINK if ARCH_HAS_CC_CAN_LINK
10680623f2cSThomas Weißschuh	default $(cc_can_link_user,$(m64-flag)) if 64BIT
10780623f2cSThomas Weißschuh	default $(cc_can_link_user,$(m32-flag))
1081a927fd3SMasahiro Yamada
109f2f6a8e8SMark Rutland# Fixed in GCC 14, 13.3, 12.4 and 11.5
110f2f6a8e8SMark Rutland# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113921
111f2f6a8e8SMark Rutlandconfig GCC_ASM_GOTO_OUTPUT_BROKEN
112f2f6a8e8SMark Rutland	bool
113f2f6a8e8SMark Rutland	depends on CC_IS_GCC
114f2f6a8e8SMark Rutland	default y if GCC_VERSION < 110500
115f2f6a8e8SMark Rutland	default y if GCC_VERSION >= 120000 && GCC_VERSION < 120400
116f2f6a8e8SMark Rutland	default y if GCC_VERSION >= 130000 && GCC_VERSION < 130300
117f2f6a8e8SMark Rutland
118587f1701SNick Desaulniersconfig CC_HAS_ASM_GOTO_OUTPUT
119f2f6a8e8SMark Rutland	def_bool y
120f2f6a8e8SMark Rutland	depends on !GCC_ASM_GOTO_OUTPUT_BROKEN
121f2f6a8e8SMark Rutland	depends on $(success,echo 'int foo(int x) { asm goto ("": "=r"(x) ::: bar); return x; bar: return 0; }' | $(CC) -x c - -c -o /dev/null)
122587f1701SNick Desaulniers
1231aa0e8b1SSean Christophersonconfig CC_HAS_ASM_GOTO_TIED_OUTPUT
1241aa0e8b1SSean Christopherson	depends on CC_HAS_ASM_GOTO_OUTPUT
1251aa0e8b1SSean Christopherson	# Detect buggy gcc and clang, fixed in gcc-11 clang-14.
126534bd703SAlexandre Belloni	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)
1271aa0e8b1SSean Christopherson
1285cf896fbSPeter Collingbourneconfig TOOLS_SUPPORT_RELR
1292d122942SWill Deacon	def_bool $(success,env "CC=$(CC)" "LD=$(LD)" "NM=$(NM)" "OBJCOPY=$(OBJCOPY)" $(srctree)/scripts/tools-support-relr.sh)
1305cf896fbSPeter Collingbourne
131eb111869SRasmus Villemoesconfig CC_HAS_ASM_INLINE
132eb111869SRasmus Villemoes	def_bool $(success,echo 'void foo(void) { asm inline (""); }' | $(CC) -x c - -c -o /dev/null)
133eb111869SRasmus Villemoes
134f72e2cffSHeiko Carstensconfig CC_HAS_ASSUME
135f72e2cffSHeiko Carstens	bool
136f72e2cffSHeiko Carstens	# clang needs to be at least 19.1.0 since the meaning of the assume
137f72e2cffSHeiko Carstens	# attribute changed:
138f72e2cffSHeiko Carstens	# https://github.com/llvm/llvm-project/commit/c44fa3e8a9a44c2e9a575768a3c185354b9f6c17
139f72e2cffSHeiko Carstens	default y if CC_IS_CLANG && CLANG_VERSION >= 190100
140f72e2cffSHeiko Carstens	# supported since gcc 13.1.0
141f72e2cffSHeiko Carstens	# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106654
142f72e2cffSHeiko Carstens	default y if CC_IS_GCC && GCC_VERSION >= 130100
143f72e2cffSHeiko Carstens
14451c2ee6dSNick Desaulniersconfig CC_HAS_NO_PROFILE_FN_ATTR
14551c2ee6dSNick Desaulniers	def_bool $(success,echo '__attribute__((no_profile_instrument_function)) int x();' | $(CC) -x c - -c -o /dev/null -Werror)
14651c2ee6dSNick Desaulniers
147f06e108aSJan Hendrik Farrconfig CC_HAS_COUNTED_BY
1485106c650SJan Hendrik Farr	bool
14986a9b125SNathan Chancellor	# clang needs to be at least 20.1.0 to avoid potential crashes
15086a9b125SNathan Chancellor	# when building structures that contain __counted_by
15186a9b125SNathan Chancellor	# https://github.com/ClangBuiltLinux/linux/issues/2114
15286a9b125SNathan Chancellor	# https://github.com/llvm/llvm-project/commit/160fb1121cdf703c3ef5e61fb26c5659eb581489
15386a9b125SNathan Chancellor	default y if CC_IS_CLANG && CLANG_VERSION >= 200100
1545106c650SJan Hendrik Farr	# supported since gcc 15.1.0
1555106c650SJan Hendrik Farr	# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108896
1565106c650SJan Hendrik Farr	default y if CC_IS_GCC && GCC_VERSION >= 150100
157f06e108aSJan Hendrik Farr
158150a04d8SBill Wendlingconfig CC_HAS_COUNTED_BY_PTR
159150a04d8SBill Wendling	bool
160150a04d8SBill Wendling	# supported since clang 22
1617a618ca9SNathan Chancellor	default y if CC_IS_CLANG && CLANG_VERSION >= 220100
162150a04d8SBill Wendling	# supported since gcc 16.0.0
163150a04d8SBill Wendling	default y if CC_IS_GCC && GCC_VERSION >= 160000
164150a04d8SBill Wendling
165d39a1d74SKees Cookconfig CC_HAS_BROKEN_COUNTED_BY_REF
166d39a1d74SKees Cook	bool
167d39a1d74SKees Cook	# https://github.com/llvm/llvm-project/issues/182575
168f709859fSNathan Chancellor	default y if CC_IS_CLANG && CLANG_VERSION < 220100
169d39a1d74SKees Cook
170feb662d9SMarco Elverconfig CC_HAS_ALLOC_TOKEN
171feb662d9SMarco Elver	def_bool $(cc-option,-falloc-token-max=123)
172feb662d9SMarco Elver
173b688f369SKees Cookconfig CC_HAS_MULTIDIMENSIONAL_NONSTRING
174b688f369SKees Cook	def_bool $(success,echo 'char tag[][4] __attribute__((__nonstring__)) = { };' | $(CC) $(CLANG_FLAGS) -x c - -c -o /dev/null -Werror)
175b688f369SKees Cook
176e7607f7dSNathan Chancellorconfig LD_CAN_USE_KEEP_IN_OVERLAY
177e7607f7dSNathan Chancellor	# ld.lld prior to 21.0.0 did not support KEEP within an overlay description
178e7607f7dSNathan Chancellor	# https://github.com/llvm/llvm-project/pull/130661
179e7607f7dSNathan Chancellor	def_bool LD_IS_BFD || LLD_VERSION >= 210000
180e7607f7dSNathan Chancellor
18136174d16SMiguel Ojedaconfig RUSTC_HAS_SPAN_FILE
18236174d16SMiguel Ojeda	def_bool RUSTC_VERSION >= 108800
18336174d16SMiguel Ojeda
1847129ea6eSMiguel Ojedaconfig RUSTC_HAS_UNNECESSARY_TRANSMUTES
1857129ea6eSMiguel Ojeda	def_bool RUSTC_VERSION >= 108800
1867129ea6eSMiguel Ojeda
1870aa2b78cSBoqun Fengconfig RUSTC_HAS_FILE_WITH_NUL
1880aa2b78cSBoqun Feng	def_bool RUSTC_VERSION >= 108900
1890aa2b78cSBoqun Feng
190c09461a0SAlice Ryhlconfig RUSTC_HAS_FILE_AS_C_STR
191c09461a0SAlice Ryhl	def_bool RUSTC_VERSION >= 109100
192c09461a0SAlice Ryhl
193608045a9SMiguel Ojedaconfig RUSTC_HAS_SUSPICIOUS_RUNTIME_SYMBOL_DEFINITIONS
194608045a9SMiguel Ojeda	def_bool RUSTC_VERSION >= 109800
195608045a9SMiguel Ojeda
196613fe169SNathan Chancellorconfig PAHOLE_VERSION
197613fe169SNathan Chancellor	int
19890e5b38aSIhor Solodrai	default "$(PAHOLE_VERSION)"
199613fe169SNathan Chancellor
200b99b87f7SPeter Oberparleiterconfig CONSTRUCTORS
201b99b87f7SPeter Oberparleiter	bool
202b99b87f7SPeter Oberparleiter
203e360adbeSPeter Zijlstraconfig IRQ_WORK
204fd0a68a2STejun Heo	def_bool y if SMP
205e360adbeSPeter Zijlstra
20610916706SShile Zhangconfig BUILDTIME_TABLE_SORT
2071dbdc6f1SDavid Daney	bool
2081dbdc6f1SDavid Daney
209c65eacbeSAndy Lutomirskiconfig THREAD_INFO_IN_TASK
210c65eacbeSAndy Lutomirski	bool
211c65eacbeSAndy Lutomirski	help
212c65eacbeSAndy Lutomirski	  Select this to move thread_info off the stack into task_struct.  To
213c65eacbeSAndy Lutomirski	  make this work, an arch will need to remove all thread_info fields
214c65eacbeSAndy Lutomirski	  except flags and fix any runtime bugs.
215c65eacbeSAndy Lutomirski
216c6c314a6SAndy Lutomirski	  One subtle change that will be needed is to use try_get_task_stack()
217c6c314a6SAndy Lutomirski	  and put_task_stack() in save_thread_stack_tsk() and get_wchan().
218c6c314a6SAndy Lutomirski
219ff0cfc66SAl Boldimenu "General setup"
2201da177e4SLinus Torvalds
2211da177e4SLinus Torvaldsconfig BROKEN
2221da177e4SLinus Torvalds	bool
223fefbeed8SAndrew Morton	help
224fefbeed8SAndrew Morton	  This option allows you to choose whether you want to try to
225fefbeed8SAndrew Morton	  compile (and fix) old drivers that haven't been updated to
226fefbeed8SAndrew Morton	  new infrastructure.
2271da177e4SLinus Torvalds
2281da177e4SLinus Torvaldsconfig BROKEN_ON_SMP
2291da177e4SLinus Torvalds	bool
2301da177e4SLinus Torvalds	depends on BROKEN || !SMP
2311da177e4SLinus Torvalds	default y
2321da177e4SLinus Torvalds
2331da177e4SLinus Torvaldsconfig INIT_ENV_ARG_LIMIT
2341da177e4SLinus Torvalds	int
235dd673bcaSAdrian Bunk	default 32 if !UML
236dd673bcaSAdrian Bunk	default 128 if UML
2371da177e4SLinus Torvalds	help
23834ad92c2SRandy Dunlap	  Maximum of each of the number of arguments and environment
23934ad92c2SRandy Dunlap	  variables passed to init from the kernel command line.
2401da177e4SLinus Torvalds
2414bb16672SJiri Slabyconfig COMPILE_TEST
2424bb16672SJiri Slaby	bool "Compile also drivers which will not load"
243ea29b20aSMasahiro Yamada	depends on HAS_IOMEM
2444bb16672SJiri Slaby	help
2454bb16672SJiri Slaby	  Some drivers can be compiled on a different platform than they are
2464bb16672SJiri Slaby	  intended to be run on. Despite they cannot be loaded there (or even
2474bb16672SJiri Slaby	  when they load they cannot be used due to missing HW support),
2484bb16672SJiri Slaby	  developers still, opposing to distributors, might want to build such
2494bb16672SJiri Slaby	  drivers to compile-test them.
2504bb16672SJiri Slaby
2514bb16672SJiri Slaby	  If you are a developer and want to build everything available, say Y
2524bb16672SJiri Slaby	  here. If you are a user/distributor, say N here to exclude useless
2534bb16672SJiri Slaby	  drivers to be distributed.
2544bb16672SJiri Slaby
2553fe617ccSLinus Torvaldsconfig WERROR
2563fe617ccSLinus Torvalds	bool "Compile the kernel with warnings as errors"
257b339ec9cSMarco Elver	default COMPILE_TEST
2583fe617ccSLinus Torvalds	help
2593fe617ccSLinus Torvalds	  A kernel build should not cause any compiler warnings, and this
2602f7ab126SMiguel Ojeda	  enables the '-Werror' (for C) and '-Dwarnings' (for Rust) flags
261e1789d7cSXin Li	  to enforce that rule by default. Certain warnings from other tools
262e1789d7cSXin Li	  such as the linker may be upgraded to errors with this option as
263e1789d7cSXin Li	  well.
2643fe617ccSLinus Torvalds
265e1789d7cSXin Li	  However, if you have a new (or very old) compiler or linker with odd
266e1789d7cSXin Li	  and unusual warnings, or you have some architecture with problems,
2673fe617ccSLinus Torvalds	  you may need to disable this config option in order to
2683fe617ccSLinus Torvalds	  successfully build the kernel.
2693fe617ccSLinus Torvalds
2703fe617ccSLinus Torvalds	  If in doubt, say Y.
2713fe617ccSLinus Torvalds
272d6fc9fcbSMasahiro Yamadaconfig UAPI_HEADER_TEST
273d6fc9fcbSMasahiro Yamada	bool "Compile test UAPI headers"
2742a0a3080SThomas Weißschuh	depends on HEADERS_INSTALL
275d6fc9fcbSMasahiro Yamada	help
276d6fc9fcbSMasahiro Yamada	  Compile test headers exported to user-space to ensure they are
277d6fc9fcbSMasahiro Yamada	  self-contained, i.e. compilable as standalone units.
278d6fc9fcbSMasahiro Yamada
279d6fc9fcbSMasahiro Yamada	  If you are a developer or tester and want to ensure the exported
280d6fc9fcbSMasahiro Yamada	  headers are self-contained, say Y here. Otherwise, choose N.
281d6fc9fcbSMasahiro Yamada
2821da177e4SLinus Torvaldsconfig LOCALVERSION
2831da177e4SLinus Torvalds	string "Local version - append to kernel release"
2841da177e4SLinus Torvalds	help
2851da177e4SLinus Torvalds	  Append an extra string to the end of your kernel version.
2861da177e4SLinus Torvalds	  This will show up when you type uname, for example.
2871da177e4SLinus Torvalds	  The string you set here will be appended after the contents of
2881da177e4SLinus Torvalds	  any files with a filename matching localversion* in your
2891da177e4SLinus Torvalds	  object and source tree, in that order.  Your total string can
2901da177e4SLinus Torvalds	  be a maximum of 64 characters.
2911da177e4SLinus Torvalds
292aaebf433SRyan Andersonconfig LOCALVERSION_AUTO
293aaebf433SRyan Anderson	bool "Automatically append version information to the version string"
294aaebf433SRyan Anderson	default y
295ac3339baSAlexey Dobriyan	depends on !COMPILE_TEST
296aaebf433SRyan Anderson	help
297aaebf433SRyan Anderson	  This will try to automatically determine if the current tree is a
2986e5a5420SRobert P. J. Day	  release tree by looking for git tags that belong to the current
2996e5a5420SRobert P. J. Day	  top of tree revision.
300aaebf433SRyan Anderson
301aaebf433SRyan Anderson	  A string of the format -gxxxxxxxx will be added to the localversion
3026e5a5420SRobert P. J. Day	  if a git-based tree is found.  The string generated by this will be
303aaebf433SRyan Anderson	  appended after any matching localversion* files, and after the value
3046e5a5420SRobert P. J. Day	  set in CONFIG_LOCALVERSION.
305aaebf433SRyan Anderson
3060f9c608dSRasmus Villemoes	  (The actual string used here is the first 12 characters produced
3076e5a5420SRobert P. J. Day	  by running the command:
3086e5a5420SRobert P. J. Day
3096e5a5420SRobert P. J. Day	    $ git rev-parse --verify HEAD
3106e5a5420SRobert P. J. Day
3116e5a5420SRobert P. J. Day	  which is done within the script "scripts/setlocalversion".)
312aaebf433SRyan Anderson
3139afb719eSLaura Abbottconfig BUILD_SALT
3149afb719eSLaura Abbott	string "Build ID Salt"
3159afb719eSLaura Abbott	default ""
3169afb719eSLaura Abbott	help
3179afb719eSLaura Abbott	  The build ID is used to link binaries and their debug info. Setting
3189afb719eSLaura Abbott	  this option will use the value in the calculation of the build id.
3199afb719eSLaura Abbott	  This is mostly useful for distributions which want to ensure the
3209afb719eSLaura Abbott	  build is unique between builds. It's safe to leave the default.
3219afb719eSLaura Abbott
3222e9f3bddSH. Peter Anvinconfig HAVE_KERNEL_GZIP
3232e9f3bddSH. Peter Anvin	bool
3242e9f3bddSH. Peter Anvin
3252e9f3bddSH. Peter Anvinconfig HAVE_KERNEL_BZIP2
3262e9f3bddSH. Peter Anvin	bool
3272e9f3bddSH. Peter Anvin
3282e9f3bddSH. Peter Anvinconfig HAVE_KERNEL_LZMA
3292e9f3bddSH. Peter Anvin	bool
3302e9f3bddSH. Peter Anvin
3313ebe1243SLasse Collinconfig HAVE_KERNEL_XZ
3323ebe1243SLasse Collin	bool
3333ebe1243SLasse Collin
3347dd65febSAlbin Tonnerreconfig HAVE_KERNEL_LZO
3357dd65febSAlbin Tonnerre	bool
3367dd65febSAlbin Tonnerre
337e76e1fdfSKyungsik Leeconfig HAVE_KERNEL_LZ4
338e76e1fdfSKyungsik Lee	bool
339e76e1fdfSKyungsik Lee
34048f7ddf7SNick Terrellconfig HAVE_KERNEL_ZSTD
34148f7ddf7SNick Terrell	bool
34248f7ddf7SNick Terrell
343f16466afSVasily Gorbikconfig HAVE_KERNEL_UNCOMPRESSED
344f16466afSVasily Gorbik	bool
345f16466afSVasily Gorbik
34630d65dbfSAlain Knaffchoice
34730d65dbfSAlain Knaff	prompt "Kernel compression mode"
34830d65dbfSAlain Knaff	default KERNEL_GZIP
34948f7ddf7SNick Terrell	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
35030d65dbfSAlain Knaff	help
35130d65dbfSAlain Knaff	  The linux kernel is a kind of self-extracting executable.
35230d65dbfSAlain Knaff	  Several compression algorithms are available, which differ
35330d65dbfSAlain Knaff	  in efficiency, compression and decompression speed.
35430d65dbfSAlain Knaff	  Compression speed is only relevant when building a kernel.
35530d65dbfSAlain Knaff	  Decompression speed is relevant at each boot.
35630d65dbfSAlain Knaff
35730d65dbfSAlain Knaff	  If you have any problems with bzip2 or lzma compressed
35830d65dbfSAlain Knaff	  kernels, mail me (Alain Knaff) <alain@knaff.lu>. (An older
35930d65dbfSAlain Knaff	  version of this functionality (bzip2 only), for 2.4, was
36030d65dbfSAlain Knaff	  supplied by Christian Ludwig)
36130d65dbfSAlain Knaff
36230d65dbfSAlain Knaff	  High compression options are mostly useful for users, who
36330d65dbfSAlain Knaff	  are low on disk space (embedded systems), but for whom ram
36430d65dbfSAlain Knaff	  size matters less.
36530d65dbfSAlain Knaff
36630d65dbfSAlain Knaff	  If in doubt, select 'gzip'
36730d65dbfSAlain Knaff
36830d65dbfSAlain Knaffconfig KERNEL_GZIP
36930d65dbfSAlain Knaff	bool "Gzip"
3702e9f3bddSH. Peter Anvin	depends on HAVE_KERNEL_GZIP
37130d65dbfSAlain Knaff	help
3727dd65febSAlbin Tonnerre	  The old and tried gzip compression. It provides a good balance
3737dd65febSAlbin Tonnerre	  between compression ratio and decompression speed.
37430d65dbfSAlain Knaff
37530d65dbfSAlain Knaffconfig KERNEL_BZIP2
37630d65dbfSAlain Knaff	bool "Bzip2"
3772e9f3bddSH. Peter Anvin	depends on HAVE_KERNEL_BZIP2
37830d65dbfSAlain Knaff	help
37930d65dbfSAlain Knaff	  Its compression ratio and speed is intermediate.
3800a4dd35cSRandy Dunlap	  Decompression speed is slowest among the choices.  The kernel
3812e9f3bddSH. Peter Anvin	  size is about 10% smaller with bzip2, in comparison to gzip.
3822e9f3bddSH. Peter Anvin	  Bzip2 uses a large amount of memory. For modern kernels you
3832e9f3bddSH. Peter Anvin	  will need at least 8MB RAM or more for booting.
38430d65dbfSAlain Knaff
38530d65dbfSAlain Knaffconfig KERNEL_LZMA
38630d65dbfSAlain Knaff	bool "LZMA"
3872e9f3bddSH. Peter Anvin	depends on HAVE_KERNEL_LZMA
38830d65dbfSAlain Knaff	help
3890a4dd35cSRandy Dunlap	  This compression algorithm's ratio is best.  Decompression speed
3900a4dd35cSRandy Dunlap	  is between gzip and bzip2.  Compression is slowest.
3910a4dd35cSRandy Dunlap	  The kernel size is about 33% smaller with LZMA in comparison to gzip.
39230d65dbfSAlain Knaff
3933ebe1243SLasse Collinconfig KERNEL_XZ
3943ebe1243SLasse Collin	bool "XZ"
3953ebe1243SLasse Collin	depends on HAVE_KERNEL_XZ
3963ebe1243SLasse Collin	help
3973ebe1243SLasse Collin	  XZ uses the LZMA2 algorithm and instruction set specific
3983ebe1243SLasse Collin	  BCJ filters which can improve compression ratio of executable
3993ebe1243SLasse Collin	  code. The size of the kernel is about 30% smaller with XZ in
4003ebe1243SLasse Collin	  comparison to gzip. On architectures for which there is a BCJ
4017472ff8aSLasse Collin	  filter (i386, x86_64, ARM, ARM64, RISC-V, big endian PowerPC,
4027472ff8aSLasse Collin	  and SPARC), XZ will create a few percent smaller kernel than
4037472ff8aSLasse Collin	  plain LZMA.
4043ebe1243SLasse Collin
4053ebe1243SLasse Collin	  The speed is about the same as with LZMA: The decompression
4063ebe1243SLasse Collin	  speed of XZ is better than that of bzip2 but worse than gzip
4073ebe1243SLasse Collin	  and LZO. Compression is slow.
4083ebe1243SLasse Collin
4097dd65febSAlbin Tonnerreconfig KERNEL_LZO
4107dd65febSAlbin Tonnerre	bool "LZO"
4117dd65febSAlbin Tonnerre	depends on HAVE_KERNEL_LZO
4127dd65febSAlbin Tonnerre	help
4130a4dd35cSRandy Dunlap	  Its compression ratio is the poorest among the choices. The kernel
414681b3049SStephan Sperber	  size is about 10% bigger than gzip; however its speed
4157dd65febSAlbin Tonnerre	  (both compression and decompression) is the fastest.
4167dd65febSAlbin Tonnerre
417e76e1fdfSKyungsik Leeconfig KERNEL_LZ4
418e76e1fdfSKyungsik Lee	bool "LZ4"
419e76e1fdfSKyungsik Lee	depends on HAVE_KERNEL_LZ4
420e76e1fdfSKyungsik Lee	help
421e76e1fdfSKyungsik Lee	  LZ4 is an LZ77-type compressor with a fixed, byte-oriented encoding.
422e76e1fdfSKyungsik Lee	  A preliminary version of LZ4 de/compression tool is available at
423e76e1fdfSKyungsik Lee	  <https://code.google.com/p/lz4/>.
424e76e1fdfSKyungsik Lee
425e76e1fdfSKyungsik Lee	  Its compression ratio is worse than LZO. The size of the kernel
426e76e1fdfSKyungsik Lee	  is about 8% bigger than LZO. But the decompression speed is
427e76e1fdfSKyungsik Lee	  faster than LZO.
428e76e1fdfSKyungsik Lee
42948f7ddf7SNick Terrellconfig KERNEL_ZSTD
43048f7ddf7SNick Terrell	bool "ZSTD"
43148f7ddf7SNick Terrell	depends on HAVE_KERNEL_ZSTD
43248f7ddf7SNick Terrell	help
43348f7ddf7SNick Terrell	  ZSTD is a compression algorithm targeting intermediate compression
43448f7ddf7SNick Terrell	  with fast decompression speed. It will compress better than GZIP and
43548f7ddf7SNick Terrell	  decompress around the same speed as LZO, but slower than LZ4. You
43648f7ddf7SNick Terrell	  will need at least 192 KB RAM or more for booting. The zstd command
43748f7ddf7SNick Terrell	  line tool is required for compression.
43848f7ddf7SNick Terrell
439f16466afSVasily Gorbikconfig KERNEL_UNCOMPRESSED
440f16466afSVasily Gorbik	bool "None"
441f16466afSVasily Gorbik	depends on HAVE_KERNEL_UNCOMPRESSED
442f16466afSVasily Gorbik	help
443f16466afSVasily Gorbik	  Produce uncompressed kernel image. This option is usually not what
444f16466afSVasily Gorbik	  you want. It is useful for debugging the kernel in slow simulation
445f16466afSVasily Gorbik	  environments, where decompressing and moving the kernel is awfully
446f16466afSVasily Gorbik	  slow. This option allows early boot code to skip the decompressor
447f16466afSVasily Gorbik	  and jump right at uncompressed kernel image.
448f16466afSVasily Gorbik
44930d65dbfSAlain Knaffendchoice
45030d65dbfSAlain Knaff
451ada4ab7aSChris Downconfig DEFAULT_INIT
452ada4ab7aSChris Down	string "Default init path"
453ada4ab7aSChris Down	default ""
454ada4ab7aSChris Down	help
455ada4ab7aSChris Down	  This option determines the default init for the system if no init=
456ada4ab7aSChris Down	  option is passed on the kernel command line. If the requested path is
457ada4ab7aSChris Down	  not present, we will still then move on to attempting further
458ada4ab7aSChris Down	  locations (e.g. /sbin/init, etc). If this is empty, we will just use
459ada4ab7aSChris Down	  the fallback list when init= is not passed.
460ada4ab7aSChris Down
461bd5dc17bSJosh Triplettconfig DEFAULT_HOSTNAME
462bd5dc17bSJosh Triplett	string "Default hostname"
463bd5dc17bSJosh Triplett	default "(none)"
464bd5dc17bSJosh Triplett	help
465bd5dc17bSJosh Triplett	  This option determines the default system hostname before userspace
466bd5dc17bSJosh Triplett	  calls sethostname(2). The kernel traditionally uses "(none)" here,
467bd5dc17bSJosh Triplett	  but you may wish to use a different default here to make a minimal
468bd5dc17bSJosh Triplett	  system more usable with less configuration.
469bd5dc17bSJosh Triplett
4701da177e4SLinus Torvaldsconfig SYSVIPC
4711da177e4SLinus Torvalds	bool "System V IPC"
472a7f7f624SMasahiro Yamada	help
4731da177e4SLinus Torvalds	  Inter Process Communication is a suite of library functions and
4741da177e4SLinus Torvalds	  system calls which let processes (running programs) synchronize and
4751da177e4SLinus Torvalds	  exchange information. It is generally considered to be a good thing,
4761da177e4SLinus Torvalds	  and some programs won't run unless you say Y here. In particular, if
4771da177e4SLinus Torvalds	  you want to run the DOS emulator dosemu under Linux (read the
4781da177e4SLinus Torvalds	  DOSEMU-HOWTO, available from <http://www.tldp.org/docs.html#howto>),
4791da177e4SLinus Torvalds	  you'll need to say Y here.
4801da177e4SLinus Torvalds
4811da177e4SLinus Torvalds	  You can find documentation about IPC with "info ipc" and also in
4821da177e4SLinus Torvalds	  section 6.4 of the Linux Programmer's Guide, available from
4831da177e4SLinus Torvalds	  <http://www.tldp.org/guides.html>.
4841da177e4SLinus Torvalds
485a5494dcdSEric W. Biedermanconfig SYSVIPC_SYSCTL
486a5494dcdSEric W. Biederman	bool
487a5494dcdSEric W. Biederman	depends on SYSVIPC
488a5494dcdSEric W. Biederman	depends on SYSCTL
489a5494dcdSEric W. Biederman	default y
490a5494dcdSEric W. Biederman
4910cbed0eeSGuo Renconfig SYSVIPC_COMPAT
4920cbed0eeSGuo Ren	def_bool y
4930cbed0eeSGuo Ren	depends on COMPAT && SYSVIPC
4940cbed0eeSGuo Ren
4951da177e4SLinus Torvaldsconfig POSIX_MQUEUE
4961da177e4SLinus Torvalds	bool "POSIX Message Queues"
49719c92399SKees Cook	depends on NET
498a7f7f624SMasahiro Yamada	help
4991da177e4SLinus Torvalds	  POSIX variant of message queues is a part of IPC. In POSIX message
5001da177e4SLinus Torvalds	  queues every message has a priority which decides about succession
5011da177e4SLinus Torvalds	  of receiving it by a process. If you want to compile and run
5021da177e4SLinus Torvalds	  programs written e.g. for Solaris with use of its POSIX message
503b0e37650SRobert P. J. Day	  queues (functions mq_*) say Y here.
5041da177e4SLinus Torvalds
5051da177e4SLinus Torvalds	  POSIX message queues are visible as a filesystem called 'mqueue'
5061da177e4SLinus Torvalds	  and can be mounted somewhere if you want to do filesystem
5071da177e4SLinus Torvalds	  operations on message queues.
5081da177e4SLinus Torvalds
5091da177e4SLinus Torvalds	  If unsure, say Y.
5101da177e4SLinus Torvalds
511bdc8e5f8SSerge E. Hallynconfig POSIX_MQUEUE_SYSCTL
512bdc8e5f8SSerge E. Hallyn	bool
513bdc8e5f8SSerge E. Hallyn	depends on POSIX_MQUEUE
514bdc8e5f8SSerge E. Hallyn	depends on SYSCTL
515bdc8e5f8SSerge E. Hallyn	default y
516bdc8e5f8SSerge E. Hallyn
517c73be61cSDavid Howellsconfig WATCH_QUEUE
518c73be61cSDavid Howells	bool "General notification queue"
519c73be61cSDavid Howells	default n
520c73be61cSDavid Howells	help
521c73be61cSDavid Howells
522c73be61cSDavid Howells	  This is a general notification queue for the kernel to pass events to
523c73be61cSDavid Howells	  userspace by splicing them into pipes.  It can be used in conjunction
524c73be61cSDavid Howells	  with watches for key/keyring change notifications and device
525c73be61cSDavid Howells	  notifications.
526c73be61cSDavid Howells
527c02b872aSMauro Carvalho Chehab	  See Documentation/core-api/watch_queue.rst
528c73be61cSDavid Howells
529226b4ccdSKonstantin Khlebnikovconfig CROSS_MEMORY_ATTACH
530226b4ccdSKonstantin Khlebnikov	bool "Enable process_vm_readv/writev syscalls"
531226b4ccdSKonstantin Khlebnikov	depends on MMU
532226b4ccdSKonstantin Khlebnikov	default y
533226b4ccdSKonstantin Khlebnikov	help
534226b4ccdSKonstantin Khlebnikov	  Enabling this option adds the system calls process_vm_readv and
535226b4ccdSKonstantin Khlebnikov	  process_vm_writev which allow a process with the correct privileges
536a2a368d9SGeert Uytterhoeven	  to directly read from or write to another process' address space.
537226b4ccdSKonstantin Khlebnikov	  See the man page for more details.
538226b4ccdSKonstantin Khlebnikov
5391da177e4SLinus Torvaldsconfig AUDIT
5401da177e4SLinus Torvalds	bool "Auditing support"
541804a6a49SChris Wright	depends on NET
5421da177e4SLinus Torvalds	help
5431da177e4SLinus Torvalds	  Enable auditing infrastructure that can be used with another
5441da177e4SLinus Torvalds	  kernel subsystem, such as SELinux (which requires this for
545cb74ed27SPaul Moore	  logging of avc messages output).  System call auditing is included
546cb74ed27SPaul Moore	  on architectures which support it.
5471da177e4SLinus Torvalds
5487a017721SAKASHI Takahiroconfig HAVE_ARCH_AUDITSYSCALL
5497a017721SAKASHI Takahiro	bool
5507a017721SAKASHI Takahiro
5511da177e4SLinus Torvaldsconfig AUDITSYSCALL
552cb74ed27SPaul Moore	def_bool y
5537a017721SAKASHI Takahiro	depends on AUDIT && HAVE_ARCH_AUDITSYSCALL
55428a3a7ebSEric Paris	select FSNOTIFY
55574c3cbe3SAl Viro
556d9817ebeSThomas Gleixnersource "kernel/irq/Kconfig"
557764e0da1SThomas Gleixnersource "kernel/time/Kconfig"
558b24abcffSDaniel Borkmannsource "kernel/bpf/Kconfig"
55987a4c375SChristoph Hellwigsource "kernel/Kconfig.preempt"
560d9817ebeSThomas Gleixner
561391dc69cSFrederic Weisbeckermenu "CPU/Task time and stats accounting"
562391dc69cSFrederic Weisbecker
563abf917cdSFrederic Weisbeckerconfig VIRT_CPU_ACCOUNTING
564abf917cdSFrederic Weisbecker	bool
565abf917cdSFrederic Weisbecker
566fdf9c356SFrederic Weisbeckerchoice
567fdf9c356SFrederic Weisbecker	prompt "Cputime accounting"
568b17006b4SJulian Braha	default VIRT_CPU_ACCOUNTING_GEN if NO_HZ_FULL
56902382affSNicholas Piggin	default TICK_CPU_ACCOUNTING
570fdf9c356SFrederic Weisbecker
571fdf9c356SFrederic Weisbecker# Kind of a stub config for the pure tick based cputime accounting
572fdf9c356SFrederic Weisbeckerconfig TICK_CPU_ACCOUNTING
573fdf9c356SFrederic Weisbecker	bool "Simple tick based cputime accounting"
574c58b0df1SFrederic Weisbecker	depends on !S390 && !NO_HZ_FULL
575fdf9c356SFrederic Weisbecker	help
576fdf9c356SFrederic Weisbecker	  This is the basic tick based cputime accounting that maintains
577fdf9c356SFrederic Weisbecker	  statistics about user, system and idle time spent on per jiffies
578fdf9c356SFrederic Weisbecker	  granularity.
579fdf9c356SFrederic Weisbecker
580fdf9c356SFrederic Weisbecker	  If unsure, say Y.
581fdf9c356SFrederic Weisbecker
582abf917cdSFrederic Weisbeckerconfig VIRT_CPU_ACCOUNTING_NATIVE
583391dc69cSFrederic Weisbecker	bool "Deterministic task and CPU time accounting"
584c58b0df1SFrederic Weisbecker	depends on HAVE_VIRT_CPU_ACCOUNTING && !NO_HZ_FULL
585abf917cdSFrederic Weisbecker	select VIRT_CPU_ACCOUNTING
586391dc69cSFrederic Weisbecker	help
587391dc69cSFrederic Weisbecker	  Select this option to enable more accurate task and CPU time
588391dc69cSFrederic Weisbecker	  accounting.  This is done by reading a CPU counter on each
589391dc69cSFrederic Weisbecker	  kernel entry and exit and on transitions within the kernel
590391dc69cSFrederic Weisbecker	  between system, softirq and hardirq state, so there is a
591391dc69cSFrederic Weisbecker	  small performance impact.  In the case of s390 or IBM POWER > 5,
592391dc69cSFrederic Weisbecker	  this also enables accounting of stolen time on logically-partitioned
593391dc69cSFrederic Weisbecker	  systems.
594391dc69cSFrederic Weisbecker
595abf917cdSFrederic Weisbeckerconfig VIRT_CPU_ACCOUNTING_GEN
596abf917cdSFrederic Weisbecker	bool "Full dynticks CPU time accounting"
59724a9c541SFrederic Weisbecker	depends on HAVE_CONTEXT_TRACKING_USER
598554b0004SKevin Hilman	depends on HAVE_VIRT_CPU_ACCOUNTING_GEN
599041a1574SArnd Bergmann	depends on GENERIC_CLOCKEVENTS
600abf917cdSFrederic Weisbecker	select VIRT_CPU_ACCOUNTING
60124a9c541SFrederic Weisbecker	select CONTEXT_TRACKING_USER
602abf917cdSFrederic Weisbecker	help
603abf917cdSFrederic Weisbecker	  Select this option to enable task and CPU time accounting on full
604abf917cdSFrederic Weisbecker	  dynticks systems. This accounting is implemented by watching every
605abf917cdSFrederic Weisbecker	  kernel-user boundaries using the context tracking subsystem.
606abf917cdSFrederic Weisbecker	  The accounting is thus performed at the expense of some significant
607abf917cdSFrederic Weisbecker	  overhead.
608abf917cdSFrederic Weisbecker
609abf917cdSFrederic Weisbecker	  For now this is only useful if you are working on the full
610abf917cdSFrederic Weisbecker	  dynticks subsystem development.
611abf917cdSFrederic Weisbecker
612abf917cdSFrederic Weisbecker	  If unsure, say N.
613abf917cdSFrederic Weisbecker
614b58c3584SRik van Rielendchoice
615b58c3584SRik van Riel
616fdf9c356SFrederic Weisbeckerconfig IRQ_TIME_ACCOUNTING
617fdf9c356SFrederic Weisbecker	bool "Fine granularity task level IRQ time accounting"
618b58c3584SRik van Riel	depends on HAVE_IRQ_TIME_ACCOUNTING && !VIRT_CPU_ACCOUNTING_NATIVE
619fdf9c356SFrederic Weisbecker	help
620fdf9c356SFrederic Weisbecker	  Select this option to enable fine granularity task irq time
621fdf9c356SFrederic Weisbecker	  accounting. This is done by reading a timestamp on each
622fdf9c356SFrederic Weisbecker	  transitions between softirq and hardirq state, so there can be a
623fdf9c356SFrederic Weisbecker	  small performance impact.
624fdf9c356SFrederic Weisbecker
625fdf9c356SFrederic Weisbecker	  If in doubt, say N here.
626fdf9c356SFrederic Weisbecker
62711d4afd4SVincent Guittotconfig HAVE_SCHED_AVG_IRQ
62811d4afd4SVincent Guittot	def_bool y
62911d4afd4SVincent Guittot	depends on IRQ_TIME_ACCOUNTING || PARAVIRT_TIME_ACCOUNTING
63011d4afd4SVincent Guittot	depends on SMP
63111d4afd4SVincent Guittot
632d4dbc991SVincent Guittotconfig SCHED_HW_PRESSURE
63398eb401dSValentin Schneider	bool
634fcd7c9c3SValentin Schneider	default y if ARM && ARM_CPU_TOPOLOGY
635fcd7c9c3SValentin Schneider	default y if ARM64
63676504793SThara Gopinath	depends on SMP
63798eb401dSValentin Schneider	depends on CPU_FREQ_THERMAL
63898eb401dSValentin Schneider	help
639d4dbc991SVincent Guittot	  Select this option to enable HW pressure accounting in the
640d4dbc991SVincent Guittot	  scheduler. HW pressure is the value conveyed to the scheduler
64198eb401dSValentin Schneider	  that reflects the reduction in CPU compute capacity resulted from
642d4dbc991SVincent Guittot	  HW throttling. HW throttling occurs when the performance of
643d4dbc991SVincent Guittot	  a CPU is capped due to high operating temperatures as an example.
64498eb401dSValentin Schneider
64598eb401dSValentin Schneider	  If selected, the scheduler will be able to balance tasks accordingly,
64698eb401dSValentin Schneider	  i.e. put less load on throttled CPUs than on non/less throttled ones.
64798eb401dSValentin Schneider
64898eb401dSValentin Schneider	  This requires the architecture to implement
649d4dbc991SVincent Guittot	  arch_update_hw_pressure() and arch_scale_thermal_pressure().
65076504793SThara Gopinath
651391dc69cSFrederic Weisbeckerconfig BSD_PROCESS_ACCT
65246329a9dSJeff Layton	bool "BSD Process Accounting (DEPRECATED)"
6532813893fSIulia Manda	depends on MULTIUSER
65446329a9dSJeff Layton	default n
655391dc69cSFrederic Weisbecker	help
656391dc69cSFrederic Weisbecker	  If you say Y here, a user level program will be able to instruct the
657391dc69cSFrederic Weisbecker	  kernel (via a special system call) to write process accounting
658391dc69cSFrederic Weisbecker	  information to a file: whenever a process exits, information about
659391dc69cSFrederic Weisbecker	  that process will be appended to the file by the kernel.  The
660391dc69cSFrederic Weisbecker	  information includes things such as creation time, owning user,
661391dc69cSFrederic Weisbecker	  command name, memory usage, controlling terminal etc. (the complete
662391dc69cSFrederic Weisbecker	  list is in the struct acct in <file:include/linux/acct.h>).  It is
663391dc69cSFrederic Weisbecker	  up to the user level program to do useful things with this
66446329a9dSJeff Layton	  information.  This mechanism is antiquated and has significant
66546329a9dSJeff Layton	  scalability issues.  You probably want to use eBPF instead.  Say
66646329a9dSJeff Layton	  N unless you really need this.
667391dc69cSFrederic Weisbecker
668391dc69cSFrederic Weisbeckerconfig BSD_PROCESS_ACCT_V3
669391dc69cSFrederic Weisbecker	bool "BSD Process Accounting version 3 file format"
670391dc69cSFrederic Weisbecker	depends on BSD_PROCESS_ACCT
671391dc69cSFrederic Weisbecker	default n
672391dc69cSFrederic Weisbecker	help
673391dc69cSFrederic Weisbecker	  If you say Y here, the process accounting information is written
674391dc69cSFrederic Weisbecker	  in a new file format that also logs the process IDs of each
6753903bf94SRandy Dunlap	  process and its parent. Note that this file format is incompatible
676391dc69cSFrederic Weisbecker	  with previous v0/v1/v2 file formats, so you will need updated tools
677391dc69cSFrederic Weisbecker	  for processing it. A preliminary version of these tools is available
678391dc69cSFrederic Weisbecker	  at <http://www.gnu.org/software/acct/>.
679391dc69cSFrederic Weisbecker
680391dc69cSFrederic Weisbeckerconfig TASKSTATS
68119c92399SKees Cook	bool "Export task/process statistics through netlink"
682391dc69cSFrederic Weisbecker	depends on NET
6832813893fSIulia Manda	depends on MULTIUSER
684391dc69cSFrederic Weisbecker	default n
685391dc69cSFrederic Weisbecker	help
686391dc69cSFrederic Weisbecker	  Export selected statistics for tasks/processes through the
687391dc69cSFrederic Weisbecker	  generic netlink interface. Unlike BSD process accounting, the
688391dc69cSFrederic Weisbecker	  statistics are available during the lifetime of tasks/processes as
689391dc69cSFrederic Weisbecker	  responses to commands. Like BSD accounting, they are sent to user
690391dc69cSFrederic Weisbecker	  space on task exit.
691391dc69cSFrederic Weisbecker
692391dc69cSFrederic Weisbecker	  Say N if unsure.
693391dc69cSFrederic Weisbecker
694391dc69cSFrederic Weisbeckerconfig TASK_DELAY_ACCT
69519c92399SKees Cook	bool "Enable per-task delay accounting"
696391dc69cSFrederic Weisbecker	depends on TASKSTATS
697f6db8347SNaveen N. Rao	select SCHED_INFO
698391dc69cSFrederic Weisbecker	help
699391dc69cSFrederic Weisbecker	  Collect information on time spent by a task waiting for system
700391dc69cSFrederic Weisbecker	  resources like cpu, synchronous block I/O completion and swapping
701391dc69cSFrederic Weisbecker	  in pages. Such statistics can help in setting a task's priorities
702391dc69cSFrederic Weisbecker	  relative to other tasks for cpu, io, rss limits etc.
703391dc69cSFrederic Weisbecker
704391dc69cSFrederic Weisbecker	  Say N if unsure.
705391dc69cSFrederic Weisbecker
706391dc69cSFrederic Weisbeckerconfig TASK_XACCT
70719c92399SKees Cook	bool "Enable extended accounting over taskstats"
708391dc69cSFrederic Weisbecker	depends on TASKSTATS
709391dc69cSFrederic Weisbecker	help
710391dc69cSFrederic Weisbecker	  Collect extended task accounting data and send the data
711391dc69cSFrederic Weisbecker	  to userland for processing over the taskstats interface.
712391dc69cSFrederic Weisbecker
713391dc69cSFrederic Weisbecker	  Say N if unsure.
714391dc69cSFrederic Weisbecker
715391dc69cSFrederic Weisbeckerconfig TASK_IO_ACCOUNTING
71619c92399SKees Cook	bool "Enable per-task storage I/O accounting"
717391dc69cSFrederic Weisbecker	depends on TASK_XACCT
718391dc69cSFrederic Weisbecker	help
719391dc69cSFrederic Weisbecker	  Collect information on the number of bytes of storage I/O which this
720391dc69cSFrederic Weisbecker	  task has caused.
721391dc69cSFrederic Weisbecker
722391dc69cSFrederic Weisbecker	  Say N if unsure.
723391dc69cSFrederic Weisbecker
724eb414681SJohannes Weinerconfig PSI
725eb414681SJohannes Weiner	bool "Pressure stall information tracking"
72698dfdd9eSRandy Dunlap	select KERNFS
727eb414681SJohannes Weiner	help
728eb414681SJohannes Weiner	  Collect metrics that indicate how overcommitted the CPU, memory,
729eb414681SJohannes Weiner	  and IO capacity are in the system.
730eb414681SJohannes Weiner
731eb414681SJohannes Weiner	  If you say Y here, the kernel will create /proc/pressure/ with the
732eb414681SJohannes Weiner	  pressure statistics files cpu, memory, and io. These will indicate
733eb414681SJohannes Weiner	  the share of walltime in which some or all tasks in the system are
734eb414681SJohannes Weiner	  delayed due to contention of the respective resource.
735eb414681SJohannes Weiner
7362ce7135aSJohannes Weiner	  In kernels with cgroup support, cgroups (cgroup2 only) will
7372ce7135aSJohannes Weiner	  have cpu.pressure, memory.pressure, and io.pressure files,
7382ce7135aSJohannes Weiner	  which aggregate pressure stalls for the grouped tasks only.
7392ce7135aSJohannes Weiner
740c3123552SMauro Carvalho Chehab	  For more details see Documentation/accounting/psi.rst.
741eb414681SJohannes Weiner
742eb414681SJohannes Weiner	  Say N if unsure.
743eb414681SJohannes Weiner
744e0c27447SJohannes Weinerconfig PSI_DEFAULT_DISABLED
745e0c27447SJohannes Weiner	bool "Require boot parameter to enable pressure stall information tracking"
746e0c27447SJohannes Weiner	default n
747e0c27447SJohannes Weiner	depends on PSI
748e0c27447SJohannes Weiner	help
749e0c27447SJohannes Weiner	  If set, pressure stall information tracking will be disabled
750428a1cb4SBaruch Siach	  per default but can be enabled through passing psi=1 on the
751428a1cb4SBaruch Siach	  kernel commandline during boot.
752e0c27447SJohannes Weiner
7537b2489d3SJohannes Weiner	  This feature adds some code to the task wakeup and sleep
7547b2489d3SJohannes Weiner	  paths of the scheduler. The overhead is too low to affect
7557b2489d3SJohannes Weiner	  common scheduling-intense workloads in practice (such as
7567b2489d3SJohannes Weiner	  webservers, memcache), but it does show up in artificial
7577b2489d3SJohannes Weiner	  scheduler stress tests, such as hackbench.
7587b2489d3SJohannes Weiner
7597b2489d3SJohannes Weiner	  If you are paranoid and not sure what the kernel will be
7607b2489d3SJohannes Weiner	  used for, say Y.
7617b2489d3SJohannes Weiner
7627b2489d3SJohannes Weiner	  Say N if unsure.
7637b2489d3SJohannes Weiner
764391dc69cSFrederic Weisbeckerendmenu # "CPU/Task time and stats accounting"
765391dc69cSFrederic Weisbecker
7665c4991e2SFrederic Weisbeckerconfig CPU_ISOLATION
7675c4991e2SFrederic Weisbecker	bool "CPU isolation"
76897577684SOleg Nesterov	depends on SMP
7692c43838cSFrederic Weisbecker	default y
7705c4991e2SFrederic Weisbecker	help
7715c4991e2SFrederic Weisbecker	  Make sure that CPUs running critical tasks are not disturbed by
7725c4991e2SFrederic Weisbecker	  any source of "noise" such as unbound workqueues, timers, kthreads...
7732c43838cSFrederic Weisbecker	  Unbound jobs get offloaded to housekeeping CPUs. This is driven by
7742c43838cSFrederic Weisbecker	  the "isolcpus=" boot parameter.
7752c43838cSFrederic Weisbecker
7762c43838cSFrederic Weisbecker	  Say Y if unsure.
7775c4991e2SFrederic Weisbecker
7780af92d46SPaul E. McKenneysource "kernel/rcu/Kconfig"
779c903ff83SMike Travis
7801da177e4SLinus Torvaldsconfig IKCONFIG
781f2443ab6SRoss Biro	tristate "Kernel .config support"
782a7f7f624SMasahiro Yamada	help
7831da177e4SLinus Torvalds	  This option enables the complete Linux kernel ".config" file
7841da177e4SLinus Torvalds	  contents to be saved in the kernel. It provides documentation
7851da177e4SLinus Torvalds	  of which kernel options are used in a running kernel or in an
7861da177e4SLinus Torvalds	  on-disk kernel.  This information can be extracted from the kernel
7871da177e4SLinus Torvalds	  image file with the script scripts/extract-ikconfig and used as
7881da177e4SLinus Torvalds	  input to rebuild the current kernel or to build another kernel.
7891da177e4SLinus Torvalds	  It can also be extracted from a running kernel by reading
7901da177e4SLinus Torvalds	  /proc/config.gz if enabled (below).
7911da177e4SLinus Torvalds
7921da177e4SLinus Torvaldsconfig IKCONFIG_PROC
7931da177e4SLinus Torvalds	bool "Enable access to .config through /proc/config.gz"
7941da177e4SLinus Torvalds	depends on IKCONFIG && PROC_FS
795a7f7f624SMasahiro Yamada	help
7961da177e4SLinus Torvalds	  This option enables access to the kernel configuration file
7971da177e4SLinus Torvalds	  through /proc/config.gz.
7981da177e4SLinus Torvalds
799f7b101d3SJoel Fernandes (Google)config IKHEADERS
800f7b101d3SJoel Fernandes (Google)	tristate "Enable kernel headers through /sys/kernel/kheaders.tar.xz"
801f7b101d3SJoel Fernandes (Google)	depends on SYSFS
80243d8ce9dSJoel Fernandes (Google)	help
803f7b101d3SJoel Fernandes (Google)	  This option enables access to the in-kernel headers that are generated during
804f7b101d3SJoel Fernandes (Google)	  the build process. These can be used to build eBPF tracing programs,
805f7b101d3SJoel Fernandes (Google)	  or similar programs.  If you build the headers as a module, a module called
806f7b101d3SJoel Fernandes (Google)	  kheaders.ko is built which can be loaded on-demand to get access to headers.
80743d8ce9dSJoel Fernandes (Google)
808794543a2SAlistair John Strachanconfig LOG_BUF_SHIFT
809794543a2SAlistair John Strachan	int "Kernel log buffer size (16 => 64KB, 17 => 128KB)"
8101c4b5ecbSChristoph Hellwig	range 12 25
811f17a32e9SAdrian Bunk	default 17
812361e9dfbSJosh Triplett	depends on PRINTK
813794543a2SAlistair John Strachan	help
81423b2899fSLuis R. Rodriguez	  Select the minimal kernel log buffer size as a power of 2.
81523b2899fSLuis R. Rodriguez	  The final size is affected by LOG_CPU_MAX_BUF_SHIFT config
81623b2899fSLuis R. Rodriguez	  parameter, see below. Any higher size also might be forced
81723b2899fSLuis R. Rodriguez	  by "log_buf_len" boot parameter.
81823b2899fSLuis R. Rodriguez
819f17a32e9SAdrian Bunk	  Examples:
820f17a32e9SAdrian Bunk		     17 => 128 KB
821f17a32e9SAdrian Bunk		     16 => 64 KB
822f17a32e9SAdrian Bunk		     15 => 32 KB
823f17a32e9SAdrian Bunk		     14 => 16 KB
824794543a2SAlistair John Strachan		     13 =>  8 KB
825794543a2SAlistair John Strachan		     12 =>  4 KB
826794543a2SAlistair John Strachan
82723b2899fSLuis R. Rodriguezconfig LOG_CPU_MAX_BUF_SHIFT
82823b2899fSLuis R. Rodriguez	int "CPU kernel log buffer size contribution (13 => 8 KB, 17 => 128KB)"
8292240a31dSGeert Uytterhoeven	depends on SMP
83023b2899fSLuis R. Rodriguez	range 0 21
83123b2899fSLuis R. Rodriguez	default 0 if BASE_SMALL
832320bf431SYoann Congal	default 12
833361e9dfbSJosh Triplett	depends on PRINTK
83423b2899fSLuis R. Rodriguez	help
83523b2899fSLuis R. Rodriguez	  This option allows to increase the default ring buffer size
83623b2899fSLuis R. Rodriguez	  according to the number of CPUs. The value defines the contribution
83723b2899fSLuis R. Rodriguez	  of each CPU as a power of 2. The used space is typically only few
83823b2899fSLuis R. Rodriguez	  lines however it might be much more when problems are reported,
83923b2899fSLuis R. Rodriguez	  e.g. backtraces.
84023b2899fSLuis R. Rodriguez
84123b2899fSLuis R. Rodriguez	  The increased size means that a new buffer has to be allocated and
84223b2899fSLuis R. Rodriguez	  the original static one is unused. It makes sense only on systems
84323b2899fSLuis R. Rodriguez	  with more CPUs. Therefore this value is used only when the sum of
84423b2899fSLuis R. Rodriguez	  contributions is greater than the half of the default kernel ring
84523b2899fSLuis R. Rodriguez	  buffer as defined by LOG_BUF_SHIFT. The default values are set
8460f7636e1SPaul Menzel	  so that more than 16 CPUs are needed to trigger the allocation.
84723b2899fSLuis R. Rodriguez
84823b2899fSLuis R. Rodriguez	  Also this option is ignored when "log_buf_len" kernel parameter is
84923b2899fSLuis R. Rodriguez	  used as it forces an exact (power of two) size of the ring buffer.
85023b2899fSLuis R. Rodriguez
85123b2899fSLuis R. Rodriguez	  The number of possible CPUs is used for this computation ignoring
8525e0d8d59SGeert Uytterhoeven	  hotplugging making the computation optimal for the worst case
8535e0d8d59SGeert Uytterhoeven	  scenario while allowing a simple algorithm to be used from bootup.
85423b2899fSLuis R. Rodriguez
85523b2899fSLuis R. Rodriguez	  Examples shift values and their meaning:
85623b2899fSLuis R. Rodriguez		     17 => 128 KB for each CPU
85723b2899fSLuis R. Rodriguez		     16 =>  64 KB for each CPU
85823b2899fSLuis R. Rodriguez		     15 =>  32 KB for each CPU
85923b2899fSLuis R. Rodriguez		     14 =>  16 KB for each CPU
86023b2899fSLuis R. Rodriguez		     13 =>   8 KB for each CPU
86123b2899fSLuis R. Rodriguez		     12 =>   4 KB for each CPU
86223b2899fSLuis R. Rodriguez
86333701557SChris Downconfig PRINTK_INDEX
86433701557SChris Down	bool "Printk indexing debugfs interface"
86533701557SChris Down	depends on PRINTK && DEBUG_FS
86633701557SChris Down	help
86733701557SChris Down	  Add support for indexing of all printk formats known at compile time
86833701557SChris Down	  at <debugfs>/printk/index/<module>.
86933701557SChris Down
87033701557SChris Down	  This can be used as part of maintaining daemons which monitor
87133701557SChris Down	  /dev/kmsg, as it permits auditing the printk formats present in a
87233701557SChris Down	  kernel, allowing detection of cases where monitored printks are
87333701557SChris Down	  changed or no longer present.
87433701557SChris Down
87533701557SChris Down	  There is no additional runtime cost to printk with this enabled.
87633701557SChris Down
8775cdc38f9SKAMEZAWA Hiroyuki#
8785cdc38f9SKAMEZAWA Hiroyuki# Architectures with an unreliable sched_clock() should select this:
8795cdc38f9SKAMEZAWA Hiroyuki#
8805cdc38f9SKAMEZAWA Hiroyukiconfig HAVE_UNSTABLE_SCHED_CLOCK
8815cdc38f9SKAMEZAWA Hiroyuki	bool
8825cdc38f9SKAMEZAWA Hiroyuki
88338ff87f7SStephen Boydconfig GENERIC_SCHED_CLOCK
88438ff87f7SStephen Boyd	bool
88538ff87f7SStephen Boyd
88669842cbaSPatrick Bellasimenu "Scheduler features"
88769842cbaSPatrick Bellasi
88869842cbaSPatrick Bellasiconfig UCLAMP_TASK
88969842cbaSPatrick Bellasi	bool "Enable utilization clamping for RT/FAIR tasks"
89069842cbaSPatrick Bellasi	depends on CPU_FREQ_GOV_SCHEDUTIL
89169842cbaSPatrick Bellasi	help
89269842cbaSPatrick Bellasi	  This feature enables the scheduler to track the clamped utilization
89369842cbaSPatrick Bellasi	  of each CPU based on RUNNABLE tasks scheduled on that CPU.
89469842cbaSPatrick Bellasi
89569842cbaSPatrick Bellasi	  With this option, the user can specify the min and max CPU
89669842cbaSPatrick Bellasi	  utilization allowed for RUNNABLE tasks. The max utilization defines
89769842cbaSPatrick Bellasi	  the maximum frequency a task should use while the min utilization
89869842cbaSPatrick Bellasi	  defines the minimum frequency it should use.
89969842cbaSPatrick Bellasi
90069842cbaSPatrick Bellasi	  Both min and max utilization clamp values are hints to the scheduler,
90169842cbaSPatrick Bellasi	  aiming at improving its frequency selection policy, but they do not
90269842cbaSPatrick Bellasi	  enforce or grant any specific bandwidth for tasks.
90369842cbaSPatrick Bellasi
90469842cbaSPatrick Bellasi	  If in doubt, say N.
90569842cbaSPatrick Bellasi
90669842cbaSPatrick Bellasiconfig UCLAMP_BUCKETS_COUNT
90769842cbaSPatrick Bellasi	int "Number of supported utilization clamp buckets"
90869842cbaSPatrick Bellasi	range 5 20
90969842cbaSPatrick Bellasi	default 5
91069842cbaSPatrick Bellasi	depends on UCLAMP_TASK
91169842cbaSPatrick Bellasi	help
91269842cbaSPatrick Bellasi	  Defines the number of clamp buckets to use. The range of each bucket
91369842cbaSPatrick Bellasi	  will be SCHED_CAPACITY_SCALE/UCLAMP_BUCKETS_COUNT. The higher the
91469842cbaSPatrick Bellasi	  number of clamp buckets the finer their granularity and the higher
91569842cbaSPatrick Bellasi	  the precision of clamping aggregation and tracking at run-time.
91669842cbaSPatrick Bellasi
91769842cbaSPatrick Bellasi	  For example, with the minimum configuration value we will have 5
91869842cbaSPatrick Bellasi	  clamp buckets tracking 20% utilization each. A 25% boosted tasks will
91969842cbaSPatrick Bellasi	  be refcounted in the [20..39]% bucket and will set the bucket clamp
92069842cbaSPatrick Bellasi	  effective value to 25%.
92169842cbaSPatrick Bellasi	  If a second 30% boosted task should be co-scheduled on the same CPU,
92269842cbaSPatrick Bellasi	  that task will be refcounted in the same bucket of the first task and
92369842cbaSPatrick Bellasi	  it will boost the bucket clamp effective value to 30%.
92469842cbaSPatrick Bellasi	  The clamp effective value of a bucket is reset to its nominal value
92569842cbaSPatrick Bellasi	  (20% in the example above) when there are no more tasks refcounted in
92669842cbaSPatrick Bellasi	  that bucket.
92769842cbaSPatrick Bellasi
92869842cbaSPatrick Bellasi	  An additional boost/capping margin can be added to some tasks. In the
92969842cbaSPatrick Bellasi	  example above the 25% task will be boosted to 30% until it exits the
93069842cbaSPatrick Bellasi	  CPU. If that should be considered not acceptable on certain systems,
93169842cbaSPatrick Bellasi	  it's always possible to reduce the margin by increasing the number of
93269842cbaSPatrick Bellasi	  clamp buckets to trade off used memory for run-time tracking
93369842cbaSPatrick Bellasi	  precision.
93469842cbaSPatrick Bellasi
93569842cbaSPatrick Bellasi	  If in doubt, use the default value.
93669842cbaSPatrick Bellasi
93725c411fcSJohn Stultzconfig SCHED_PROXY_EXEC
93825c411fcSJohn Stultz	bool "Proxy Execution"
93925c411fcSJohn Stultz	# Avoid some build failures w/ PREEMPT_RT until it can be fixed
94025c411fcSJohn Stultz	depends on !PREEMPT_RT
94125c411fcSJohn Stultz	# Need to investigate how to inform sched_ext of split contexts
94225c411fcSJohn Stultz	depends on !SCHED_CLASS_EXT
94325c411fcSJohn Stultz	# Not particularly useful until we get to multi-rq proxying
94425c411fcSJohn Stultz	depends on EXPERT
94525c411fcSJohn Stultz	help
94625c411fcSJohn Stultz	  This option enables proxy execution, a mechanism for mutex-owning
94725c411fcSJohn Stultz	  tasks to inherit the scheduling context of higher priority waiters.
94825c411fcSJohn Stultz
94969842cbaSPatrick Bellasiendmenu
95069842cbaSPatrick Bellasi
951be3a7284SAndrea Arcangeli#
952c6f11553SKiryl Shutsemau (Meta)# For architectures that support present-but-inaccessible (PROT_NONE) page
953c6f11553SKiryl Shutsemau (Meta)# table entries detectable via pte_protnone() / pmd_protnone():
954c6f11553SKiryl Shutsemau (Meta)#
955c6f11553SKiryl Shutsemau (Meta)config ARCH_HAS_PTE_PROTNONE
956c6f11553SKiryl Shutsemau (Meta)	bool
957c6f11553SKiryl Shutsemau (Meta)
958c6f11553SKiryl Shutsemau (Meta)#
959be3a7284SAndrea Arcangeli# For architectures that want to enable the support for NUMA-affine scheduler
960be3a7284SAndrea Arcangeli# balancing logic:
961be3a7284SAndrea Arcangeli#
962be3a7284SAndrea Arcangeliconfig ARCH_SUPPORTS_NUMA_BALANCING
963be3a7284SAndrea Arcangeli	bool
964be3a7284SAndrea Arcangeli
965be5e610cSPeter Zijlstra#
96672b252aeSMel Gorman# For architectures that prefer to flush all TLBs after a number of pages
96772b252aeSMel Gorman# are unmapped instead of sending one IPI per page to flush. The architecture
96872b252aeSMel Gorman# must provide guarantees on what happens if a clean TLB cache entry is
96972b252aeSMel Gorman# written after the unmap. Details are in mm/rmap.c near the check for
97072b252aeSMel Gorman# should_defer_flush. The architecture should also consider if the full flush
97172b252aeSMel Gorman# and the refill costs are offset by the savings of sending fewer IPIs.
97272b252aeSMel Gormanconfig ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
97372b252aeSMel Gorman	bool
97472b252aeSMel Gorman
975c12d3362SArd Biesheuvelconfig CC_HAS_INT128
9763a7c7331SMasahiro Yamada	def_bool !$(cc-option,$(m64-flag) -D__SIZEOF_INT128__=0) && 64BIT
977c12d3362SArd Biesheuvel
978dee2b702SGustavo A. R. Silvaconfig CC_IMPLICIT_FALLTHROUGH
979dee2b702SGustavo A. R. Silva	string
980158ea2d2SGustavo A. R. Silva	default "-Wimplicit-fallthrough=5" if CC_IS_GCC && $(cc-option,-Wimplicit-fallthrough=5)
981dee2b702SGustavo A. R. Silva	default "-Wimplicit-fallthrough" if CC_IS_CLANG && $(cc-option,-Wunreachable-code-fallthrough)
982dee2b702SGustavo A. R. Silva
9830d3fccf6SNathan Chancellorconfig CC_MS_EXTENSIONS
9840d3fccf6SNathan Chancellor	string
9850d3fccf6SNathan Chancellor	default "-fms-anonymous-structs" if $(cc-option,-fms-anonymous-structs)
9860d3fccf6SNathan Chancellor	default "-fms-extensions"
9870d3fccf6SNathan Chancellor
9883e00f580SKees Cook# Currently, disable gcc-10+ array-bounds globally.
9890da6e5fdSLinus Torvalds# It's still broken in gcc-13, so no upper bound yet.
9903e00f580SKees Cookconfig GCC10_NO_ARRAY_BOUNDS
9915a41237aSLinus Torvalds	def_bool y
9925a41237aSLinus Torvalds
993f0be87c4SLinus Torvaldsconfig CC_NO_ARRAY_BOUNDS
994f0be87c4SLinus Torvalds	bool
9958e5bd4eaSYury Norov	default y if CC_IS_GCC && GCC_VERSION >= 90000 && GCC10_NO_ARRAY_BOUNDS
996f0be87c4SLinus Torvalds
99702153319SLinus Torvalds# Currently, disable -Wstringop-overflow for GCC globally.
99802153319SLinus Torvaldsconfig GCC_NO_STRINGOP_OVERFLOW
999a5e0ace0SGustavo A. R. Silva	def_bool y
1000a5e0ace0SGustavo A. R. Silva
1001a5e0ace0SGustavo A. R. Silvaconfig CC_NO_STRINGOP_OVERFLOW
1002a5e0ace0SGustavo A. R. Silva	bool
100302153319SLinus Torvalds	default y if CC_IS_GCC && GCC_NO_STRINGOP_OVERFLOW
1004a5e0ace0SGustavo A. R. Silva
1005a5e0ace0SGustavo A. R. Silvaconfig CC_STRINGOP_OVERFLOW
1006a5e0ace0SGustavo A. R. Silva	bool
1007a5e0ace0SGustavo A. R. Silva	default y if CC_IS_GCC && !CC_NO_STRINGOP_OVERFLOW
1008a5e0ace0SGustavo A. R. Silva
100972b252aeSMel Gorman#
1010be5e610cSPeter Zijlstra# For architectures that know their GCC __int128 support is sound
1011be5e610cSPeter Zijlstra#
1012be5e610cSPeter Zijlstraconfig ARCH_SUPPORTS_INT128
1013be5e610cSPeter Zijlstra	bool
1014be5e610cSPeter Zijlstra
1015be3a7284SAndrea Arcangeli# For architectures that (ab)use NUMA to represent different memory regions
1016be3a7284SAndrea Arcangeli# all cpu-local but of different latencies, such as SuperH.
1017be3a7284SAndrea Arcangeli#
1018be3a7284SAndrea Arcangeliconfig ARCH_WANT_NUMA_VARIABLE_LOCALITY
1019be3a7284SAndrea Arcangeli	bool
1020be3a7284SAndrea Arcangeli
1021be3a7284SAndrea Arcangeliconfig NUMA_BALANCING
1022be3a7284SAndrea Arcangeli	bool "Memory placement aware NUMA scheduler"
1023be3a7284SAndrea Arcangeli	depends on ARCH_SUPPORTS_NUMA_BALANCING
1024c6f11553SKiryl Shutsemau (Meta)	depends on ARCH_HAS_PTE_PROTNONE
1025be3a7284SAndrea Arcangeli	depends on !ARCH_WANT_NUMA_VARIABLE_LOCALITY
10266ebf98d7SDavid Hildenbrand (Arm)	depends on SMP && NUMA_MIGRATION && !PREEMPT_RT
1027be3a7284SAndrea Arcangeli	help
1028be3a7284SAndrea Arcangeli	  This option adds support for automatic NUMA aware memory/task placement.
1029be3a7284SAndrea Arcangeli	  The mechanism is quite primitive and is based on migrating memory when
10306d56a410SPaul Gortmaker	  it has references to the node the task is running on.
1031be3a7284SAndrea Arcangeli
1032be3a7284SAndrea Arcangeli	  This system will be inactive on UMA systems.
1033be3a7284SAndrea Arcangeli
1034df0d9847SPeter Zijlstra (Intel)config SCHED_CACHE
1035df0d9847SPeter Zijlstra (Intel)	bool "Cache aware load balance"
1036df0d9847SPeter Zijlstra (Intel)	default y
1037df0d9847SPeter Zijlstra (Intel)	depends on SMP
1038df0d9847SPeter Zijlstra (Intel)	help
1039df0d9847SPeter Zijlstra (Intel)	  When enabled, the scheduler will attempt to aggregate tasks from
1040df0d9847SPeter Zijlstra (Intel)	  the same process onto a single Last Level Cache (LLC) domain when
1041df0d9847SPeter Zijlstra (Intel)	  possible. This improves cache locality by keeping tasks that share
1042df0d9847SPeter Zijlstra (Intel)	  resources within the same cache domain, reducing cache misses and
1043df0d9847SPeter Zijlstra (Intel)	  lowering data access latency.
1044df0d9847SPeter Zijlstra (Intel)
10456f7c97e8SAneesh Kumar K.Vconfig NUMA_BALANCING_DEFAULT_ENABLED
10466f7c97e8SAneesh Kumar K.V	bool "Automatically enable NUMA aware memory/task placement"
10476f7c97e8SAneesh Kumar K.V	default y
10486f7c97e8SAneesh Kumar K.V	depends on NUMA_BALANCING
10496f7c97e8SAneesh Kumar K.V	help
10506f7c97e8SAneesh Kumar K.V	  If set, automatic NUMA balancing will be enabled if running on a NUMA
10516f7c97e8SAneesh Kumar K.V	  machine.
10526f7c97e8SAneesh Kumar K.V
105321c690a3SSuren Baghdasaryanconfig SLAB_OBJ_EXT
105421c690a3SSuren Baghdasaryan	bool
105521c690a3SSuren Baghdasaryan
105623964d2dSLi Zefanmenuconfig CGROUPS
10576341e62bSChristoph Jaeger	bool "Control Group support"
10582bd59d48STejun Heo	select KERNFS
1059ddbcc7e8SPaul Menage	help
106023964d2dSLi Zefan	  This option adds support for grouping sets of processes together, for
10615cdc38f9SKAMEZAWA Hiroyuki	  use with process control subsystems such as Cpusets, CFS, memory
10625cdc38f9SKAMEZAWA Hiroyuki	  controls or device isolation.
10635cdc38f9SKAMEZAWA Hiroyuki	  See
1064d6a3b247SMauro Carvalho Chehab		- Documentation/scheduler/sched-design-CFS.rst	(CFS)
1065da82c92fSMauro Carvalho Chehab		- Documentation/admin-guide/cgroup-v1/ (features for grouping, isolation
106645ce80fbSLi Zefan					  and resource control)
1067ddbcc7e8SPaul Menage
1068ddbcc7e8SPaul Menage	  Say N if unsure.
1069ddbcc7e8SPaul Menage
107023964d2dSLi Zefanif CGROUPS
107123964d2dSLi Zefan
10723e32cb2eSJohannes Weinerconfig PAGE_COUNTER
10733e32cb2eSJohannes Weiner	bool
10743e32cb2eSJohannes Weiner
10756a010a49STejun Heoconfig CGROUP_FAVOR_DYNMODS
10766a010a49STejun Heo	bool "Favor dynamic modification latency reduction by default"
10776a010a49STejun Heo	help
10786a010a49STejun Heo	  This option enables the "favordynmods" mount option by default
10796a010a49STejun Heo	  which reduces the latencies of dynamic cgroup modifications such
10806a010a49STejun Heo	  as task migrations and controller on/offs at the cost of making
10816a010a49STejun Heo	  hot path operations such as forks and exits more expensive.
10826a010a49STejun Heo
10836a010a49STejun Heo	  Say N if unsure.
10846a010a49STejun Heo
1085c255a458SAndrew Mortonconfig MEMCG
1086a0166ec4SJohannes Weiner	bool "Memory controller"
10873e32cb2eSJohannes Weiner	select PAGE_COUNTER
108879bd9814STejun Heo	select EVENTFD
108921c690a3SSuren Baghdasaryan	select SLAB_OBJ_EXT
1090fdc5001bSKirill A. Shutemov	select VM_EVENT_COUNTERS
109100f0b825SBalbir Singh	help
1092a0166ec4SJohannes Weiner	  Provides control over the memory footprint of tasks in a cgroup.
109300f0b825SBalbir Singh
109425352d2fSShakeel Buttconfig MEMCG_NMI_UNSAFE
109525352d2fSShakeel Butt	bool
109625352d2fSShakeel Butt	depends on MEMCG
109725352d2fSShakeel Butt	depends on HAVE_NMI
109825352d2fSShakeel Butt	depends on !ARCH_HAS_NMI_SAFE_THIS_CPU_OPS && !ARCH_HAVE_NMI_SAFE_CMPXCHG
109925352d2fSShakeel Butt	default y
110025352d2fSShakeel Butt
1101940b01fcSShakeel Buttconfig MEMCG_NMI_SAFETY_REQUIRES_ATOMIC
1102940b01fcSShakeel Butt	bool
1103940b01fcSShakeel Butt	depends on MEMCG
1104940b01fcSShakeel Butt	depends on HAVE_NMI
1105940b01fcSShakeel Butt	depends on !ARCH_HAS_NMI_SAFE_THIS_CPU_OPS && ARCH_HAVE_NMI_SAFE_CMPXCHG
1106940b01fcSShakeel Butt	default y
1107940b01fcSShakeel Butt
1108e93d4166SRoman Gushchinconfig MEMCG_V1
1109e93d4166SRoman Gushchin	bool "Legacy cgroup v1 memory controller"
1110c9929f0eSVlastimil Babka	depends on MEMCG
1111e93d4166SRoman Gushchin	default n
1112e93d4166SRoman Gushchin	help
1113e93d4166SRoman Gushchin	  Legacy cgroup v1 memory controller which has been deprecated by
1114e93d4166SRoman Gushchin	  cgroup v2 implementation. The v1 is there for legacy applications
1115e93d4166SRoman Gushchin	  which haven't migrated to the new cgroup v2 interface yet. If you
1116e93d4166SRoman Gushchin	  do not have any such application then you are completely fine leaving
1117e93d4166SRoman Gushchin	  this option disabled.
1118e93d4166SRoman Gushchin
1119e93d4166SRoman Gushchin	  Please note that feature set of the legacy memory controller is likely
1120e93d4166SRoman Gushchin	  going to shrink due to deprecation process. New deployments with v1
1121e93d4166SRoman Gushchin	  controller are highly discouraged.
1122e93d4166SRoman Gushchin
1123fcb4824bSValdis Kletnieks	  Say N if unsure.
112484c07d11SKirill Tkhai
11256bf024e6SJohannes Weinerconfig BLK_CGROUP
11266bf024e6SJohannes Weiner	bool "IO controller"
11276bf024e6SJohannes Weiner	depends on BLOCK
11282bc64a20SAneesh Kumar K.V	default n
1129a7f7f624SMasahiro Yamada	help
11306bf024e6SJohannes Weiner	Generic block IO controller cgroup interface. This is the common
11316bf024e6SJohannes Weiner	cgroup interface which should be used by various IO controlling
11326bf024e6SJohannes Weiner	policies.
11332bc64a20SAneesh Kumar K.V
11346bf024e6SJohannes Weiner	Currently, CFQ IO scheduler uses it to recognize task groups and
11356bf024e6SJohannes Weiner	control disk bandwidth allocation (proportional time slice allocation)
11366bf024e6SJohannes Weiner	to such task groups. It is also used by bio throttling logic in
11376bf024e6SJohannes Weiner	block layer to implement upper limit in IO rates on a device.
1138e5d1367fSStephane Eranian
11396bf024e6SJohannes Weiner	This option only enables generic Block IO controller infrastructure.
11406bf024e6SJohannes Weiner	One needs to also enable actual IO controlling logic/policy. For
11416bf024e6SJohannes Weiner	enabling proportional weight division of disk bandwidth in CFQ, set
11427baf2199SKrzysztof Kozlowski	CONFIG_BFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
11436bf024e6SJohannes Weiner	CONFIG_BLK_DEV_THROTTLING=y.
11446bf024e6SJohannes Weiner
1145da82c92fSMauro Carvalho Chehab	See Documentation/admin-guide/cgroup-v1/blkio-controller.rst for more information.
11466bf024e6SJohannes Weiner
11476bf024e6SJohannes Weinerconfig CGROUP_WRITEBACK
11486bf024e6SJohannes Weiner	bool
11496bf024e6SJohannes Weiner	depends on MEMCG && BLK_CGROUP
11506bf024e6SJohannes Weiner	default y
1151e5d1367fSStephane Eranian
11527c941438SDhaval Gianimenuconfig CGROUP_SCHED
1153a0166ec4SJohannes Weiner	bool "CPU controller"
11547c941438SDhaval Giani	default n
11557c941438SDhaval Giani	help
11567c941438SDhaval Giani	  This feature lets CPU scheduler recognize task groups and control CPU
11577c941438SDhaval Giani	  bandwidth allocation to such task groups. It uses cgroups to group
11587c941438SDhaval Giani	  tasks.
11597c941438SDhaval Giani
11607c941438SDhaval Gianiif CGROUP_SCHED
1161e179e80cSTejun Heoconfig GROUP_SCHED_WEIGHT
1162e179e80cSTejun Heo	def_bool n
1163e179e80cSTejun Heo
1164ddceadceSTejun Heoconfig GROUP_SCHED_BANDWIDTH
1165ddceadceSTejun Heo	def_bool n
1166ddceadceSTejun Heo
11677c941438SDhaval Gianiconfig FAIR_GROUP_SCHED
11687c941438SDhaval Giani	bool "Group scheduling for SCHED_OTHER"
11697c941438SDhaval Giani	depends on CGROUP_SCHED
1170e179e80cSTejun Heo	select GROUP_SCHED_WEIGHT
11717c941438SDhaval Giani	default CGROUP_SCHED
11727c941438SDhaval Giani
1173ab84d31eSPaul Turnerconfig CFS_BANDWIDTH
1174ab84d31eSPaul Turner	bool "CPU bandwidth provisioning for FAIR_GROUP_SCHED"
1175ab84d31eSPaul Turner	depends on FAIR_GROUP_SCHED
1176ddceadceSTejun Heo	select GROUP_SCHED_BANDWIDTH
1177ab84d31eSPaul Turner	default n
1178ab84d31eSPaul Turner	help
1179ab84d31eSPaul Turner	  This option allows users to define CPU bandwidth rates (limits) for
1180ab84d31eSPaul Turner	  tasks running within the fair group scheduler.  Groups with no limit
1181ab84d31eSPaul Turner	  set are considered to be unconstrained and will run with no
1182ab84d31eSPaul Turner	  restriction.
1183d6a3b247SMauro Carvalho Chehab	  See Documentation/scheduler/sched-bwc.rst for more information.
1184ab84d31eSPaul Turner
11857c941438SDhaval Gianiconfig RT_GROUP_SCHED
11867c941438SDhaval Giani	bool "Group scheduling for SCHED_RR/FIFO"
11877c941438SDhaval Giani	depends on CGROUP_SCHED
11887c941438SDhaval Giani	default n
11897c941438SDhaval Giani	help
11907c941438SDhaval Giani	  This feature lets you explicitly allocate real CPU bandwidth
119132bd7eb5SLi Zefan	  to task groups. If enabled, it will also make it impossible to
11927c941438SDhaval Giani	  schedule realtime tasks for non-root users until you allocate
11937c941438SDhaval Giani	  realtime bandwidth for them.
1194d6a3b247SMauro Carvalho Chehab	  See Documentation/scheduler/sched-rt-group.rst for more information.
11957c941438SDhaval Giani
1196e34e0131SMichal Koutnýconfig RT_GROUP_SCHED_DEFAULT_DISABLED
1197e34e0131SMichal Koutný	bool "Require boot parameter to enable group scheduling for SCHED_RR/FIFO"
1198e34e0131SMichal Koutný	depends on RT_GROUP_SCHED
1199e34e0131SMichal Koutný	default n
1200e34e0131SMichal Koutný	help
1201e34e0131SMichal Koutný	  When set, the RT group scheduling is disabled by default. The option
1202e34e0131SMichal Koutný	  is in inverted form so that mere RT_GROUP_SCHED enables the group
1203e34e0131SMichal Koutný	  scheduling.
1204e34e0131SMichal Koutný
1205e34e0131SMichal Koutný	  Say N if unsure.
1206e34e0131SMichal Koutný
120781951366STejun Heoconfig EXT_GROUP_SCHED
120881951366STejun Heo	bool
120981951366STejun Heo	depends on SCHED_CLASS_EXT && CGROUP_SCHED
121081951366STejun Heo	select GROUP_SCHED_WEIGHT
1211ddceadceSTejun Heo	select GROUP_SCHED_BANDWIDTH
121281951366STejun Heo	default y
121381951366STejun Heo
12147c941438SDhaval Gianiendif #CGROUP_SCHED
12157c941438SDhaval Giani
1216ebeca1f9STejun Heoconfig EXT_SUB_SCHED
1217ebeca1f9STejun Heo        def_bool y
1218e73b1d72SCheng-Yang Chou        depends on SCHED_CLASS_EXT && CGROUPS
1219ebeca1f9STejun Heo
1220af7f588dSMathieu Desnoyersconfig SCHED_MM_CID
1221af7f588dSMathieu Desnoyers	def_bool y
1222af7f588dSMathieu Desnoyers	depends on SMP && RSEQ
1223af7f588dSMathieu Desnoyers
12242480c093SPatrick Bellasiconfig UCLAMP_TASK_GROUP
12252480c093SPatrick Bellasi	bool "Utilization clamping per group of tasks"
12262480c093SPatrick Bellasi	depends on CGROUP_SCHED
12272480c093SPatrick Bellasi	depends on UCLAMP_TASK
12282480c093SPatrick Bellasi	default n
12292480c093SPatrick Bellasi	help
12302480c093SPatrick Bellasi	  This feature enables the scheduler to track the clamped utilization
12312480c093SPatrick Bellasi	  of each CPU based on RUNNABLE tasks currently scheduled on that CPU.
12322480c093SPatrick Bellasi
12332480c093SPatrick Bellasi	  When this option is enabled, the user can specify a min and max
12342480c093SPatrick Bellasi	  CPU bandwidth which is allowed for each single task in a group.
12352480c093SPatrick Bellasi	  The max bandwidth allows to clamp the maximum frequency a task
12362480c093SPatrick Bellasi	  can use, while the min bandwidth allows to define a minimum
12372480c093SPatrick Bellasi	  frequency a task will always use.
12382480c093SPatrick Bellasi
12392480c093SPatrick Bellasi	  When task group based utilization clamping is enabled, an eventually
12402480c093SPatrick Bellasi	  specified task-specific clamp value is constrained by the cgroup
12412480c093SPatrick Bellasi	  specified clamp value. Both minimum and maximum task clamping cannot
12422480c093SPatrick Bellasi	  be bigger than the corresponding clamping defined at task group level.
12432480c093SPatrick Bellasi
12442480c093SPatrick Bellasi	  If in doubt, say N.
12452480c093SPatrick Bellasi
12466bf024e6SJohannes Weinerconfig CGROUP_PIDS
12476bf024e6SJohannes Weiner	bool "PIDs controller"
12486bf024e6SJohannes Weiner	help
12496bf024e6SJohannes Weiner	  Provides enforcement of process number limits in the scope of a
12506bf024e6SJohannes Weiner	  cgroup. Any attempt to fork more processes than is allowed in the
12516bf024e6SJohannes Weiner	  cgroup will fail. PIDs are fundamentally a global resource because it
12526bf024e6SJohannes Weiner	  is fairly trivial to reach PID exhaustion before you reach even a
12536bf024e6SJohannes Weiner	  conservative kmemcg limit. As a result, it is possible to grind a
12546bf024e6SJohannes Weiner	  system to halt without being limited by other cgroup policies. The
12556cc578dfSParav Pandit	  PIDs controller is designed to stop this from happening.
12566bf024e6SJohannes Weiner
12576bf024e6SJohannes Weiner	  It should be noted that organisational operations (such as attaching
125898076833SJonathan Neuschäfer	  to a cgroup hierarchy) will *not* be blocked by the PIDs controller,
12596bf024e6SJohannes Weiner	  since the PIDs limit only affects a process's ability to fork, not to
12606bf024e6SJohannes Weiner	  attach to a cgroup.
12616bf024e6SJohannes Weiner
126239d3e758SParav Panditconfig CGROUP_RDMA
126339d3e758SParav Pandit	bool "RDMA controller"
126439d3e758SParav Pandit	help
126539d3e758SParav Pandit	  Provides enforcement of RDMA resources defined by IB stack.
126639d3e758SParav Pandit	  It is fairly easy for consumers to exhaust RDMA resources, which
126739d3e758SParav Pandit	  can result into resource unavailability to other consumers.
126839d3e758SParav Pandit	  RDMA controller is designed to stop this from happening.
126939d3e758SParav Pandit	  Attaching processes with active RDMA resources to the cgroup
127039d3e758SParav Pandit	  hierarchy is allowed even if can cross the hierarchy's limit.
127139d3e758SParav Pandit
1272b168ed45SMaarten Lankhorstconfig CGROUP_DMEM
1273b168ed45SMaarten Lankhorst	bool "Device memory controller (DMEM)"
1274e33b5149SMaxime Ripard	select PAGE_COUNTER
1275b168ed45SMaarten Lankhorst	help
1276b168ed45SMaarten Lankhorst	  The DMEM controller allows compatible devices to restrict device
1277b168ed45SMaarten Lankhorst	  memory usage based on the cgroup hierarchy.
1278b168ed45SMaarten Lankhorst
1279b168ed45SMaarten Lankhorst	  As an example, it allows you to restrict VRAM usage for applications
1280b168ed45SMaarten Lankhorst	  in the DRM subsystem.
1281b168ed45SMaarten Lankhorst
12826bf024e6SJohannes Weinerconfig CGROUP_FREEZER
12836bf024e6SJohannes Weiner	bool "Freezer controller"
12846bf024e6SJohannes Weiner	help
12856bf024e6SJohannes Weiner	  Provides a way to freeze and unfreeze all tasks in a
12866bf024e6SJohannes Weiner	  cgroup.
12876bf024e6SJohannes Weiner
1288489c2a20SJohannes Weiner	  This option affects the ORIGINAL cgroup interface. The cgroup2 memory
1289489c2a20SJohannes Weiner	  controller includes important in-kernel memory consumers per default.
1290489c2a20SJohannes Weiner
1291489c2a20SJohannes Weiner	  If you're using cgroup2, say N.
1292489c2a20SJohannes Weiner
12936bf024e6SJohannes Weinerconfig CGROUP_HUGETLB
12946bf024e6SJohannes Weiner	bool "HugeTLB controller"
12956bf024e6SJohannes Weiner	depends on HUGETLB_PAGE
12966bf024e6SJohannes Weiner	select PAGE_COUNTER
1297afc24d49SVivek Goyal	default n
12986bf024e6SJohannes Weiner	help
12996bf024e6SJohannes Weiner	  Provides a cgroup controller for HugeTLB pages.
13006bf024e6SJohannes Weiner	  When you enable this, you can put a per cgroup limit on HugeTLB usage.
13016bf024e6SJohannes Weiner	  The limit is enforced during page fault. Since HugeTLB doesn't
13026bf024e6SJohannes Weiner	  support page reclaim, enforcing the limit at page fault time implies
13036bf024e6SJohannes Weiner	  that, the application will get SIGBUS signal if it tries to access
13046bf024e6SJohannes Weiner	  HugeTLB pages beyond its limit. This requires the application to know
13056bf024e6SJohannes Weiner	  beforehand how much HugeTLB pages it would require for its use. The
13066bf024e6SJohannes Weiner	  control group is tracked in the third page lru pointer. This means
13076bf024e6SJohannes Weiner	  that we cannot use the controller with huge page less than 3 pages.
1308afc24d49SVivek Goyal
13096bf024e6SJohannes Weinerconfig CPUSETS
13106bf024e6SJohannes Weiner	bool "Cpuset controller"
1311e1d4eeecSNicolas Pitre	depends on SMP
1312bf9850f6SKuan-Wei Chiu	select UNION_FIND
131323f09dccSFrederic Weisbecker	select CPU_ISOLATION
13146bf024e6SJohannes Weiner	help
13156bf024e6SJohannes Weiner	  This option will let you create and manage CPUSETs which
13166bf024e6SJohannes Weiner	  allow dynamically partitioning a system into sets of CPUs and
13176bf024e6SJohannes Weiner	  Memory Nodes and assigning tasks to run only within those sets.
13186bf024e6SJohannes Weiner	  This is primarily useful on large SMP or NUMA systems.
1319afc24d49SVivek Goyal
13206bf024e6SJohannes Weiner	  Say N if unsure.
1321afc24d49SVivek Goyal
13221abab1baSChen Ridongconfig CPUSETS_V1
13231abab1baSChen Ridong	bool "Legacy cgroup v1 cpusets controller"
13241abab1baSChen Ridong	depends on CPUSETS
13251abab1baSChen Ridong	default n
13261abab1baSChen Ridong	help
13271abab1baSChen Ridong	  Legacy cgroup v1 cpusets controller which has been deprecated by
13281abab1baSChen Ridong	  cgroup v2 implementation. The v1 is there for legacy applications
1329dae68fbaSMichal Koutný	  which haven't migrated to the new cgroup v2 interface yet. Legacy
1330dae68fbaSMichal Koutný	  interface includes cpuset filesystem and /proc/<pid>/cpuset. If you
13311abab1baSChen Ridong	  do not have any such application then you are completely fine leaving
13321abab1baSChen Ridong	  this option disabled.
13331abab1baSChen Ridong
13341abab1baSChen Ridong	  Say N if unsure.
13351abab1baSChen Ridong
13366bf024e6SJohannes Weinerconfig PROC_PID_CPUSET
13376bf024e6SJohannes Weiner	bool "Include legacy /proc/<pid>/cpuset file"
1338dae68fbaSMichal Koutný	depends on CPUSETS_V1
133989e9b9e0STejun Heo	default y
134089e9b9e0STejun Heo
13416bf024e6SJohannes Weinerconfig CGROUP_DEVICE
13426bf024e6SJohannes Weiner	bool "Device controller"
13436bf024e6SJohannes Weiner	help
13446bf024e6SJohannes Weiner	  Provides a cgroup controller implementing whitelists for
13456bf024e6SJohannes Weiner	  devices which a process in the cgroup can mknod or open.
13466bf024e6SJohannes Weiner
13476bf024e6SJohannes Weinerconfig CGROUP_CPUACCT
13486bf024e6SJohannes Weiner	bool "Simple CPU accounting controller"
13496bf024e6SJohannes Weiner	help
13506bf024e6SJohannes Weiner	  Provides a simple controller for monitoring the
13516bf024e6SJohannes Weiner	  total CPU consumed by the tasks in a cgroup.
13526bf024e6SJohannes Weiner
13536bf024e6SJohannes Weinerconfig CGROUP_PERF
13546bf024e6SJohannes Weiner	bool "Perf controller"
13556bf024e6SJohannes Weiner	depends on PERF_EVENTS
13566bf024e6SJohannes Weiner	help
13576bf024e6SJohannes Weiner	  This option extends the perf per-cpu mode to restrict monitoring
13586bf024e6SJohannes Weiner	  to threads which belong to the cgroup specified and run on the
13596546b19fSNamhyung Kim	  designated cpu.  Or this can be used to have cgroup ID in samples
13606546b19fSNamhyung Kim	  so that it can monitor performance events among cgroups.
13616bf024e6SJohannes Weiner
13626bf024e6SJohannes Weiner	  Say N if unsure.
13636bf024e6SJohannes Weiner
136430070984SDaniel Mackconfig CGROUP_BPF
136530070984SDaniel Mack	bool "Support for eBPF programs attached to cgroups"
1366483c4933SAndy Lutomirski	depends on BPF_SYSCALL
1367483c4933SAndy Lutomirski	select SOCK_CGROUP_DATA
136830070984SDaniel Mack	help
136930070984SDaniel Mack	  Allow attaching eBPF programs to a cgroup using the bpf(2)
137030070984SDaniel Mack	  syscall command BPF_PROG_ATTACH.
137130070984SDaniel Mack
137230070984SDaniel Mack	  In which context these programs are accessed depends on the type
137330070984SDaniel Mack	  of attachment. For instance, programs that are attached using
137430070984SDaniel Mack	  BPF_CGROUP_INET_INGRESS will be executed on the ingress path of
137530070984SDaniel Mack	  inet sockets.
137630070984SDaniel Mack
1377a72232eaSVipin Sharmaconfig CGROUP_MISC
1378a72232eaSVipin Sharma	bool "Misc resource controller"
1379a72232eaSVipin Sharma	default n
1380a72232eaSVipin Sharma	help
1381a72232eaSVipin Sharma	  Provides a controller for miscellaneous resources on a host.
1382a72232eaSVipin Sharma
1383a72232eaSVipin Sharma	  Miscellaneous scalar resources are the resources on the host system
1384a72232eaSVipin Sharma	  which cannot be abstracted like the other cgroups. This controller
1385a72232eaSVipin Sharma	  tracks and limits the miscellaneous resources used by a process
1386a72232eaSVipin Sharma	  attached to a cgroup hierarchy.
1387a72232eaSVipin Sharma
1388a72232eaSVipin Sharma	  For more information, please check misc cgroup section in
1389a72232eaSVipin Sharma	  /Documentation/admin-guide/cgroup-v2.rst.
1390a72232eaSVipin Sharma
13916bf024e6SJohannes Weinerconfig CGROUP_DEBUG
139223b0be48SWaiman Long	bool "Debug controller"
13936bf024e6SJohannes Weiner	default n
139423b0be48SWaiman Long	depends on DEBUG_KERNEL
13956bf024e6SJohannes Weiner	help
13966bf024e6SJohannes Weiner	  This option enables a simple controller that exports
139723b0be48SWaiman Long	  debugging information about the cgroups framework. This
139823b0be48SWaiman Long	  controller is for control cgroup debugging only. Its
139923b0be48SWaiman Long	  interfaces are not stable.
14006bf024e6SJohannes Weiner
14016bf024e6SJohannes Weiner	  Say N.
14026bf024e6SJohannes Weiner
140373b35147SArnd Bergmannconfig SOCK_CGROUP_DATA
140473b35147SArnd Bergmann	bool
140573b35147SArnd Bergmann	default n
140673b35147SArnd Bergmann
140723964d2dSLi Zefanendif # CGROUPS
1408c077719bSKAMEZAWA Hiroyuki
14098dd2a82cSDaniel Lezcanomenuconfig NAMESPACES
14106a108a14SDavid Rientjes	bool "Namespaces support" if EXPERT
14112813893fSIulia Manda	depends on MULTIUSER
14126a108a14SDavid Rientjes	default !EXPERT
1413c5289a69SPavel Emelyanov	help
1414c5289a69SPavel Emelyanov	  Provides the way to make tasks work with different objects using
1415c5289a69SPavel Emelyanov	  the same id. For example same IPC id may refer to different objects
1416c5289a69SPavel Emelyanov	  or same user id or pid may refer to different tasks when used in
1417c5289a69SPavel Emelyanov	  different namespaces.
1418c5289a69SPavel Emelyanov
14198dd2a82cSDaniel Lezcanoif NAMESPACES
14208dd2a82cSDaniel Lezcano
142158bfdd6dSPavel Emelyanovconfig UTS_NS
142258bfdd6dSPavel Emelyanov	bool "UTS namespace"
142317a6d441SDaniel Lezcano	default y
142458bfdd6dSPavel Emelyanov	help
142558bfdd6dSPavel Emelyanov	  In this namespace tasks see different info provided with the
142658bfdd6dSPavel Emelyanov	  uname() system call
142758bfdd6dSPavel Emelyanov
1428769071acSAndrei Vaginconfig TIME_NS
1429769071acSAndrei Vagin	bool "TIME namespace"
1430769071acSAndrei Vagin	default y
1431769071acSAndrei Vagin	help
1432769071acSAndrei Vagin	  In this namespace boottime and monotonic clocks can be set.
1433769071acSAndrei Vagin	  The time will keep going with the same pace.
1434769071acSAndrei Vagin
14351b6c8928SThomas Weißschuhconfig TIME_NS_VDSO
14361b6c8928SThomas Weißschuh	def_bool TIME_NS && GENERIC_GETTIMEOFDAY
14371b6c8928SThomas Weißschuh
1438ae5e1b22SPavel Emelyanovconfig IPC_NS
1439ae5e1b22SPavel Emelyanov	bool "IPC namespace"
14408dd2a82cSDaniel Lezcano	depends on (SYSVIPC || POSIX_MQUEUE)
144117a6d441SDaniel Lezcano	default y
1442ae5e1b22SPavel Emelyanov	help
1443ae5e1b22SPavel Emelyanov	  In this namespace tasks work with IPC ids which correspond to
1444614b84cfSSerge E. Hallyn	  different IPC objects in different namespaces.
1445ae5e1b22SPavel Emelyanov
1446aee16ce7SPavel Emelyanovconfig USER_NS
144719c92399SKees Cook	bool "User namespace"
14485673a94cSEric W. Biederman	default n
1449aee16ce7SPavel Emelyanov	help
1450aee16ce7SPavel Emelyanov	  This allows containers, i.e. vservers, to use user namespaces
1451aee16ce7SPavel Emelyanov	  to provide different user info for different servers.
1452e11f0ae3SEric W. Biederman
1453e11f0ae3SEric W. Biederman	  When user namespaces are enabled in the kernel it is
1454d886f4e4SJohannes Weiner	  recommended that the MEMCG option also be enabled and that
1455d886f4e4SJohannes Weiner	  user-space use the memory control groups to limit the amount
1456d886f4e4SJohannes Weiner	  of memory a memory unprivileged users can use.
1457e11f0ae3SEric W. Biederman
1458aee16ce7SPavel Emelyanov	  If unsure, say N.
1459aee16ce7SPavel Emelyanov
146074bd59bbSPavel Emelyanovconfig PID_NS
14619bd38c2cSDaniel Lezcano	bool "PID Namespaces"
146217a6d441SDaniel Lezcano	default y
146374bd59bbSPavel Emelyanov	help
146412d2b8f9SHeikki Orsila	  Support process id namespaces.  This allows having multiple
1465692105b8SMatt LaPlante	  processes with the same pid as long as they are in different
146674bd59bbSPavel Emelyanov	  pid namespaces.  This is a building block of containers.
146774bd59bbSPavel Emelyanov
1468d6eb633fSMatt Helsleyconfig NET_NS
1469d6eb633fSMatt Helsley	bool "Network namespace"
14708dd2a82cSDaniel Lezcano	depends on NET
147117a6d441SDaniel Lezcano	default y
1472d6eb633fSMatt Helsley	help
1473d6eb633fSMatt Helsley	  Allow user space to create what appear to be multiple instances
1474d6eb633fSMatt Helsley	  of the network stack.
1475d6eb633fSMatt Helsley
14768dd2a82cSDaniel Lezcanoendif # NAMESPACES
14778dd2a82cSDaniel Lezcano
14785cb366bbSAdrian Reberconfig CHECKPOINT_RESTORE
14795cb366bbSAdrian Reber	bool "Checkpoint/restore support"
148030341ec9SRen Zhijie	depends on PROC_FS
14815cb366bbSAdrian Reber	select PROC_CHILDREN
1482bfe3911aSChris Wilson	select KCMP
14835cb366bbSAdrian Reber	default n
14845cb366bbSAdrian Reber	help
14855cb366bbSAdrian Reber	  Enables additional kernel features in a sake of checkpoint/restore.
14865cb366bbSAdrian Reber	  In particular it adds auxiliary prctl codes to setup process text,
14875cb366bbSAdrian Reber	  data and heap segment sizes, and a few additional /proc filesystem
14885cb366bbSAdrian Reber	  entries.
14895cb366bbSAdrian Reber
14905cb366bbSAdrian Reber	  If unsure, say N here.
14915cb366bbSAdrian Reber
14925091faa4SMike Galbraithconfig SCHED_AUTOGROUP
14935091faa4SMike Galbraith	bool "Automatic process group scheduling"
14945091faa4SMike Galbraith	select CGROUPS
14955091faa4SMike Galbraith	select CGROUP_SCHED
14965091faa4SMike Galbraith	select FAIR_GROUP_SCHED
14975091faa4SMike Galbraith	help
14985091faa4SMike Galbraith	  This option optimizes the scheduler for common desktop workloads by
14995091faa4SMike Galbraith	  automatically creating and populating task groups.  This separation
15005091faa4SMike Galbraith	  of workloads isolates aggressive CPU burners (like build jobs) from
15015091faa4SMike Galbraith	  desktop applications.  Task group autogeneration is currently based
15025091faa4SMike Galbraith	  upon task session.
15035091faa4SMike Galbraith
15047af37becSDaniel Lezcanoconfig RELAY
15057af37becSDaniel Lezcano	bool "Kernel->user space relay support (formerly relayfs)"
150626b5679eSPeter Zijlstra	select IRQ_WORK
15077af37becSDaniel Lezcano	help
15087af37becSDaniel Lezcano	  This option enables support for relay interface support in
15097af37becSDaniel Lezcano	  certain file systems (such as debugfs).
15107af37becSDaniel Lezcano	  It is designed to provide an efficient mechanism for tools and
15117af37becSDaniel Lezcano	  facilities to relay large amounts of data from kernel space to
15127af37becSDaniel Lezcano	  user space.
15137af37becSDaniel Lezcano
15147af37becSDaniel Lezcano	  If unsure, say N.
15157af37becSDaniel Lezcano
1516f991633dSDimitri Gorokhovikconfig BLK_DEV_INITRD
1517f991633dSDimitri Gorokhovik	bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support"
1518f991633dSDimitri Gorokhovik	help
1519f991633dSDimitri Gorokhovik	  The initial RAM filesystem is a ramfs which is loaded by the
1520f991633dSDimitri Gorokhovik	  boot loader (loadlin or lilo) and that is mounted as root
1521f991633dSDimitri Gorokhovik	  before the normal boot procedure. It is typically used to
1522f991633dSDimitri Gorokhovik	  load modules needed to mount the "real" root file system,
15238c27ceffSMauro Carvalho Chehab	  etc. See <file:Documentation/admin-guide/initrd.rst> for details.
1524f991633dSDimitri Gorokhovik
1525f991633dSDimitri Gorokhovik	  If RAM disk support (BLK_DEV_RAM) is also included, this
1526f991633dSDimitri Gorokhovik	  also enables initial RAM disk (initrd) support and adds
1527f991633dSDimitri Gorokhovik	  15 Kbytes (more on some other architectures) to the kernel size.
1528f991633dSDimitri Gorokhovik
1529f991633dSDimitri Gorokhovik	  If unsure say Y.
1530f991633dSDimitri Gorokhovik
1531c33df4eaSJean-Paul Samanif BLK_DEV_INITRD
1532c33df4eaSJean-Paul Saman
1533dbec4866SSam Ravnborgsource "usr/Kconfig"
1534dbec4866SSam Ravnborg
1535c33df4eaSJean-Paul Samanendif
1536c33df4eaSJean-Paul Saman
153776db5a27SMasami Hiramatsuconfig BOOT_CONFIG
153876db5a27SMasami Hiramatsu	bool "Boot config support"
1539a2a9d67aSMasami Hiramatsu	select BLK_DEV_INITRD if !BOOT_CONFIG_EMBED
154076db5a27SMasami Hiramatsu	help
154176db5a27SMasami Hiramatsu	  Extra boot config allows system admin to pass a config file as
154276db5a27SMasami Hiramatsu	  complemental extension of kernel cmdline when booting.
15430947db01SMasami Hiramatsu	  The boot config file must be attached at the end of initramfs
154485c46b78SMasami Hiramatsu	  with checksum, size and magic word.
15450947db01SMasami Hiramatsu	  See <file:Documentation/admin-guide/bootconfig.rst> for details.
154676db5a27SMasami Hiramatsu
154776db5a27SMasami Hiramatsu	  If unsure, say Y.
154876db5a27SMasami Hiramatsu
1549b743852cSPaul E. McKenneyconfig BOOT_CONFIG_FORCE
1550b743852cSPaul E. McKenney	bool "Force unconditional bootconfig processing"
1551b743852cSPaul E. McKenney	depends on BOOT_CONFIG
15526ded8a28SPaul E. McKenney	default y if BOOT_CONFIG_EMBED
1553b743852cSPaul E. McKenney	help
1554b743852cSPaul E. McKenney	  With this Kconfig option set, BOOT_CONFIG processing is carried
1555b743852cSPaul E. McKenney	  out even when the "bootconfig" kernel-boot parameter is omitted.
1556b743852cSPaul E. McKenney	  In fact, with this Kconfig option set, there is no way to
1557b743852cSPaul E. McKenney	  make the kernel ignore the BOOT_CONFIG-supplied kernel-boot
1558b743852cSPaul E. McKenney	  parameters.
1559b743852cSPaul E. McKenney
1560b743852cSPaul E. McKenney	  If unsure, say N.
1561b743852cSPaul E. McKenney
1562a2a9d67aSMasami Hiramatsuconfig BOOT_CONFIG_EMBED
1563a2a9d67aSMasami Hiramatsu	bool "Embed bootconfig file in the kernel"
1564a2a9d67aSMasami Hiramatsu	depends on BOOT_CONFIG
1565a2a9d67aSMasami Hiramatsu	help
1566a2a9d67aSMasami Hiramatsu	  Embed a bootconfig file given by BOOT_CONFIG_EMBED_FILE in the
1567a2a9d67aSMasami Hiramatsu	  kernel. Usually, the bootconfig file is loaded with the initrd
1568a2a9d67aSMasami Hiramatsu	  image. But if the system doesn't support initrd, this option will
1569a2a9d67aSMasami Hiramatsu	  help you by embedding a bootconfig file while building the kernel.
1570a2a9d67aSMasami Hiramatsu
1571a2a9d67aSMasami Hiramatsu	  If unsure, say N.
1572a2a9d67aSMasami Hiramatsu
1573a2a9d67aSMasami Hiramatsuconfig BOOT_CONFIG_EMBED_FILE
1574a2a9d67aSMasami Hiramatsu	string "Embedded bootconfig file path"
1575a2a9d67aSMasami Hiramatsu	depends on BOOT_CONFIG_EMBED
1576a2a9d67aSMasami Hiramatsu	help
1577a2a9d67aSMasami Hiramatsu	  Specify a bootconfig file which will be embedded to the kernel.
1578a2a9d67aSMasami Hiramatsu	  This bootconfig will be used if there is no initrd or no other
1579a2a9d67aSMasami Hiramatsu	  bootconfig in the initrd.
1580a2a9d67aSMasami Hiramatsu
1581*fc9d9047SBreno Leitaoconfig ARCH_SUPPORTS_CMDLINE_FROM_BOOTCONFIG
1582*fc9d9047SBreno Leitao	bool
1583*fc9d9047SBreno Leitao	help
1584*fc9d9047SBreno Leitao	  Silent symbol; no C code reads it directly. Architectures
1585*fc9d9047SBreno Leitao	  select it once their setup_arch() calls
1586*fc9d9047SBreno Leitao	  xbc_prepend_embedded_cmdline() before parse_early_param().
1587*fc9d9047SBreno Leitao	  Its only role is to gate the user-visible
1588*fc9d9047SBreno Leitao	  CMDLINE_FROM_BOOTCONFIG option per-arch, the same
1589*fc9d9047SBreno Leitao	  ARCH_SUPPORTS_* idiom used by ARCH_SUPPORTS_CFI, etc.
1590*fc9d9047SBreno Leitao
1591*fc9d9047SBreno Leitaoconfig CMDLINE_FROM_BOOTCONFIG
1592*fc9d9047SBreno Leitao	bool "Render embedded bootconfig as kernel cmdline at build time"
1593*fc9d9047SBreno Leitao	depends on BOOT_CONFIG_EMBED_FILE != ""
1594*fc9d9047SBreno Leitao	depends on ARCH_SUPPORTS_CMDLINE_FROM_BOOTCONFIG
1595*fc9d9047SBreno Leitao	depends on CMDLINE = ""
1596*fc9d9047SBreno Leitao	default n
1597*fc9d9047SBreno Leitao	help
1598*fc9d9047SBreno Leitao	  Render the "kernel" subtree of the embedded bootconfig file into a
1599*fc9d9047SBreno Leitao	  flat cmdline string at kernel build time and prepend it to
1600*fc9d9047SBreno Leitao	  boot_command_line during early architecture setup. This makes
1601*fc9d9047SBreno Leitao	  early_param() handlers (e.g. mem=, earlycon=, loglevel=) see the
1602*fc9d9047SBreno Leitao	  values supplied via the embedded bootconfig.
1603*fc9d9047SBreno Leitao
1604*fc9d9047SBreno Leitao	  The runtime bootconfig parser is unaffected, so tree-structured
1605*fc9d9047SBreno Leitao	  consumers such as ftrace boot-time tracing keep working.
1606*fc9d9047SBreno Leitao
1607*fc9d9047SBreno Leitao	  Note: when an initrd also carries a bootconfig, its "kernel"
1608*fc9d9047SBreno Leitao	  subtree is still parsed at runtime, but the embedded "kernel"
1609*fc9d9047SBreno Leitao	  keys remain in boot_command_line for parse_early_param() and
1610*fc9d9047SBreno Leitao	  end up later than the initrd keys in saved_command_line, so
1611*fc9d9047SBreno Leitao	  parse_args() last-wins favors the embedded values. If you need
1612*fc9d9047SBreno Leitao	  initrd to override embedded kernel.* keys, leave this option
1613*fc9d9047SBreno Leitao	  off.
1614*fc9d9047SBreno Leitao
1615*fc9d9047SBreno Leitao	  If unsure, say N.
1616*fc9d9047SBreno Leitao
1617032a7302SDouglas Andersonconfig CMDLINE_LOG_WRAP_IDEAL_LEN
1618032a7302SDouglas Anderson	int "Length to try to wrap the cmdline when logged at boot"
1619032a7302SDouglas Anderson	default 1021
1620032a7302SDouglas Anderson	range 0 1021
1621032a7302SDouglas Anderson	help
1622032a7302SDouglas Anderson	  At boot time, the kernel command line is logged to the console.
1623032a7302SDouglas Anderson	  The log message will start with the prefix "Kernel command line: ".
1624032a7302SDouglas Anderson	  The log message will attempt to be wrapped (split into multiple log
1625032a7302SDouglas Anderson	  messages) at spaces based on CMDLINE_LOG_WRAP_IDEAL_LEN characters.
1626032a7302SDouglas Anderson	  If wrapping happens, each log message will start with the prefix and
1627032a7302SDouglas Anderson	  all but the last message will end with " \". Messages may exceed the
1628032a7302SDouglas Anderson	  ideal length if a place to wrap isn't found before the specified
1629032a7302SDouglas Anderson	  number of characters.
1630032a7302SDouglas Anderson
1631032a7302SDouglas Anderson	  A value of 0 disables wrapping, though be warned that the maximum
1632032a7302SDouglas Anderson	  length of a log message (1021 characters) may cause the cmdline to
1633032a7302SDouglas Anderson	  be truncated.
1634032a7302SDouglas Anderson
16351274aea1SDavid Disseldorpconfig INITRAMFS_PRESERVE_MTIME
16361274aea1SDavid Disseldorp	bool "Preserve cpio archive mtimes in initramfs"
163774792608SGeert Uytterhoeven	depends on BLK_DEV_INITRD
16381274aea1SDavid Disseldorp	default y
16391274aea1SDavid Disseldorp	help
16401274aea1SDavid Disseldorp	  Each entry in an initramfs cpio archive carries an mtime value. When
16411274aea1SDavid Disseldorp	  enabled, extracted cpio items take this mtime, with directory mtime
16421274aea1SDavid Disseldorp	  setting deferred until after creation of any child entries.
16431274aea1SDavid Disseldorp
16441274aea1SDavid Disseldorp	  If unsure, say Y.
16451274aea1SDavid Disseldorp
164683c0b272SDavid Disseldorpconfig INITRAMFS_TEST
164783c0b272SDavid Disseldorp	bool "Test initramfs cpio archive extraction" if !KUNIT_ALL_TESTS
164883c0b272SDavid Disseldorp	depends on BLK_DEV_INITRD && KUNIT=y
164983c0b272SDavid Disseldorp	default KUNIT_ALL_TESTS
165083c0b272SDavid Disseldorp	help
165183c0b272SDavid Disseldorp	  Build KUnit tests for initramfs. See Documentation/dev-tools/kunit
165283c0b272SDavid Disseldorp
1653877417e6SArnd Bergmannchoice
1654877417e6SArnd Bergmann	prompt "Compiler optimization level"
16552cc3ce24SUlf Magnusson	default CC_OPTIMIZE_FOR_PERFORMANCE
1656877417e6SArnd Bergmann
1657877417e6SArnd Bergmannconfig CC_OPTIMIZE_FOR_PERFORMANCE
165815f5db60SMasahiro Yamada	bool "Optimize for performance (-O2)"
1659877417e6SArnd Bergmann	help
1660877417e6SArnd Bergmann	  This is the default optimization level for the kernel, building
1661877417e6SArnd Bergmann	  with the "-O2" compiler flag for best performance and most
1662877417e6SArnd Bergmann	  helpful compile-time warnings.
1663877417e6SArnd Bergmann
1664c45b4f1fSLinus Torvaldsconfig CC_OPTIMIZE_FOR_SIZE
166515f5db60SMasahiro Yamada	bool "Optimize for size (-Os)"
1666c45b4f1fSLinus Torvalds	help
1667ce3b487fSMasahiro Yamada	  Choosing this option will pass "-Os" to your compiler resulting
1668ce3b487fSMasahiro Yamada	  in a smaller kernel.
1669c45b4f1fSLinus Torvalds
1670877417e6SArnd Bergmannendchoice
1671877417e6SArnd Bergmann
16725d20ee31SNicholas Pigginconfig HAVE_LD_DEAD_CODE_DATA_ELIMINATION
16735d20ee31SNicholas Piggin	bool
16745d20ee31SNicholas Piggin	help
16755d20ee31SNicholas Piggin	  This requires that the arch annotates or otherwise protects
16765d20ee31SNicholas Piggin	  its external entry points from being discarded. Linker scripts
16775d20ee31SNicholas Piggin	  must also merge .text.*, .data.*, and .bss.* correctly into
16785d20ee31SNicholas Piggin	  output sections. Care must be taken not to pull in unrelated
16795d20ee31SNicholas Piggin	  sections (e.g., '.text.init'). Typically '.' in section names
16805d20ee31SNicholas Piggin	  is used to distinguish them from label names / C identifiers.
16815d20ee31SNicholas Piggin
16825d20ee31SNicholas Pigginconfig LD_DEAD_CODE_DATA_ELIMINATION
16835d20ee31SNicholas Piggin	bool "Dead code and data elimination (EXPERIMENTAL)"
16845d20ee31SNicholas Piggin	depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION
16855d20ee31SNicholas Piggin	depends on EXPERT
1686e85d1d65SMasahiro Yamada	depends on $(cc-option,-ffunction-sections -fdata-sections)
1687e85d1d65SMasahiro Yamada	depends on $(ld-option,--gc-sections)
16885d20ee31SNicholas Piggin	help
16898b9d2712SMasahiro Yamada	  Enable this if you want to do dead code and data elimination with
16908b9d2712SMasahiro Yamada	  the linker by compiling with -ffunction-sections -fdata-sections,
16918b9d2712SMasahiro Yamada	  and linking with --gc-sections.
16925d20ee31SNicholas Piggin
16935d20ee31SNicholas Piggin	  This can reduce on disk and in-memory size of the kernel
16945d20ee31SNicholas Piggin	  code and static data, particularly for small configs and
16955d20ee31SNicholas Piggin	  on small systems. This has the possibility of introducing
16965d20ee31SNicholas Piggin	  silently broken kernel if the required annotations are not
16975d20ee31SNicholas Piggin	  present. This option is not well tested yet, so use at your
16985d20ee31SNicholas Piggin	  own risk.
16995d20ee31SNicholas Piggin
170059612b24SNathan Chancellorconfig LD_ORPHAN_WARN
170159612b24SNathan Chancellor	def_bool y
170259612b24SNathan Chancellor	depends on ARCH_WANT_LD_ORPHAN_WARN
170359612b24SNathan Chancellor	depends on $(ld-option,--orphan-handling=warn)
1704e1789d7cSXin Li	depends on $(ld-option,--orphan-handling=error)
1705e1789d7cSXin Li
1706e1789d7cSXin Liconfig LD_ORPHAN_WARN_LEVEL
1707e1789d7cSXin Li	string
1708e1789d7cSXin Li	depends on LD_ORPHAN_WARN
1709e1789d7cSXin Li	default "error" if WERROR
1710e1789d7cSXin Li	default "warn"
171159612b24SNathan Chancellor
1712657a5209SMike Frysingerconfig HAVE_UID16
1713657a5209SMike Frysinger	bool
1714657a5209SMike Frysinger
1715657a5209SMike Frysingerconfig SYSCTL_EXCEPTION_TRACE
1716657a5209SMike Frysinger	bool
1717657a5209SMike Frysinger	help
1718657a5209SMike Frysinger	  Enable support for /proc/sys/debug/exception-trace.
1719657a5209SMike Frysinger
1720657a5209SMike Frysingerconfig SYSCTL_ARCH_UNALIGN_NO_WARN
1721657a5209SMike Frysinger	bool
1722657a5209SMike Frysinger	help
1723657a5209SMike Frysinger	  Enable support for /proc/sys/kernel/ignore-unaligned-usertrap
1724657a5209SMike Frysinger	  Allows arch to define/use @no_unaligned_warning to possibly warn
1725657a5209SMike Frysinger	  about unaligned access emulation going on under the hood.
1726657a5209SMike Frysinger
1727657a5209SMike Frysingerconfig SYSCTL_ARCH_UNALIGN_ALLOW
1728657a5209SMike Frysinger	bool
1729657a5209SMike Frysinger	help
1730657a5209SMike Frysinger	  Enable support for /proc/sys/kernel/unaligned-trap
1731657a5209SMike Frysinger	  Allows arches to define/use @unaligned_enabled to runtime toggle
1732657a5209SMike Frysinger	  the unaligned access emulation.
1733657a5209SMike Frysinger	  see arch/parisc/kernel/unaligned.c for reference
1734657a5209SMike Frysinger
1735c443279aSChristian Braunerconfig SYSFS_SYSCALL
1736c443279aSChristian Brauner	bool "Sysfs syscall support"
1737c443279aSChristian Brauner	default n
1738c443279aSChristian Brauner	help
1739c443279aSChristian Brauner	  sys_sysfs is an obsolete system call no longer supported in libc.
1740c443279aSChristian Brauner	  Note that disabling this option is more secure but might break
1741c443279aSChristian Brauner	  compatibility with some systems.
1742c443279aSChristian Brauner
1743c443279aSChristian Brauner	  If unsure say N here.
1744c443279aSChristian Brauner
1745657a5209SMike Frysingerconfig HAVE_PCSPKR_PLATFORM
1746657a5209SMike Frysinger	bool
1747657a5209SMike Frysinger
17486a108a14SDavid Rientjesmenuconfig EXPERT
17496a108a14SDavid Rientjes	bool "Configure standard kernel features (expert users)"
1750f505c553SJosh Triplett	# Unhide debug options, to make the on-by-default options visible
1751f505c553SJosh Triplett	select DEBUG_KERNEL
17521da177e4SLinus Torvalds	help
17531da177e4SLinus Torvalds	  This option allows certain base kernel options and settings
17541da177e4SLinus Torvalds	  to be disabled or tweaked. This is for specialized
17551da177e4SLinus Torvalds	  environments which can tolerate a "non-standard" kernel.
17561da177e4SLinus Torvalds	  Only use this if you really know what you are doing.
17571da177e4SLinus Torvalds
1758ae81f9e3SChuck Ebbertconfig UID16
17596a108a14SDavid Rientjes	bool "Enable 16-bit UID system calls" if EXPERT
17602813893fSIulia Manda	depends on HAVE_UID16 && MULTIUSER
1761ae81f9e3SChuck Ebbert	default y
1762ae81f9e3SChuck Ebbert	help
1763ae81f9e3SChuck Ebbert	  This enables the legacy 16-bit UID syscall wrappers.
1764ae81f9e3SChuck Ebbert
17652813893fSIulia Mandaconfig MULTIUSER
17662813893fSIulia Manda	bool "Multiple users, groups and capabilities support" if EXPERT
17672813893fSIulia Manda	default y
17682813893fSIulia Manda	help
17692813893fSIulia Manda	  This option enables support for non-root users, groups and
17702813893fSIulia Manda	  capabilities.
17712813893fSIulia Manda
17722813893fSIulia Manda	  If you say N here, all processes will run with UID 0, GID 0, and all
17732813893fSIulia Manda	  possible capabilities.  Saying N here also compiles out support for
17742813893fSIulia Manda	  system calls related to UIDs, GIDs, and capabilities, such as setuid,
17752813893fSIulia Manda	  setgid, and capset.
17762813893fSIulia Manda
17772813893fSIulia Manda	  If unsure, say Y here.
17782813893fSIulia Manda
1779f6187769SFabian Frederickconfig SGETMASK_SYSCALL
1780f6187769SFabian Frederick	bool "sgetmask/ssetmask syscalls support" if EXPERT
1781cd14b018SMasahiro Yamada	default PARISC || M68K || PPC || MIPS || X86 || SPARC || MICROBLAZE || SUPERH
1782a7f7f624SMasahiro Yamada	help
1783f6187769SFabian Frederick	  sys_sgetmask and sys_ssetmask are obsolete system calls
1784f6187769SFabian Frederick	  no longer supported in libc but still enabled by default in some
1785f6187769SFabian Frederick	  architectures.
1786f6187769SFabian Frederick
1787f6187769SFabian Frederick	  If unsure, leave the default option here.
1788f6187769SFabian Frederick
1789d1b069f5SRandy Dunlapconfig FHANDLE
1790d1b069f5SRandy Dunlap	bool "open by fhandle syscalls" if EXPERT
1791d1b069f5SRandy Dunlap	select EXPORTFS
1792d1b069f5SRandy Dunlap	default y
1793d1b069f5SRandy Dunlap	help
1794d1b069f5SRandy Dunlap	  If you say Y here, a user level program will be able to map
1795d1b069f5SRandy Dunlap	  file names to handle and then later use the handle for
1796d1b069f5SRandy Dunlap	  different file system operations. This is useful in implementing
1797d1b069f5SRandy Dunlap	  userspace file servers, which now track files using handles instead
1798d1b069f5SRandy Dunlap	  of names. The handle would remain the same even if file names
1799d1b069f5SRandy Dunlap	  get renamed. Enables open_by_handle_at(2) and name_to_handle_at(2)
1800d1b069f5SRandy Dunlap	  syscalls.
1801d1b069f5SRandy Dunlap
1802baa73d9eSNicolas Pitreconfig POSIX_TIMERS
1803baa73d9eSNicolas Pitre	bool "Posix Clocks & timers" if EXPERT
1804baa73d9eSNicolas Pitre	default y
1805baa73d9eSNicolas Pitre	help
1806baa73d9eSNicolas Pitre	  This includes native support for POSIX timers to the kernel.
1807baa73d9eSNicolas Pitre	  Some embedded systems have no use for them and therefore they
1808baa73d9eSNicolas Pitre	  can be configured out to reduce the size of the kernel image.
1809baa73d9eSNicolas Pitre
1810baa73d9eSNicolas Pitre	  When this option is disabled, the following syscalls won't be
1811baa73d9eSNicolas Pitre	  available: timer_create, timer_gettime: timer_getoverrun,
1812baa73d9eSNicolas Pitre	  timer_settime, timer_delete, clock_adjtime, getitimer,
1813baa73d9eSNicolas Pitre	  setitimer, alarm. Furthermore, the clock_settime, clock_gettime,
1814baa73d9eSNicolas Pitre	  clock_getres and clock_nanosleep syscalls will be limited to
1815baa73d9eSNicolas Pitre	  CLOCK_REALTIME, CLOCK_MONOTONIC and CLOCK_BOOTTIME only.
1816baa73d9eSNicolas Pitre
1817baa73d9eSNicolas Pitre	  If unsure say y.
1818baa73d9eSNicolas Pitre
1819d59745ceSMatt Mackallconfig PRINTK
1820d59745ceSMatt Mackall	default y
18216a108a14SDavid Rientjes	bool "Enable support for printk" if EXPERT
182274876a98SFrederic Weisbecker	select IRQ_WORK
1823d59745ceSMatt Mackall	help
1824d59745ceSMatt Mackall	  This option enables normal printk support. Removing it
1825d59745ceSMatt Mackall	  eliminates most of the message strings from the kernel image
1826d59745ceSMatt Mackall	  and makes the kernel more or less silent. As this makes it
1827d59745ceSMatt Mackall	  very difficult to diagnose system problems, saying N here is
1828d59745ceSMatt Mackall	  strongly discouraged.
1829d59745ceSMatt Mackall
18305ea2bcdfSThomas Weißschuhconfig PRINTK_RINGBUFFER_KUNIT_TEST
18315ea2bcdfSThomas Weißschuh	tristate "KUnit Test for the printk ringbuffer" if !KUNIT_ALL_TESTS
18325ea2bcdfSThomas Weißschuh	depends on PRINTK && KUNIT
18335ea2bcdfSThomas Weißschuh	default KUNIT_ALL_TESTS
18345ea2bcdfSThomas Weißschuh	help
18355ea2bcdfSThomas Weißschuh	  This builds the printk ringbuffer KUnit test suite.
18365ea2bcdfSThomas Weißschuh
18375ea2bcdfSThomas Weißschuh	  For more information on KUnit and unit tests in general, please refer
18385ea2bcdfSThomas Weißschuh	  to the KUnit documentation.
18395ea2bcdfSThomas Weißschuh
18405ea2bcdfSThomas Weißschuh	  If unsure, say N.
18415ea2bcdfSThomas Weißschuh
1842c8538a7aSMatt Mackallconfig BUG
18436a108a14SDavid Rientjes	bool "BUG() support" if EXPERT
1844c8538a7aSMatt Mackall	default y
1845c8538a7aSMatt Mackall	help
1846c8538a7aSMatt Mackall	  Disabling this option eliminates support for BUG and WARN, reducing
1847c8538a7aSMatt Mackall	  the size of your kernel image and potentially quietly ignoring
1848c8538a7aSMatt Mackall	  numerous fatal conditions. You should only consider disabling this
1849c8538a7aSMatt Mackall	  option for embedded systems with no facilities for reporting errors.
1850c8538a7aSMatt Mackall	  Just say Y.
1851c8538a7aSMatt Mackall
1852708e9a79SMatt Mackallconfig ELF_CORE
1853046d662fSAlex Kelly	depends on COREDUMP
1854708e9a79SMatt Mackall	default y
18556a108a14SDavid Rientjes	bool "Enable ELF core dumps" if EXPERT
1856708e9a79SMatt Mackall	help
1857708e9a79SMatt Mackall	  Enable support for generating core dumps. Disabling saves about 4k.
1858708e9a79SMatt Mackall
18598761f1abSRalf Baechle
1860e5e1d3cbSStas Sergeevconfig PCSPKR_PLATFORM
18616a108a14SDavid Rientjes	bool "Enable PC-Speaker support" if EXPERT
18628761f1abSRalf Baechle	depends on HAVE_PCSPKR_PLATFORM
186315f304b6SRalf Baechle	select I8253_LOCK
1864e5e1d3cbSStas Sergeev	default y
1865e5e1d3cbSStas Sergeev	help
1866e5e1d3cbSStas Sergeev	  This option allows to disable the internal PC-Speaker
1867e5e1d3cbSStas Sergeev	  support, saving some memory.
1868e5e1d3cbSStas Sergeev
186927021649SYoann Congalconfig BASE_SMALL
187027021649SYoann Congal	bool "Enable smaller-sized data structures for core" if EXPERT
18711da177e4SLinus Torvalds	help
187227021649SYoann Congal	  Enabling this option reduces the size of miscellaneous core
18731da177e4SLinus Torvalds	  kernel data structures. This saves memory on small machines,
18741da177e4SLinus Torvalds	  but may reduce performance.
18751da177e4SLinus Torvalds
18761da177e4SLinus Torvaldsconfig FUTEX
18776a108a14SDavid Rientjes	bool "Enable futex support" if EXPERT
18783f2bedabSArnd Bergmann	depends on !(SPARC32 && SMP)
18791da177e4SLinus Torvalds	default y
1880bc2eecd7SNicolas Pitre	imply RT_MUTEXES
18811da177e4SLinus Torvalds	help
18821da177e4SLinus Torvalds	  Disabling this option will cause the kernel to be built without
18831da177e4SLinus Torvalds	  support for "fast userspace mutexes".  The resulting kernel may not
18841da177e4SLinus Torvalds	  run glibc-based applications correctly.
18851da177e4SLinus Torvalds
1886bc2eecd7SNicolas Pitreconfig FUTEX_PI
1887bc2eecd7SNicolas Pitre	bool
1888bc2eecd7SNicolas Pitre	depends on FUTEX && RT_MUTEXES
1889bc2eecd7SNicolas Pitre	default y
1890bc2eecd7SNicolas Pitre
189180367ad0SSebastian Andrzej Siewiorconfig FUTEX_PRIVATE_HASH
189280367ad0SSebastian Andrzej Siewior	bool
189380367ad0SSebastian Andrzej Siewior	depends on FUTEX && !BASE_SMALL && MMU
189480367ad0SSebastian Andrzej Siewior	default y
189580367ad0SSebastian Andrzej Siewior
1896c042c505SPeter Zijlstraconfig FUTEX_MPOL
1897c042c505SPeter Zijlstra	bool
1898c042c505SPeter Zijlstra	depends on FUTEX && NUMA
1899c042c505SPeter Zijlstra	default y
1900c042c505SPeter Zijlstra
1901042df0c1SThomas Gleixnerconfig HAVE_FUTEX_ROBUST_UNLOCK
1902042df0c1SThomas Gleixner	bool
1903042df0c1SThomas Gleixner
1904042df0c1SThomas Gleixnerconfig FUTEX_ROBUST_UNLOCK
19052558084dSThomas Weißschuh	def_bool FUTEX && GENERIC_IRQ_ENTRY && RSEQ && HAVE_FUTEX_ROBUST_UNLOCK
1906042df0c1SThomas Gleixner
19071da177e4SLinus Torvaldsconfig EPOLL
19086a108a14SDavid Rientjes	bool "Enable eventpoll support" if EXPERT
19091da177e4SLinus Torvalds	default y
19101da177e4SLinus Torvalds	help
19111da177e4SLinus Torvalds	  Disabling this option will cause the kernel to be built without
19121da177e4SLinus Torvalds	  support for epoll family of system calls.
19131da177e4SLinus Torvalds
1914fba2afaaSDavide Libenziconfig SIGNALFD
19156a108a14SDavid Rientjes	bool "Enable signalfd() system call" if EXPERT
1916fba2afaaSDavide Libenzi	default y
1917fba2afaaSDavide Libenzi	help
1918fba2afaaSDavide Libenzi	  Enable the signalfd() system call that allows to receive signals
1919fba2afaaSDavide Libenzi	  on a file descriptor.
1920fba2afaaSDavide Libenzi
1921fba2afaaSDavide Libenzi	  If unsure, say Y.
1922fba2afaaSDavide Libenzi
1923b215e283SDavide Libenziconfig TIMERFD
19246a108a14SDavid Rientjes	bool "Enable timerfd() system call" if EXPERT
1925b215e283SDavide Libenzi	default y
1926b215e283SDavide Libenzi	help
1927b215e283SDavide Libenzi	  Enable the timerfd() system call that allows to receive timer
1928b215e283SDavide Libenzi	  events on a file descriptor.
1929b215e283SDavide Libenzi
1930b215e283SDavide Libenzi	  If unsure, say Y.
1931b215e283SDavide Libenzi
1932e1ad7468SDavide Libenziconfig EVENTFD
19336a108a14SDavid Rientjes	bool "Enable eventfd() system call" if EXPERT
1934e1ad7468SDavide Libenzi	default y
1935e1ad7468SDavide Libenzi	help
1936e1ad7468SDavide Libenzi	  Enable the eventfd() system call that allows to receive both
1937e1ad7468SDavide Libenzi	  kernel notification (ie. KAIO) or userspace notifications.
1938e1ad7468SDavide Libenzi
1939e1ad7468SDavide Libenzi	  If unsure, say Y.
1940e1ad7468SDavide Libenzi
19411da177e4SLinus Torvaldsconfig SHMEM
19426a108a14SDavid Rientjes	bool "Use full shmem filesystem" if EXPERT
19431da177e4SLinus Torvalds	default y
19441da177e4SLinus Torvalds	depends on MMU
19451da177e4SLinus Torvalds	help
19461da177e4SLinus Torvalds	  The shmem is an internal filesystem used to manage shared memory.
19471da177e4SLinus Torvalds	  It is backed by swap and manages resource limits. It is also exported
19481da177e4SLinus Torvalds	  to userspace as tmpfs if TMPFS is enabled. Disabling this
19491da177e4SLinus Torvalds	  option replaces shmem and tmpfs with the much simpler ramfs code,
19501da177e4SLinus Torvalds	  which may be appropriate on small systems without swap.
19511da177e4SLinus Torvalds
1952ebf3f09cSThomas Petazzoniconfig AIO
19536a108a14SDavid Rientjes	bool "Enable AIO support" if EXPERT
1954ebf3f09cSThomas Petazzoni	default y
1955ebf3f09cSThomas Petazzoni	help
1956ebf3f09cSThomas Petazzoni	  This option enables POSIX asynchronous I/O which may by used
1957ebf3f09cSThomas Petazzoni	  by some high performance threaded applications. Disabling
1958ebf3f09cSThomas Petazzoni	  this option saves about 7k.
1959ebf3f09cSThomas Petazzoni
19602b188cc1SJens Axboeconfig IO_URING
19612b188cc1SJens Axboe	bool "Enable IO uring support" if EXPERT
1962561fb04aSJens Axboe	select IO_WQ
19632b188cc1SJens Axboe	default y
19642b188cc1SJens Axboe	help
19652b188cc1SJens Axboe	  This option enables support for the io_uring interface, enabling
19662b188cc1SJens Axboe	  applications to submit and complete IO through submission and
19672b188cc1SJens Axboe	  completion rings that are shared between the kernel and application.
19682b188cc1SJens Axboe
19691802656eSJens Axboeconfig GCOV_PROFILE_URING
19701802656eSJens Axboe	bool "Enable GCOV profiling on the io_uring subsystem"
1971d1fbe1ebSRandy Dunlap	depends on IO_URING && GCOV_KERNEL
19721802656eSJens Axboe	help
19731802656eSJens Axboe	  Enable GCOV profiling on the io_uring subsystem, to facilitate
19741802656eSJens Axboe	  code coverage testing.
19751802656eSJens Axboe
19761802656eSJens Axboe	  If unsure, say N.
19771802656eSJens Axboe
19781802656eSJens Axboe	  Note that this will have a negative impact on the performance of
19791802656eSJens Axboe	  the io_uring subsystem, hence this should only be enabled for
19801802656eSJens Axboe	  specific test purposes.
19811802656eSJens Axboe
19823a0ae385SPavel Begunkovconfig IO_URING_MOCK_FILE
19833a0ae385SPavel Begunkov	tristate "Enable io_uring mock files (Experimental)" if EXPERT
19843a0ae385SPavel Begunkov	default n
19853a0ae385SPavel Begunkov	depends on IO_URING
19863a0ae385SPavel Begunkov	help
19879e7dc228SJ. Neuschäfer	  Enable mock files for io_uring subsystem testing. The ABI might
19883a0ae385SPavel Begunkov	  still change, so it's still experimental and should only be enabled
19893a0ae385SPavel Begunkov	  for specific test purposes.
19903a0ae385SPavel Begunkov
19913a0ae385SPavel Begunkov	  If unsure, say N.
19923a0ae385SPavel Begunkov
1993d3ac21caSJosh Triplettconfig ADVISE_SYSCALLS
1994d3ac21caSJosh Triplett	bool "Enable madvise/fadvise syscalls" if EXPERT
1995d3ac21caSJosh Triplett	default y
1996d3ac21caSJosh Triplett	help
1997d3ac21caSJosh Triplett	  This option enables the madvise and fadvise syscalls, used by
1998d3ac21caSJosh Triplett	  applications to advise the kernel about their future memory or file
1999d3ac21caSJosh Triplett	  usage, improving performance. If building an embedded system where no
2000d3ac21caSJosh Triplett	  applications use these syscalls, you can disable this option to save
2001d3ac21caSJosh Triplett	  space.
2002d3ac21caSJosh Triplett
20035b25b13aSMathieu Desnoyersconfig MEMBARRIER
20045b25b13aSMathieu Desnoyers	bool "Enable membarrier() system call" if EXPERT
20055b25b13aSMathieu Desnoyers	default y
20065b25b13aSMathieu Desnoyers	help
20075b25b13aSMathieu Desnoyers	  Enable the membarrier() system call that allows issuing memory
20085b25b13aSMathieu Desnoyers	  barriers across all running threads, which can be used to distribute
20095b25b13aSMathieu Desnoyers	  the cost of user-space memory barriers asymmetrically by transforming
20105b25b13aSMathieu Desnoyers	  pairs of memory barriers into pairs consisting of membarrier() and a
20115b25b13aSMathieu Desnoyers	  compiler barrier.
20125b25b13aSMathieu Desnoyers
20135b25b13aSMathieu Desnoyers	  If unsure, say Y.
20145b25b13aSMathieu Desnoyers
2015a751ea34SRandy Dunlapconfig KCMP
2016a751ea34SRandy Dunlap	bool "Enable kcmp() system call" if EXPERT
2017a751ea34SRandy Dunlap	help
2018a751ea34SRandy Dunlap	  Enable the kernel resource comparison system call. It provides
2019a751ea34SRandy Dunlap	  user-space with the ability to compare two processes to see if they
2020a751ea34SRandy Dunlap	  share a common resource, such as a file descriptor or even virtual
2021a751ea34SRandy Dunlap	  memory space.
2022a751ea34SRandy Dunlap
2023a751ea34SRandy Dunlap	  If unsure, say N.
2024a751ea34SRandy Dunlap
2025a751ea34SRandy Dunlapconfig RSEQ
2026a751ea34SRandy Dunlap	bool "Enable rseq() system call" if EXPERT
2027a751ea34SRandy Dunlap	default y
2028a751ea34SRandy Dunlap	depends on HAVE_RSEQ
2029a751ea34SRandy Dunlap	select MEMBARRIER
2030a751ea34SRandy Dunlap	help
2031a751ea34SRandy Dunlap	  Enable the restartable sequences system call. It provides a
2032a751ea34SRandy Dunlap	  user-space cache for the current CPU number value, which
2033a751ea34SRandy Dunlap	  speeds up getting the current CPU number from user-space,
2034a751ea34SRandy Dunlap	  as well as an ABI to speed up user-space operations on
2035a751ea34SRandy Dunlap	  per-CPU data.
2036a751ea34SRandy Dunlap
2037a751ea34SRandy Dunlap	  If unsure, say Y.
2038a751ea34SRandy Dunlap
2039d7a5da7aSThomas Gleixnerconfig RSEQ_SLICE_EXTENSION
2040d7a5da7aSThomas Gleixner	bool "Enable rseq-based time slice extension mechanism"
2041d7a5da7aSThomas Gleixner	depends on RSEQ && HIGH_RES_TIMERS && GENERIC_ENTRY && HAVE_GENERIC_TIF_BITS
2042d7a5da7aSThomas Gleixner	help
2043d7a5da7aSThomas Gleixner	  Allows userspace to request a limited time slice extension when
2044d7a5da7aSThomas Gleixner	  returning from an interrupt to user space via the RSEQ shared
2045d7a5da7aSThomas Gleixner	  data ABI. If granted, that allows to complete a critical section,
2046d7a5da7aSThomas Gleixner	  so that other threads are not stuck on a conflicted resource,
2047d7a5da7aSThomas Gleixner	  while the task is scheduled out.
2048d7a5da7aSThomas Gleixner
2049d7a5da7aSThomas Gleixner	  If unsure, say N.
2050d7a5da7aSThomas Gleixner
205154129104SThomas Gleixnerconfig RSEQ_STATS
205254129104SThomas Gleixner	default n
205354129104SThomas Gleixner	bool "Enable lightweight statistics of restartable sequences" if EXPERT
205454129104SThomas Gleixner	depends on RSEQ && DEBUG_FS
205554129104SThomas Gleixner	help
205654129104SThomas Gleixner	  Enable lightweight counters which expose information about the
205754129104SThomas Gleixner	  frequency of RSEQ operations via debugfs. Mostly interesting for
205854129104SThomas Gleixner	  kernel debugging or performance analysis. While lightweight it's
205954129104SThomas Gleixner	  still adding code into the user/kernel mode transitions.
206054129104SThomas Gleixner
206154129104SThomas Gleixner	  If unsure, say N.
206254129104SThomas Gleixner
20639c37cb6eSThomas Gleixnerconfig RSEQ_DEBUG_DEFAULT_ENABLE
20649c37cb6eSThomas Gleixner	default n
20659c37cb6eSThomas Gleixner	bool "Enable restartable sequences debug mode by default" if EXPERT
20669c37cb6eSThomas Gleixner	depends on RSEQ
20679c37cb6eSThomas Gleixner	help
20689c37cb6eSThomas Gleixner	  This enables the static branch for debug mode of restartable
20699c37cb6eSThomas Gleixner	  sequences.
20709c37cb6eSThomas Gleixner
20719c37cb6eSThomas Gleixner	  This also can be controlled on the kernel command line via the
20729c37cb6eSThomas Gleixner	  command line parameter "rseq_debug=0/1" and through debugfs.
20739c37cb6eSThomas Gleixner
20749c37cb6eSThomas Gleixner	  If unsure, say N.
20759c37cb6eSThomas Gleixner
2076a751ea34SRandy Dunlapconfig DEBUG_RSEQ
2077a751ea34SRandy Dunlap	default n
2078a751ea34SRandy Dunlap	bool "Enable debugging of rseq() system call" if EXPERT
20793db6b38dSThomas Gleixner	depends on RSEQ && DEBUG_KERNEL && !GENERIC_ENTRY
20809c37cb6eSThomas Gleixner	select RSEQ_DEBUG_DEFAULT_ENABLE
2081a751ea34SRandy Dunlap	help
2082a751ea34SRandy Dunlap	  Enable extra debugging checks for the rseq system call.
2083a751ea34SRandy Dunlap
2084a751ea34SRandy Dunlap	  If unsure, say N.
2085a751ea34SRandy Dunlap
2086a751ea34SRandy Dunlapconfig CACHESTAT_SYSCALL
2087a751ea34SRandy Dunlap	bool "Enable cachestat() system call" if EXPERT
2088a751ea34SRandy Dunlap	default y
2089a751ea34SRandy Dunlap	help
2090a751ea34SRandy Dunlap	  Enable the cachestat system call, which queries the page cache
2091a751ea34SRandy Dunlap	  statistics of a file (number of cached pages, dirty pages,
2092a751ea34SRandy Dunlap	  pages marked for writeback, (recently) evicted pages).
2093a751ea34SRandy Dunlap
2094a751ea34SRandy Dunlap	  If unsure say Y here.
2095a751ea34SRandy Dunlap
2096d1b069f5SRandy Dunlapconfig KALLSYMS
2097d1b069f5SRandy Dunlap	bool "Load all symbols for debugging/ksymoops" if EXPERT
2098d1b069f5SRandy Dunlap	default y
2099d1b069f5SRandy Dunlap	help
2100d1b069f5SRandy Dunlap	  Say Y here to let the kernel print out symbolic crash information and
2101d1b069f5SRandy Dunlap	  symbolic stack backtraces. This increases the size of the kernel
2102d1b069f5SRandy Dunlap	  somewhat, as all symbols have to be loaded into the kernel image.
2103d1b069f5SRandy Dunlap
210430f3bb09SZhen Leiconfig KALLSYMS_SELFTEST
210530f3bb09SZhen Lei	bool "Test the basic functions and performance of kallsyms"
210630f3bb09SZhen Lei	depends on KALLSYMS
210730f3bb09SZhen Lei	default n
210830f3bb09SZhen Lei	help
210930f3bb09SZhen Lei	  Test the basic functions and performance of some interfaces, such as
211030f3bb09SZhen Lei	  kallsyms_lookup_name. It also calculates the compression rate of the
211130f3bb09SZhen Lei	  kallsyms compression algorithm for the current symbol set.
211230f3bb09SZhen Lei
211330f3bb09SZhen Lei	  Start self-test automatically after system startup. Suggest executing
211430f3bb09SZhen Lei	  "dmesg | grep kallsyms_selftest" to collect test results. "finish" is
211530f3bb09SZhen Lei	  displayed in the last line, indicating that the test is complete.
211630f3bb09SZhen Lei
2117d1b069f5SRandy Dunlapconfig KALLSYMS_ALL
2118d1b069f5SRandy Dunlap	bool "Include all symbols in kallsyms"
2119d1b069f5SRandy Dunlap	depends on DEBUG_KERNEL && KALLSYMS
2120d1b069f5SRandy Dunlap	help
2121d1b069f5SRandy Dunlap	  Normally kallsyms only contains the symbols of functions for nicer
2122d1b069f5SRandy Dunlap	  OOPS messages and backtraces (i.e., symbols from the text and inittext
2123bdf0fe33SBaruch Siach	  sections). This is sufficient for most cases. And only if you want to
2124bdf0fe33SBaruch Siach	  enable kernel live patching, or other less common use cases (e.g.,
2125bdf0fe33SBaruch Siach	  when a debugger is used) all symbols are required (i.e., names of
2126bdf0fe33SBaruch Siach	  variables from the data sections, etc).
2127d1b069f5SRandy Dunlap
2128d1b069f5SRandy Dunlap	  This option makes sure that all symbols are loaded into the kernel
2129d1b069f5SRandy Dunlap	  image (i.e., symbols from all sections) in cost of increased kernel
2130d1b069f5SRandy Dunlap	  size (depending on the kernel configuration, it may be 300KiB or
2131d1b069f5SRandy Dunlap	  something like this).
2132d1b069f5SRandy Dunlap
2133bdf0fe33SBaruch Siach	  Say N unless you really need all symbols, or kernel live patching.
2134d1b069f5SRandy Dunlap
2135d1b069f5SRandy Dunlap# end of the "standard kernel features (expert users)" menu
2136d1b069f5SRandy Dunlap
21373ccfebedSMathieu Desnoyersconfig ARCH_HAS_MEMBARRIER_CALLBACKS
21383ccfebedSMathieu Desnoyers	bool
21393ccfebedSMathieu Desnoyers
214070216e18SMathieu Desnoyersconfig ARCH_HAS_MEMBARRIER_SYNC_CORE
214170216e18SMathieu Desnoyers	bool
214270216e18SMathieu Desnoyers
21435796d396SJeff Xuconfig ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS
21445796d396SJeff Xu	bool
21455796d396SJeff Xu	help
21465796d396SJeff Xu	  Control MSEAL_SYSTEM_MAPPINGS access based on architecture.
21475796d396SJeff Xu
21485796d396SJeff Xu	  A 64-bit kernel is required for the memory sealing feature.
21495796d396SJeff Xu	  No specific hardware features from the CPU are needed.
21505796d396SJeff Xu
21515796d396SJeff Xu	  To enable this feature, the architecture needs to update their
21525796d396SJeff Xu	  special mappings calls to include the sealing flag and confirm
21535796d396SJeff Xu	  that it doesn't unmap/remap system mappings during the life
21545796d396SJeff Xu	  time of the process. The existence of this flag for an architecture
21555796d396SJeff Xu	  implies that it does not require the remapping of the system
21565796d396SJeff Xu	  mappings during process lifetime, so sealing these mappings is safe
21575796d396SJeff Xu	  from a kernel perspective.
21585796d396SJeff Xu
21595796d396SJeff Xu	  After the architecture enables this, a distribution can set
2160e474ac24SLeon Hwang	  CONFIG_MSEAL_SYSTEM_MAPPINGS to manage access to the feature.
21615796d396SJeff Xu
21625796d396SJeff Xu	  For complete descriptions of memory sealing, please see
21635796d396SJeff Xu	  Documentation/userspace-api/mseal.rst
21645796d396SJeff Xu
2165cdd6c482SIngo Molnarconfig HAVE_PERF_EVENTS
21660793a61dSThomas Gleixner	bool
2167018df72dSMike Frysinger	help
2168018df72dSMike Frysinger	  See tools/perf/design.txt for details.
21690793a61dSThomas Gleixner
21702aef6f30SSean Christophersonconfig GUEST_PERF_EVENTS
21712aef6f30SSean Christopherson	bool
21722aef6f30SSean Christopherson	depends on HAVE_PERF_EVENTS
21732aef6f30SSean Christopherson
2174eff95e17SKan Liangconfig PERF_GUEST_MEDIATED_PMU
2175eff95e17SKan Liang	bool
2176eff95e17SKan Liang	depends on GUEST_PERF_EVENTS
2177eff95e17SKan Liang
2178906010b2SPeter Zijlstraconfig PERF_USE_VMALLOC
2179906010b2SPeter Zijlstra	bool
2180906010b2SPeter Zijlstra	help
2181906010b2SPeter Zijlstra	  See tools/perf/design.txt for details
2182906010b2SPeter Zijlstra
218357c0c15bSIngo Molnarmenu "Kernel Performance Events And Counters"
21840793a61dSThomas Gleixner
2185cdd6c482SIngo Molnarconfig PERF_EVENTS
218657c0c15bSIngo Molnar	bool "Kernel performance events and counters"
2187392d65a9SRobert Richter	default y if PROFILING
2188cdd6c482SIngo Molnar	depends on HAVE_PERF_EVENTS
2189e360adbeSPeter Zijlstra	select IRQ_WORK
21900793a61dSThomas Gleixner	help
219157c0c15bSIngo Molnar	  Enable kernel support for various performance events provided
219257c0c15bSIngo Molnar	  by software and hardware.
21930793a61dSThomas Gleixner
2194dd77038dSThadeu Lima de Souza Cascardo	  Software events are supported either built-in or via the
219557c0c15bSIngo Molnar	  use of generic tracepoints.
219657c0c15bSIngo Molnar
219757c0c15bSIngo Molnar	  Most modern CPUs support performance events via performance
219857c0c15bSIngo Molnar	  counter registers. These registers count the number of certain
21990793a61dSThomas Gleixner	  types of hw events: such as instructions executed, cachemisses
22000793a61dSThomas Gleixner	  suffered, or branches mis-predicted - without slowing down the
22010793a61dSThomas Gleixner	  kernel or applications. These registers can also trigger interrupts
22020793a61dSThomas Gleixner	  when a threshold number of events have passed - and can thus be
22030793a61dSThomas Gleixner	  used to profile the code that runs on that CPU.
22040793a61dSThomas Gleixner
220557c0c15bSIngo Molnar	  The Linux Performance Event subsystem provides an abstraction of
2206dd77038dSThadeu Lima de Souza Cascardo	  these software and hardware event capabilities, available via a
220757c0c15bSIngo Molnar	  system call and used by the "perf" utility in tools/perf/. It
22080793a61dSThomas Gleixner	  provides per task and per CPU counters, and it provides event
22090793a61dSThomas Gleixner	  capabilities on top of those.
22100793a61dSThomas Gleixner
22110793a61dSThomas Gleixner	  Say Y if unsure.
22120793a61dSThomas Gleixner
2213906010b2SPeter Zijlstraconfig DEBUG_PERF_USE_VMALLOC
2214906010b2SPeter Zijlstra	default n
2215906010b2SPeter Zijlstra	bool "Debug: use vmalloc to back perf mmap() buffers"
2216cb307113SMichael Ellerman	depends on PERF_EVENTS && DEBUG_KERNEL && !PPC
2217906010b2SPeter Zijlstra	select PERF_USE_VMALLOC
2218906010b2SPeter Zijlstra	help
2219906010b2SPeter Zijlstra	  Use vmalloc memory to back perf mmap() buffers.
2220906010b2SPeter Zijlstra
2221906010b2SPeter Zijlstra	  Mostly useful for debugging the vmalloc code on platforms
2222906010b2SPeter Zijlstra	  that don't require it.
2223906010b2SPeter Zijlstra
2224906010b2SPeter Zijlstra	  Say N if unsure.
2225906010b2SPeter Zijlstra
22260793a61dSThomas Gleixnerendmenu
22270793a61dSThomas Gleixner
2228091f6e26SDavid Howellsconfig SYSTEM_DATA_VERIFICATION
2229091f6e26SDavid Howells	def_bool n
2230091f6e26SDavid Howells	select SYSTEM_TRUSTED_KEYRING
2231091f6e26SDavid Howells	select KEYS
2232091f6e26SDavid Howells	select CRYPTO
2233d43de6c7SDavid Howells	select CRYPTO_RSA
2234091f6e26SDavid Howells	select ASYMMETRIC_KEY_TYPE
2235091f6e26SDavid Howells	select ASYMMETRIC_PUBLIC_KEY_SUBTYPE
2236091f6e26SDavid Howells	select ASN1
2237091f6e26SDavid Howells	select OID_REGISTRY
2238091f6e26SDavid Howells	select X509_CERTIFICATE_PARSER
2239091f6e26SDavid Howells	select PKCS7_MESSAGE_PARSER
224082c04ff8SPeter Foley	help
2241091f6e26SDavid Howells	  Provide PKCS#7 message verification using the contents of the system
2242091f6e26SDavid Howells	  trusted keyring to provide public keys.  This then can be used for
2243091f6e26SDavid Howells	  module verification, kexec image verification and firmware blob
2244091f6e26SDavid Howells	  verification.
224582c04ff8SPeter Foley
2246125e5645SMathieu Desnoyersconfig PROFILING
2247b309a294SRobert Richter	bool "Profiling support"
2248125e5645SMathieu Desnoyers	help
2249125e5645SMathieu Desnoyers	  Say Y here to enable the extended profiling support mechanisms used
2250f8408264SViresh Kumar	  by profilers.
2251125e5645SMathieu Desnoyers
22522f7ab126SMiguel Ojedaconfig RUST
22532f7ab126SMiguel Ojeda	bool "Rust support"
22542f7ab126SMiguel Ojeda	depends on HAVE_RUST
22552f7ab126SMiguel Ojeda	depends on RUST_IS_AVAILABLE
2256ac61506bSSami Tolvanen	select EXTENDED_MODVERSIONS if MODVERSIONS
2257ac61506bSSami Tolvanen	depends on !MODVERSIONS || GENDWARFKSYMS
2258f1385dc6SNeal Gompa	depends on !GCC_PLUGIN_RANDSTRUCT
22592f7ab126SMiguel Ojeda	depends on !RANDSTRUCT
22605daa0c35SMatthew Maurer	depends on !DEBUG_INFO_BTF || (PAHOLE_HAS_LANG_EXCLUDE && !LTO)
226123ef9d43SKees Cook	depends on !CFI || HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC
226223ef9d43SKees Cook	select CFI_ICALL_NORMALIZE_INTEGERS if CFI
22635b271543SAlice Ryhl	depends on !KASAN || CC_IS_CLANG
226472d33b8bSAlice Ryhl	depends on !KASAN_SW_TAGS || RUSTC_VERSION >= 109600
22652f7ab126SMiguel Ojeda	help
22662f7ab126SMiguel Ojeda	  Enables Rust support in the kernel.
22672f7ab126SMiguel Ojeda
22682f7ab126SMiguel Ojeda	  This allows other Rust-related options, like drivers written in Rust,
22692f7ab126SMiguel Ojeda	  to be selected.
22702f7ab126SMiguel Ojeda
22712f7ab126SMiguel Ojeda	  It is also required to be able to load external kernel modules
22722f7ab126SMiguel Ojeda	  written in Rust.
22732f7ab126SMiguel Ojeda
22742f7ab126SMiguel Ojeda	  See Documentation/rust/ for more information.
22752f7ab126SMiguel Ojeda
22762f7ab126SMiguel Ojeda	  If unsure, say N.
22772f7ab126SMiguel Ojeda
2278e74b7a3fSYury Norovsource "rust/kernel/Kconfig.test"
2279e74b7a3fSYury Norov
22802f7ab126SMiguel Ojedaconfig RUSTC_VERSION_TEXT
22812f7ab126SMiguel Ojeda	string
22822f7ab126SMiguel Ojeda	depends on RUST
22835134a335SMiguel Ojeda	default "$(RUSTC_VERSION_TEXT)"
22845134a335SMiguel Ojeda	help
22855134a335SMiguel Ojeda	  See `CC_VERSION_TEXT`.
22862f7ab126SMiguel Ojeda
22872f7ab126SMiguel Ojedaconfig BINDGEN_VERSION_TEXT
22882f7ab126SMiguel Ojeda	string
22892f7ab126SMiguel Ojeda	depends on RUST
229093553d99SMiguel Ojeda	default "$(shell,$(BINDGEN) --version 2>/dev/null)"
22912f7ab126SMiguel Ojeda
22925f87f112SIngo Molnar#
22935f87f112SIngo Molnar# Place an empty function call at each tracepoint site. Can be
22945f87f112SIngo Molnar# dynamically changed for a probe function.
22955f87f112SIngo Molnar#
229697e1c18eSMathieu Desnoyersconfig TRACEPOINTS
22975f87f112SIngo Molnar	bool
2298a363d27cSMathieu Desnoyers	select TASKS_TRACE_RCU
229997e1c18eSMathieu Desnoyers
230089cde455SEric DeVoldersource "kernel/Kconfig.kexec"
230189cde455SEric DeVolder
230248a1b232SPasha Tatashinsource "kernel/liveupdate/Kconfig"
230348a1b232SPasha Tatashin
23041da177e4SLinus Torvaldsendmenu		# General setup
23051da177e4SLinus Torvalds
23061572497cSChristoph Hellwigsource "arch/Kconfig"
23071572497cSChristoph Hellwig
2308ae81f9e3SChuck Ebbertconfig RT_MUTEXES
23096341e62bSChristoph Jaeger	bool
23101c6f9ec0SSebastian Andrzej Siewior	default y if PREEMPT_RT
2311ae81f9e3SChuck Ebbert
2312c8424e77SThiago Jung Bauermannconfig MODULE_SIG_FORMAT
2313c8424e77SThiago Jung Bauermann	def_bool n
2314c8424e77SThiago Jung Bauermann	select SYSTEM_DATA_VERIFICATION
2315c8424e77SThiago Jung Bauermann
231673b4fc92SChristophe Leroysource "kernel/module/Kconfig"
23176c9692e2SPeter Zijlstra
231898a79d6aSRusty Russellconfig INIT_ALL_POSSIBLE
231998a79d6aSRusty Russell	bool
232098a79d6aSRusty Russell	help
23215f054e31SRusty Russell	  Back when each arch used to define their own cpu_online_mask and
23225f054e31SRusty Russell	  cpu_possible_mask, some of them chose to initialize cpu_possible_mask
232398a79d6aSRusty Russell	  with all 1s, and others with all 0s.  When they were centralised,
232498a79d6aSRusty Russell	  it was better to provide this option than to break all the archs
2325692105b8SMatt LaPlante	  and have several arch maintainers pursuing me down dark alleys.
232698a79d6aSRusty Russell
23273a65dfe8SJens Axboesource "block/Kconfig"
2328e98c3202SAvi Kivity
2329e98c3202SAvi Kivityconfig PREEMPT_NOTIFIERS
2330e98c3202SAvi Kivity	bool
2331e260be67SPaul E. McKenney
233216295becSSteffen Klassertconfig PADATA
233316295becSSteffen Klassert	depends on SMP
233416295becSSteffen Klassert	bool
233516295becSSteffen Klassert
23364520c6a4SDavid Howellsconfig ASN1
23374520c6a4SDavid Howells	tristate
23384520c6a4SDavid Howells	help
23394520c6a4SDavid Howells	  Build a simple ASN.1 grammar compiler that produces a bytecode output
23404520c6a4SDavid Howells	  that can be interpreted by the ASN.1 stream decoder and used to
23414520c6a4SDavid Howells	  inform it as to what tags are to be expected in a stream and what
23424520c6a4SDavid Howells	  functions to call on what tags.
23434520c6a4SDavid Howells
23446beb0009SThomas Gleixnersource "kernel/Kconfig.locks"
2345e61938a9SMathieu Desnoyers
23460ebeea8cSDaniel Borkmannconfig ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
23470ebeea8cSDaniel Borkmann	bool
23480ebeea8cSDaniel Borkmann
23494ff4c745SAndrea Parriconfig ARCH_HAS_PREPARE_SYNC_CORE_CMD
23504ff4c745SAndrea Parri	bool
23514ff4c745SAndrea Parri
2352e61938a9SMathieu Desnoyersconfig ARCH_HAS_SYNC_CORE_BEFORE_USERMODE
2353e61938a9SMathieu Desnoyers	bool
23541bd21c6cSDominik Brodowski
23551bd21c6cSDominik Brodowski# It may be useful for an architecture to override the definitions of the
23567303e30eSDominik Brodowski# SYSCALL_DEFINE() and __SYSCALL_DEFINEx() macros in <linux/syscalls.h>
23577303e30eSDominik Brodowski# and the COMPAT_ variants in <linux/compat.h>, in particular to use a
23587303e30eSDominik Brodowski# different calling convention for syscalls. They can also override the
23597303e30eSDominik Brodowski# macros for not-implemented syscalls in kernel/sys_ni.c and
23607303e30eSDominik Brodowski# kernel/time/posix-stubs.c. All these overrides need to be available in
23617303e30eSDominik Brodowski# <asm/syscall_wrapper.h>.
23621bd21c6cSDominik Brodowskiconfig ARCH_HAS_SYSCALL_WRAPPER
23631bd21c6cSDominik Brodowski	def_bool n
2364