xref: /linux/init/Kconfig (revision a5210135489ae7bc1ef1cb4a8157361dd7b468cd)
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
85deab487eSThomas Weißschuhconfig RUSTC_LLVM_MAJOR_VERSION
86deab487eSThomas Weißschuh	int
87deab487eSThomas Weißschuh	default $(shell,expr $(rustc-llvm-version) / 10000)
881a927fd3SMasahiro Yamada
899371f86eSMasahiro Yamadaconfig RUSTC_CLANG_LLVM_COMPATIBLE
90deab487eSThomas Weißschuh	bool
9180623f2cSThomas Weißschuh	default y if CC_IS_CLANG && RUSTC_LLVM_MAJOR_VERSION = $(shell,expr $(cc-version) / 10000)
9280623f2cSThomas Weißschuh	help
931a927fd3SMasahiro Yamada	  This indicates whether Rust and Clang use LLVM of the same major
94f2f6a8e8SMark Rutland	  version.
95f2f6a8e8SMark Rutland
96f2f6a8e8SMark Rutland	  Operations involving handling LLVM IR or bitcode (e.g. cross-language
97f2f6a8e8SMark Rutland	  LTO) require the same LLVM major version to work properly. For best
98f2f6a8e8SMark Rutland	  compatibility it is recommended that the exact same LLVM is used.
99f2f6a8e8SMark Rutland
100f2f6a8e8SMark Rutlandconfig ARCH_HAS_CC_CAN_LINK
101f2f6a8e8SMark Rutland	bool
102f2f6a8e8SMark Rutland
103587f1701SNick Desaulniersconfig CC_CAN_LINK
104f2f6a8e8SMark Rutland	bool
105f2f6a8e8SMark Rutland	default ARCH_CC_CAN_LINK if ARCH_HAS_CC_CAN_LINK
106e2ffa15bSThomas Gleixner	default $(cc_can_link_user,$(m64-flag)) if 64BIT
107f2f6a8e8SMark Rutland	default $(cc_can_link_user,$(m32-flag))
108e2ffa15bSThomas Gleixner
109fde0ab43SLinus Torvalds# Fixed in GCC 14, 13.3, 12.4 and 11.5
110587f1701SNick Desaulniers# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113921
1111aa0e8b1SSean Christophersonconfig GCC_ASM_GOTO_OUTPUT_BROKEN
1121aa0e8b1SSean Christopherson	bool
1131aa0e8b1SSean Christopherson	depends on CC_IS_GCC
114534bd703SAlexandre Belloni	default y if GCC_VERSION < 110500
1151aa0e8b1SSean Christopherson	default y if GCC_VERSION >= 120000 && GCC_VERSION < 120400
1165cf896fbSPeter Collingbourne	default y if GCC_VERSION >= 130000 && GCC_VERSION < 130300
1172d122942SWill Deacon
1185cf896fbSPeter Collingbourneconfig CC_HAS_ASM_GOTO_OUTPUT
119eb111869SRasmus Villemoes	def_bool y
120eb111869SRasmus Villemoes	depends on !GCC_ASM_GOTO_OUTPUT_BROKEN
121eb111869SRasmus Villemoes	# Detect basic support
122f72e2cffSHeiko Carstens	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)
123f72e2cffSHeiko Carstens	# Detect clang (< v17) scoped label issues
124f72e2cffSHeiko Carstens	depends on $(success,echo 'void b(void **);void* c(void);int f(void){{asm goto(""::::l0);return 0;l0:return 1;}void *x __attribute__((cleanup(b)))=c();{asm goto(""::::l1);return 2;l1:return 3;}}' | $(CC) -x c - -c -o /dev/null)
125f72e2cffSHeiko Carstens
126f72e2cffSHeiko Carstensconfig CC_HAS_ASM_GOTO_TIED_OUTPUT
127f72e2cffSHeiko Carstens	depends on CC_HAS_ASM_GOTO_OUTPUT
128f72e2cffSHeiko Carstens	# Detect buggy gcc and clang, fixed in gcc-11 clang-14.
129f72e2cffSHeiko Carstens	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)
130f72e2cffSHeiko Carstens
131f72e2cffSHeiko Carstensconfig TOOLS_SUPPORT_RELR
13251c2ee6dSNick Desaulniers	def_bool $(success,env "CC=$(CC)" "LD=$(LD)" "NM=$(NM)" "OBJCOPY=$(OBJCOPY)" $(srctree)/scripts/tools-support-relr.sh)
13351c2ee6dSNick Desaulniers
13451c2ee6dSNick Desaulniersconfig CC_HAS_ASM_INLINE
135f06e108aSJan Hendrik Farr	def_bool $(success,echo 'void foo(void) { asm inline (""); }' | $(CC) -x c - -c -o /dev/null)
1365106c650SJan Hendrik Farr
13786a9b125SNathan Chancellorconfig CC_HAS_ASSUME
13886a9b125SNathan Chancellor	bool
13986a9b125SNathan Chancellor	# clang needs to be at least 19.1.0 since the meaning of the assume
14086a9b125SNathan Chancellor	# attribute changed:
14186a9b125SNathan Chancellor	# https://github.com/llvm/llvm-project/commit/c44fa3e8a9a44c2e9a575768a3c185354b9f6c17
1425106c650SJan Hendrik Farr	default y if CC_IS_CLANG && CLANG_VERSION >= 190100
1435106c650SJan Hendrik Farr	# supported since gcc 13.1.0
1445106c650SJan Hendrik Farr	# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=106654
145f06e108aSJan Hendrik Farr	default y if CC_IS_GCC && GCC_VERSION >= 130100
146150a04d8SBill Wendling
147150a04d8SBill Wendlingconfig CC_HAS_NO_PROFILE_FN_ATTR
148150a04d8SBill Wendling	def_bool $(success,echo '__attribute__((no_profile_instrument_function)) int x();' | $(CC) -x c - -c -o /dev/null -Werror)
149*7a618ca9SNathan Chancellor
150150a04d8SBill Wendlingconfig CC_HAS_COUNTED_BY
151150a04d8SBill Wendling	bool
152150a04d8SBill Wendling	# clang needs to be at least 20.1.0 to avoid potential crashes
153d39a1d74SKees Cook	# when building structures that contain __counted_by
154d39a1d74SKees Cook	# https://github.com/ClangBuiltLinux/linux/issues/2114
155d39a1d74SKees Cook	# https://github.com/llvm/llvm-project/commit/160fb1121cdf703c3ef5e61fb26c5659eb581489
156f709859fSNathan Chancellor	default y if CC_IS_CLANG && CLANG_VERSION >= 200100
157d39a1d74SKees Cook	# supported since gcc 15.1.0
158b688f369SKees Cook	# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=108896
159b688f369SKees Cook	default y if CC_IS_GCC && GCC_VERSION >= 150100
160b688f369SKees Cook
161e7607f7dSNathan Chancellorconfig CC_HAS_COUNTED_BY_PTR
162e7607f7dSNathan Chancellor	bool
163e7607f7dSNathan Chancellor	# supported since clang 22
164e7607f7dSNathan Chancellor	default y if CC_IS_CLANG && CLANG_VERSION >= 220100
165e7607f7dSNathan Chancellor	# supported since gcc 16.0.0
16688622323SAlexandre Courbot	default y if CC_IS_GCC && GCC_VERSION >= 160000
16788622323SAlexandre Courbot
16888622323SAlexandre Courbotconfig CC_HAS_BROKEN_COUNTED_BY_REF
16947cb6bf7SXiangfei Ding	bool
17047cb6bf7SXiangfei Ding	# https://github.com/llvm/llvm-project/issues/182575
17147cb6bf7SXiangfei Ding	default y if CC_IS_CLANG && CLANG_VERSION < 220100
17236174d16SMiguel Ojeda
17336174d16SMiguel Ojedaconfig CC_HAS_MULTIDIMENSIONAL_NONSTRING
17436174d16SMiguel Ojeda	def_bool $(success,echo 'char tag[][4] __attribute__((__nonstring__)) = { };' | $(CC) $(CLANG_FLAGS) -x c - -c -o /dev/null -Werror)
1757129ea6eSMiguel Ojeda
1767129ea6eSMiguel Ojedaconfig LD_CAN_USE_KEEP_IN_OVERLAY
1777129ea6eSMiguel Ojeda	# ld.lld prior to 21.0.0 did not support KEEP within an overlay description
1780aa2b78cSBoqun Feng	# https://github.com/llvm/llvm-project/pull/130661
1790aa2b78cSBoqun Feng	def_bool LD_IS_BFD || LLD_VERSION >= 210000
1800aa2b78cSBoqun Feng
181c09461a0SAlice Ryhlconfig RUSTC_HAS_SPAN_FILE
182c09461a0SAlice Ryhl	def_bool RUSTC_VERSION >= 108800
183c09461a0SAlice Ryhl
184613fe169SNathan Chancellorconfig RUSTC_HAS_UNNECESSARY_TRANSMUTES
185613fe169SNathan Chancellor	def_bool RUSTC_VERSION >= 108800
18690e5b38aSIhor Solodrai
187613fe169SNathan Chancellorconfig RUSTC_HAS_FILE_WITH_NUL
188b99b87f7SPeter Oberparleiter	def_bool RUSTC_VERSION >= 108900
189b99b87f7SPeter Oberparleiter
190b99b87f7SPeter Oberparleiterconfig RUSTC_HAS_FILE_AS_C_STR
191e360adbeSPeter Zijlstra	def_bool RUSTC_VERSION >= 109100
192fd0a68a2STejun Heo
193e360adbeSPeter Zijlstraconfig PAHOLE_VERSION
19410916706SShile Zhang	int
1951dbdc6f1SDavid Daney	default "$(PAHOLE_VERSION)"
1961dbdc6f1SDavid Daney
197c65eacbeSAndy Lutomirskiconfig CONSTRUCTORS
198c65eacbeSAndy Lutomirski	bool
199c65eacbeSAndy Lutomirski
200c65eacbeSAndy Lutomirskiconfig IRQ_WORK
201c65eacbeSAndy Lutomirski	def_bool y if SMP
202c65eacbeSAndy Lutomirski
203c65eacbeSAndy Lutomirskiconfig BUILDTIME_TABLE_SORT
204c6c314a6SAndy Lutomirski	bool
205c6c314a6SAndy Lutomirski
206c6c314a6SAndy Lutomirskiconfig THREAD_INFO_IN_TASK
207ff0cfc66SAl Boldi	bool
2081da177e4SLinus Torvalds	help
2091da177e4SLinus Torvalds	  Select this to move thread_info off the stack into task_struct.  To
2101da177e4SLinus Torvalds	  make this work, an arch will need to remove all thread_info fields
211fefbeed8SAndrew Morton	  except flags and fix any runtime bugs.
212fefbeed8SAndrew Morton
213fefbeed8SAndrew Morton	  One subtle change that will be needed is to use try_get_task_stack()
214fefbeed8SAndrew Morton	  and put_task_stack() in save_thread_stack_tsk() and get_wchan().
2151da177e4SLinus Torvalds
2161da177e4SLinus Torvaldsmenu "General setup"
2171da177e4SLinus Torvalds
2181da177e4SLinus Torvaldsconfig BROKEN
2191da177e4SLinus Torvalds	bool
2201da177e4SLinus Torvalds	help
2211da177e4SLinus Torvalds	  This option allows you to choose whether you want to try to
2221da177e4SLinus Torvalds	  compile (and fix) old drivers that haven't been updated to
223dd673bcaSAdrian Bunk	  new infrastructure.
224dd673bcaSAdrian Bunk
2251da177e4SLinus Torvaldsconfig BROKEN_ON_SMP
22634ad92c2SRandy Dunlap	bool
22734ad92c2SRandy Dunlap	depends on BROKEN || !SMP
2281da177e4SLinus Torvalds	default y
2294bb16672SJiri Slaby
2304bb16672SJiri Slabyconfig INIT_ENV_ARG_LIMIT
231ea29b20aSMasahiro Yamada	int
2324bb16672SJiri Slaby	default 32 if !UML
2334bb16672SJiri Slaby	default 128 if UML
2344bb16672SJiri Slaby	help
2354bb16672SJiri Slaby	  Maximum of each of the number of arguments and environment
2364bb16672SJiri Slaby	  variables passed to init from the kernel command line.
2374bb16672SJiri Slaby
2384bb16672SJiri Slabyconfig COMPILE_TEST
2394bb16672SJiri Slaby	bool "Compile also drivers which will not load"
2404bb16672SJiri Slaby	depends on HAS_IOMEM
2414bb16672SJiri Slaby	help
2424bb16672SJiri Slaby	  Some drivers can be compiled on a different platform than they are
2433fe617ccSLinus Torvalds	  intended to be run on. Despite they cannot be loaded there (or even
2443fe617ccSLinus Torvalds	  when they load they cannot be used due to missing HW support),
245b339ec9cSMarco Elver	  developers still, opposing to distributors, might want to build such
2463fe617ccSLinus Torvalds	  drivers to compile-test them.
2473fe617ccSLinus Torvalds
2482f7ab126SMiguel Ojeda	  If you are a developer and want to build everything available, say Y
249e1789d7cSXin Li	  here. If you are a user/distributor, say N here to exclude useless
250e1789d7cSXin Li	  drivers to be distributed.
251e1789d7cSXin Li
2523fe617ccSLinus Torvaldsconfig WERROR
253e1789d7cSXin Li	bool "Compile the kernel with warnings as errors"
254e1789d7cSXin Li	default COMPILE_TEST
2553fe617ccSLinus Torvalds	help
2563fe617ccSLinus Torvalds	  A kernel build should not cause any compiler warnings, and this
2573fe617ccSLinus Torvalds	  enables the '-Werror' (for C) and '-Dwarnings' (for Rust) flags
2583fe617ccSLinus Torvalds	  to enforce that rule by default. Certain warnings from other tools
2593fe617ccSLinus Torvalds	  such as the linker may be upgraded to errors with this option as
260d6fc9fcbSMasahiro Yamada	  well.
261d6fc9fcbSMasahiro Yamada
2622a0a3080SThomas Weißschuh	  However, if you have a new (or very old) compiler or linker with odd
263d6fc9fcbSMasahiro Yamada	  and unusual warnings, or you have some architecture with problems,
264d6fc9fcbSMasahiro Yamada	  you may need to disable this config option in order to
265d6fc9fcbSMasahiro Yamada	  successfully build the kernel.
266d6fc9fcbSMasahiro Yamada
267d6fc9fcbSMasahiro Yamada	  If in doubt, say Y.
268d6fc9fcbSMasahiro Yamada
269d6fc9fcbSMasahiro Yamadaconfig UAPI_HEADER_TEST
2701da177e4SLinus Torvalds	bool "Compile test UAPI headers"
2711da177e4SLinus Torvalds	depends on HEADERS_INSTALL
2721da177e4SLinus Torvalds	help
2731da177e4SLinus Torvalds	  Compile test headers exported to user-space to ensure they are
2741da177e4SLinus Torvalds	  self-contained, i.e. compilable as standalone units.
2751da177e4SLinus Torvalds
2761da177e4SLinus Torvalds	  If you are a developer or tester and want to ensure the exported
2771da177e4SLinus Torvalds	  headers are self-contained, say Y here. Otherwise, choose N.
2781da177e4SLinus Torvalds
2791da177e4SLinus Torvaldsconfig LOCALVERSION
280aaebf433SRyan Anderson	string "Local version - append to kernel release"
281aaebf433SRyan Anderson	help
282aaebf433SRyan Anderson	  Append an extra string to the end of your kernel version.
283ac3339baSAlexey Dobriyan	  This will show up when you type uname, for example.
284aaebf433SRyan Anderson	  The string you set here will be appended after the contents of
285aaebf433SRyan Anderson	  any files with a filename matching localversion* in your
2866e5a5420SRobert P. J. Day	  object and source tree, in that order.  Your total string can
2876e5a5420SRobert P. J. Day	  be a maximum of 64 characters.
288aaebf433SRyan Anderson
289aaebf433SRyan Andersonconfig LOCALVERSION_AUTO
2906e5a5420SRobert P. J. Day	bool "Automatically append version information to the version string"
291aaebf433SRyan Anderson	default y
2926e5a5420SRobert P. J. Day	depends on !COMPILE_TEST
293aaebf433SRyan Anderson	help
2940f9c608dSRasmus Villemoes	  This will try to automatically determine if the current tree is a
2956e5a5420SRobert P. J. Day	  release tree by looking for git tags that belong to the current
2966e5a5420SRobert P. J. Day	  top of tree revision.
2976e5a5420SRobert P. J. Day
2986e5a5420SRobert P. J. Day	  A string of the format -gxxxxxxxx will be added to the localversion
2996e5a5420SRobert P. J. Day	  if a git-based tree is found.  The string generated by this will be
300aaebf433SRyan Anderson	  appended after any matching localversion* files, and after the value
3019afb719eSLaura Abbott	  set in CONFIG_LOCALVERSION.
3029afb719eSLaura Abbott
3039afb719eSLaura Abbott	  (The actual string used here is the first 12 characters produced
3049afb719eSLaura Abbott	  by running the command:
3059afb719eSLaura Abbott
3069afb719eSLaura Abbott	    $ git rev-parse --verify HEAD
3079afb719eSLaura Abbott
3089afb719eSLaura Abbott	  which is done within the script "scripts/setlocalversion".)
3099afb719eSLaura Abbott
3102e9f3bddSH. Peter Anvinconfig BUILD_SALT
3112e9f3bddSH. Peter Anvin	string "Build ID Salt"
3122e9f3bddSH. Peter Anvin	default ""
3132e9f3bddSH. Peter Anvin	help
3142e9f3bddSH. Peter Anvin	  The build ID is used to link binaries and their debug info. Setting
3152e9f3bddSH. Peter Anvin	  this option will use the value in the calculation of the build id.
3162e9f3bddSH. Peter Anvin	  This is mostly useful for distributions which want to ensure the
3172e9f3bddSH. Peter Anvin	  build is unique between builds. It's safe to leave the default.
3182e9f3bddSH. Peter Anvin
3193ebe1243SLasse Collinconfig HAVE_KERNEL_GZIP
3203ebe1243SLasse Collin	bool
3213ebe1243SLasse Collin
3227dd65febSAlbin Tonnerreconfig HAVE_KERNEL_BZIP2
3237dd65febSAlbin Tonnerre	bool
3247dd65febSAlbin Tonnerre
325e76e1fdfSKyungsik Leeconfig HAVE_KERNEL_LZMA
326e76e1fdfSKyungsik Lee	bool
327e76e1fdfSKyungsik Lee
32848f7ddf7SNick Terrellconfig HAVE_KERNEL_XZ
32948f7ddf7SNick Terrell	bool
33048f7ddf7SNick Terrell
331f16466afSVasily Gorbikconfig HAVE_KERNEL_LZO
332f16466afSVasily Gorbik	bool
333f16466afSVasily Gorbik
33430d65dbfSAlain Knaffconfig HAVE_KERNEL_LZ4
33530d65dbfSAlain Knaff	bool
33630d65dbfSAlain Knaff
33748f7ddf7SNick Terrellconfig HAVE_KERNEL_ZSTD
33830d65dbfSAlain Knaff	bool
33930d65dbfSAlain Knaff
34030d65dbfSAlain Knaffconfig HAVE_KERNEL_UNCOMPRESSED
34130d65dbfSAlain Knaff	bool
34230d65dbfSAlain Knaff
34330d65dbfSAlain Knaffchoice
34430d65dbfSAlain Knaff	prompt "Kernel compression mode"
34530d65dbfSAlain Knaff	default KERNEL_GZIP
34630d65dbfSAlain Knaff	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
34730d65dbfSAlain Knaff	help
34830d65dbfSAlain Knaff	  The linux kernel is a kind of self-extracting executable.
34930d65dbfSAlain Knaff	  Several compression algorithms are available, which differ
35030d65dbfSAlain Knaff	  in efficiency, compression and decompression speed.
35130d65dbfSAlain Knaff	  Compression speed is only relevant when building a kernel.
35230d65dbfSAlain Knaff	  Decompression speed is relevant at each boot.
35330d65dbfSAlain Knaff
35430d65dbfSAlain Knaff	  If you have any problems with bzip2 or lzma compressed
35530d65dbfSAlain Knaff	  kernels, mail me (Alain Knaff) <alain@knaff.lu>. (An older
35630d65dbfSAlain Knaff	  version of this functionality (bzip2 only), for 2.4, was
35730d65dbfSAlain Knaff	  supplied by Christian Ludwig)
3582e9f3bddSH. Peter Anvin
35930d65dbfSAlain Knaff	  High compression options are mostly useful for users, who
3607dd65febSAlbin Tonnerre	  are low on disk space (embedded systems), but for whom ram
3617dd65febSAlbin Tonnerre	  size matters less.
36230d65dbfSAlain Knaff
36330d65dbfSAlain Knaff	  If in doubt, select 'gzip'
36430d65dbfSAlain Knaff
3652e9f3bddSH. Peter Anvinconfig KERNEL_GZIP
36630d65dbfSAlain Knaff	bool "Gzip"
36730d65dbfSAlain Knaff	depends on HAVE_KERNEL_GZIP
3680a4dd35cSRandy Dunlap	help
3692e9f3bddSH. Peter Anvin	  The old and tried gzip compression. It provides a good balance
3702e9f3bddSH. Peter Anvin	  between compression ratio and decompression speed.
3712e9f3bddSH. Peter Anvin
37230d65dbfSAlain Knaffconfig KERNEL_BZIP2
37330d65dbfSAlain Knaff	bool "Bzip2"
37430d65dbfSAlain Knaff	depends on HAVE_KERNEL_BZIP2
3752e9f3bddSH. Peter Anvin	help
37630d65dbfSAlain Knaff	  Its compression ratio and speed is intermediate.
3770a4dd35cSRandy Dunlap	  Decompression speed is slowest among the choices.  The kernel
3780a4dd35cSRandy Dunlap	  size is about 10% smaller with bzip2, in comparison to gzip.
3790a4dd35cSRandy Dunlap	  Bzip2 uses a large amount of memory. For modern kernels you
38030d65dbfSAlain Knaff	  will need at least 8MB RAM or more for booting.
3813ebe1243SLasse Collin
3823ebe1243SLasse Collinconfig KERNEL_LZMA
3833ebe1243SLasse Collin	bool "LZMA"
3843ebe1243SLasse Collin	depends on HAVE_KERNEL_LZMA
3853ebe1243SLasse Collin	help
3863ebe1243SLasse Collin	  This compression algorithm's ratio is best.  Decompression speed
3873ebe1243SLasse Collin	  is between gzip and bzip2.  Compression is slowest.
3883ebe1243SLasse Collin	  The kernel size is about 33% smaller with LZMA in comparison to gzip.
3897472ff8aSLasse Collin
3907472ff8aSLasse Collinconfig KERNEL_XZ
3917472ff8aSLasse Collin	bool "XZ"
3923ebe1243SLasse Collin	depends on HAVE_KERNEL_XZ
3933ebe1243SLasse Collin	help
3943ebe1243SLasse Collin	  XZ uses the LZMA2 algorithm and instruction set specific
3953ebe1243SLasse Collin	  BCJ filters which can improve compression ratio of executable
3963ebe1243SLasse Collin	  code. The size of the kernel is about 30% smaller with XZ in
3977dd65febSAlbin Tonnerre	  comparison to gzip. On architectures for which there is a BCJ
3987dd65febSAlbin Tonnerre	  filter (i386, x86_64, ARM, ARM64, RISC-V, big endian PowerPC,
3997dd65febSAlbin Tonnerre	  and SPARC), XZ will create a few percent smaller kernel than
4007dd65febSAlbin Tonnerre	  plain LZMA.
4010a4dd35cSRandy Dunlap
402681b3049SStephan Sperber	  The speed is about the same as with LZMA: The decompression
4037dd65febSAlbin Tonnerre	  speed of XZ is better than that of bzip2 but worse than gzip
4047dd65febSAlbin Tonnerre	  and LZO. Compression is slow.
405e76e1fdfSKyungsik Lee
406e76e1fdfSKyungsik Leeconfig KERNEL_LZO
407e76e1fdfSKyungsik Lee	bool "LZO"
408e76e1fdfSKyungsik Lee	depends on HAVE_KERNEL_LZO
409e76e1fdfSKyungsik Lee	help
410e76e1fdfSKyungsik Lee	  Its compression ratio is the poorest among the choices. The kernel
411e76e1fdfSKyungsik Lee	  size is about 10% bigger than gzip; however its speed
412e76e1fdfSKyungsik Lee	  (both compression and decompression) is the fastest.
413e76e1fdfSKyungsik Lee
414e76e1fdfSKyungsik Leeconfig KERNEL_LZ4
415e76e1fdfSKyungsik Lee	bool "LZ4"
416e76e1fdfSKyungsik Lee	depends on HAVE_KERNEL_LZ4
41748f7ddf7SNick Terrell	help
41848f7ddf7SNick Terrell	  LZ4 is an LZ77-type compressor with a fixed, byte-oriented encoding.
41948f7ddf7SNick Terrell	  A preliminary version of LZ4 de/compression tool is available at
42048f7ddf7SNick Terrell	  <https://code.google.com/p/lz4/>.
42148f7ddf7SNick Terrell
42248f7ddf7SNick Terrell	  Its compression ratio is worse than LZO. The size of the kernel
42348f7ddf7SNick Terrell	  is about 8% bigger than LZO. But the decompression speed is
42448f7ddf7SNick Terrell	  faster than LZO.
42548f7ddf7SNick Terrell
42648f7ddf7SNick Terrellconfig KERNEL_ZSTD
427f16466afSVasily Gorbik	bool "ZSTD"
428f16466afSVasily Gorbik	depends on HAVE_KERNEL_ZSTD
429f16466afSVasily Gorbik	help
430f16466afSVasily Gorbik	  ZSTD is a compression algorithm targeting intermediate compression
431f16466afSVasily Gorbik	  with fast decompression speed. It will compress better than GZIP and
432f16466afSVasily Gorbik	  decompress around the same speed as LZO, but slower than LZ4. You
433f16466afSVasily Gorbik	  will need at least 192 KB RAM or more for booting. The zstd command
434f16466afSVasily Gorbik	  line tool is required for compression.
435f16466afSVasily Gorbik
436f16466afSVasily Gorbikconfig KERNEL_UNCOMPRESSED
43730d65dbfSAlain Knaff	bool "None"
43830d65dbfSAlain Knaff	depends on HAVE_KERNEL_UNCOMPRESSED
439ada4ab7aSChris Down	help
440ada4ab7aSChris Down	  Produce uncompressed kernel image. This option is usually not what
441ada4ab7aSChris Down	  you want. It is useful for debugging the kernel in slow simulation
442ada4ab7aSChris Down	  environments, where decompressing and moving the kernel is awfully
443ada4ab7aSChris Down	  slow. This option allows early boot code to skip the decompressor
444ada4ab7aSChris Down	  and jump right at uncompressed kernel image.
445ada4ab7aSChris Down
446ada4ab7aSChris Downendchoice
447ada4ab7aSChris Down
448ada4ab7aSChris Downconfig DEFAULT_INIT
449bd5dc17bSJosh Triplett	string "Default init path"
450bd5dc17bSJosh Triplett	default ""
451bd5dc17bSJosh Triplett	help
452bd5dc17bSJosh Triplett	  This option determines the default init for the system if no init=
453bd5dc17bSJosh Triplett	  option is passed on the kernel command line. If the requested path is
454bd5dc17bSJosh Triplett	  not present, we will still then move on to attempting further
455bd5dc17bSJosh Triplett	  locations (e.g. /sbin/init, etc). If this is empty, we will just use
456bd5dc17bSJosh Triplett	  the fallback list when init= is not passed.
457bd5dc17bSJosh Triplett
4581da177e4SLinus Torvaldsconfig DEFAULT_HOSTNAME
4591da177e4SLinus Torvalds	string "Default hostname"
460a7f7f624SMasahiro Yamada	default "(none)"
4611da177e4SLinus Torvalds	help
4621da177e4SLinus Torvalds	  This option determines the default system hostname before userspace
4631da177e4SLinus Torvalds	  calls sethostname(2). The kernel traditionally uses "(none)" here,
4641da177e4SLinus Torvalds	  but you may wish to use a different default here to make a minimal
4651da177e4SLinus Torvalds	  system more usable with less configuration.
4661da177e4SLinus Torvalds
4671da177e4SLinus Torvaldsconfig SYSVIPC
4681da177e4SLinus Torvalds	bool "System V IPC"
4691da177e4SLinus Torvalds	help
4701da177e4SLinus Torvalds	  Inter Process Communication is a suite of library functions and
4711da177e4SLinus Torvalds	  system calls which let processes (running programs) synchronize and
4721da177e4SLinus Torvalds	  exchange information. It is generally considered to be a good thing,
473a5494dcdSEric W. Biederman	  and some programs won't run unless you say Y here. In particular, if
474a5494dcdSEric W. Biederman	  you want to run the DOS emulator dosemu under Linux (read the
475a5494dcdSEric W. Biederman	  DOSEMU-HOWTO, available from <http://www.tldp.org/docs.html#howto>),
476a5494dcdSEric W. Biederman	  you'll need to say Y here.
477a5494dcdSEric W. Biederman
478a5494dcdSEric W. Biederman	  You can find documentation about IPC with "info ipc" and also in
4790cbed0eeSGuo Ren	  section 6.4 of the Linux Programmer's Guide, available from
4800cbed0eeSGuo Ren	  <http://www.tldp.org/guides.html>.
4810cbed0eeSGuo Ren
4820cbed0eeSGuo Renconfig SYSVIPC_SYSCTL
4831da177e4SLinus Torvalds	bool
4841da177e4SLinus Torvalds	depends on SYSVIPC
48519c92399SKees Cook	depends on SYSCTL
486a7f7f624SMasahiro Yamada	default y
4871da177e4SLinus Torvalds
4881da177e4SLinus Torvaldsconfig SYSVIPC_COMPAT
4891da177e4SLinus Torvalds	def_bool y
4901da177e4SLinus Torvalds	depends on COMPAT && SYSVIPC
491b0e37650SRobert P. J. Day
4921da177e4SLinus Torvaldsconfig POSIX_MQUEUE
4931da177e4SLinus Torvalds	bool "POSIX Message Queues"
4941da177e4SLinus Torvalds	depends on NET
4951da177e4SLinus Torvalds	help
4961da177e4SLinus Torvalds	  POSIX variant of message queues is a part of IPC. In POSIX message
4971da177e4SLinus Torvalds	  queues every message has a priority which decides about succession
4981da177e4SLinus Torvalds	  of receiving it by a process. If you want to compile and run
499bdc8e5f8SSerge E. Hallyn	  programs written e.g. for Solaris with use of its POSIX message
500bdc8e5f8SSerge E. Hallyn	  queues (functions mq_*) say Y here.
501bdc8e5f8SSerge E. Hallyn
502bdc8e5f8SSerge E. Hallyn	  POSIX message queues are visible as a filesystem called 'mqueue'
503bdc8e5f8SSerge E. Hallyn	  and can be mounted somewhere if you want to do filesystem
504bdc8e5f8SSerge E. Hallyn	  operations on message queues.
505c73be61cSDavid Howells
506c73be61cSDavid Howells	  If unsure, say Y.
507c73be61cSDavid Howells
508c73be61cSDavid Howellsconfig POSIX_MQUEUE_SYSCTL
509c73be61cSDavid Howells	bool
510c73be61cSDavid Howells	depends on POSIX_MQUEUE
511c73be61cSDavid Howells	depends on SYSCTL
512c73be61cSDavid Howells	default y
513c73be61cSDavid Howells
514c73be61cSDavid Howellsconfig WATCH_QUEUE
515c02b872aSMauro Carvalho Chehab	bool "General notification queue"
516c73be61cSDavid Howells	default n
517226b4ccdSKonstantin Khlebnikov	help
518226b4ccdSKonstantin Khlebnikov
519226b4ccdSKonstantin Khlebnikov	  This is a general notification queue for the kernel to pass events to
520226b4ccdSKonstantin Khlebnikov	  userspace by splicing them into pipes.  It can be used in conjunction
521226b4ccdSKonstantin Khlebnikov	  with watches for key/keyring change notifications and device
522226b4ccdSKonstantin Khlebnikov	  notifications.
523226b4ccdSKonstantin Khlebnikov
524a2a368d9SGeert Uytterhoeven	  See Documentation/core-api/watch_queue.rst
525226b4ccdSKonstantin Khlebnikov
526226b4ccdSKonstantin Khlebnikovconfig CROSS_MEMORY_ATTACH
5271da177e4SLinus Torvalds	bool "Enable process_vm_readv/writev syscalls"
5281da177e4SLinus Torvalds	depends on MMU
529804a6a49SChris Wright	default y
5301da177e4SLinus Torvalds	help
5311da177e4SLinus Torvalds	  Enabling this option adds the system calls process_vm_readv and
5321da177e4SLinus Torvalds	  process_vm_writev which allow a process with the correct privileges
533cb74ed27SPaul Moore	  to directly read from or write to another process' address space.
534cb74ed27SPaul Moore	  See the man page for more details.
5351da177e4SLinus Torvalds
5367a017721SAKASHI Takahiroconfig AUDIT
5377a017721SAKASHI Takahiro	bool "Auditing support"
5387a017721SAKASHI Takahiro	depends on NET
5391da177e4SLinus Torvalds	help
540cb74ed27SPaul Moore	  Enable auditing infrastructure that can be used with another
5417a017721SAKASHI Takahiro	  kernel subsystem, such as SELinux (which requires this for
54228a3a7ebSEric Paris	  logging of avc messages output).  System call auditing is included
54374c3cbe3SAl Viro	  on architectures which support it.
544d9817ebeSThomas Gleixner
545764e0da1SThomas Gleixnerconfig HAVE_ARCH_AUDITSYSCALL
546b24abcffSDaniel Borkmann	bool
54787a4c375SChristoph Hellwig
548d9817ebeSThomas Gleixnerconfig AUDITSYSCALL
549391dc69cSFrederic Weisbecker	def_bool y
550391dc69cSFrederic Weisbecker	depends on AUDIT && HAVE_ARCH_AUDITSYSCALL
551abf917cdSFrederic Weisbecker	select FSNOTIFY
552abf917cdSFrederic Weisbecker
553abf917cdSFrederic Weisbeckersource "kernel/irq/Kconfig"
554fdf9c356SFrederic Weisbeckersource "kernel/time/Kconfig"
555fdf9c356SFrederic Weisbeckersource "kernel/bpf/Kconfig"
55602382affSNicholas Pigginsource "kernel/Kconfig.preempt"
557fdf9c356SFrederic Weisbecker
558fdf9c356SFrederic Weisbeckermenu "CPU/Task time and stats accounting"
559fdf9c356SFrederic Weisbecker
560fdf9c356SFrederic Weisbeckerconfig VIRT_CPU_ACCOUNTING
561c58b0df1SFrederic Weisbecker	bool
562fdf9c356SFrederic Weisbecker
563fdf9c356SFrederic Weisbeckerchoice
564fdf9c356SFrederic Weisbecker	prompt "Cputime accounting"
565fdf9c356SFrederic Weisbecker	default TICK_CPU_ACCOUNTING
566fdf9c356SFrederic Weisbecker
567fdf9c356SFrederic Weisbecker# Kind of a stub config for the pure tick based cputime accounting
568fdf9c356SFrederic Weisbeckerconfig TICK_CPU_ACCOUNTING
569abf917cdSFrederic Weisbecker	bool "Simple tick based cputime accounting"
570391dc69cSFrederic Weisbecker	depends on !S390 && !NO_HZ_FULL
571c58b0df1SFrederic Weisbecker	help
572abf917cdSFrederic Weisbecker	  This is the basic tick based cputime accounting that maintains
573391dc69cSFrederic Weisbecker	  statistics about user, system and idle time spent on per jiffies
574391dc69cSFrederic Weisbecker	  granularity.
575391dc69cSFrederic Weisbecker
576391dc69cSFrederic Weisbecker	  If unsure, say Y.
577391dc69cSFrederic Weisbecker
578391dc69cSFrederic Weisbeckerconfig VIRT_CPU_ACCOUNTING_NATIVE
579391dc69cSFrederic Weisbecker	bool "Deterministic task and CPU time accounting"
580391dc69cSFrederic Weisbecker	depends on HAVE_VIRT_CPU_ACCOUNTING && !NO_HZ_FULL
581391dc69cSFrederic Weisbecker	select VIRT_CPU_ACCOUNTING
582abf917cdSFrederic Weisbecker	help
583abf917cdSFrederic Weisbecker	  Select this option to enable more accurate task and CPU time
58424a9c541SFrederic Weisbecker	  accounting.  This is done by reading a CPU counter on each
585554b0004SKevin Hilman	  kernel entry and exit and on transitions within the kernel
586041a1574SArnd Bergmann	  between system, softirq and hardirq state, so there is a
587abf917cdSFrederic Weisbecker	  small performance impact.  In the case of s390 or IBM POWER > 5,
58824a9c541SFrederic Weisbecker	  this also enables accounting of stolen time on logically-partitioned
589abf917cdSFrederic Weisbecker	  systems.
590abf917cdSFrederic Weisbecker
591abf917cdSFrederic Weisbeckerconfig VIRT_CPU_ACCOUNTING_GEN
592abf917cdSFrederic Weisbecker	bool "Full dynticks CPU time accounting"
593abf917cdSFrederic Weisbecker	depends on HAVE_CONTEXT_TRACKING_USER
594abf917cdSFrederic Weisbecker	depends on HAVE_VIRT_CPU_ACCOUNTING_GEN
595abf917cdSFrederic Weisbecker	depends on GENERIC_CLOCKEVENTS
596abf917cdSFrederic Weisbecker	select VIRT_CPU_ACCOUNTING
597abf917cdSFrederic Weisbecker	select CONTEXT_TRACKING_USER
598abf917cdSFrederic Weisbecker	help
599abf917cdSFrederic Weisbecker	  Select this option to enable task and CPU time accounting on full
600abf917cdSFrederic Weisbecker	  dynticks systems. This accounting is implemented by watching every
601b58c3584SRik van Riel	  kernel-user boundaries using the context tracking subsystem.
602b58c3584SRik van Riel	  The accounting is thus performed at the expense of some significant
603fdf9c356SFrederic Weisbecker	  overhead.
604fdf9c356SFrederic Weisbecker
605b58c3584SRik van Riel	  For now this is only useful if you are working on the full
606fdf9c356SFrederic Weisbecker	  dynticks subsystem development.
607fdf9c356SFrederic Weisbecker
608fdf9c356SFrederic Weisbecker	  If unsure, say N.
609fdf9c356SFrederic Weisbecker
610fdf9c356SFrederic Weisbeckerendchoice
611fdf9c356SFrederic Weisbecker
612fdf9c356SFrederic Weisbeckerconfig IRQ_TIME_ACCOUNTING
613fdf9c356SFrederic Weisbecker	bool "Fine granularity task level IRQ time accounting"
61411d4afd4SVincent Guittot	depends on HAVE_IRQ_TIME_ACCOUNTING && !VIRT_CPU_ACCOUNTING_NATIVE
61511d4afd4SVincent Guittot	help
61611d4afd4SVincent Guittot	  Select this option to enable fine granularity task irq time
61711d4afd4SVincent Guittot	  accounting. This is done by reading a timestamp on each
61811d4afd4SVincent Guittot	  transitions between softirq and hardirq state, so there can be a
619d4dbc991SVincent Guittot	  small performance impact.
62098eb401dSValentin Schneider
621fcd7c9c3SValentin Schneider	  If in doubt, say N here.
622fcd7c9c3SValentin Schneider
62376504793SThara Gopinathconfig HAVE_SCHED_AVG_IRQ
62498eb401dSValentin Schneider	def_bool y
62598eb401dSValentin Schneider	depends on IRQ_TIME_ACCOUNTING || PARAVIRT_TIME_ACCOUNTING
626d4dbc991SVincent Guittot	depends on SMP
627d4dbc991SVincent Guittot
62898eb401dSValentin Schneiderconfig SCHED_HW_PRESSURE
629d4dbc991SVincent Guittot	bool
630d4dbc991SVincent Guittot	default y if ARM && ARM_CPU_TOPOLOGY
63198eb401dSValentin Schneider	default y if ARM64
63298eb401dSValentin Schneider	depends on SMP
63398eb401dSValentin Schneider	depends on CPU_FREQ_THERMAL
63498eb401dSValentin Schneider	help
63598eb401dSValentin Schneider	  Select this option to enable HW pressure accounting in the
636d4dbc991SVincent Guittot	  scheduler. HW pressure is the value conveyed to the scheduler
63776504793SThara Gopinath	  that reflects the reduction in CPU compute capacity resulted from
638391dc69cSFrederic Weisbecker	  HW throttling. HW throttling occurs when the performance of
63946329a9dSJeff Layton	  a CPU is capped due to high operating temperatures as an example.
6402813893fSIulia Manda
64146329a9dSJeff Layton	  If selected, the scheduler will be able to balance tasks accordingly,
642391dc69cSFrederic Weisbecker	  i.e. put less load on throttled CPUs than on non/less throttled ones.
643391dc69cSFrederic Weisbecker
644391dc69cSFrederic Weisbecker	  This requires the architecture to implement
645391dc69cSFrederic Weisbecker	  arch_update_hw_pressure() and arch_scale_thermal_pressure().
646391dc69cSFrederic Weisbecker
647391dc69cSFrederic Weisbeckerconfig BSD_PROCESS_ACCT
648391dc69cSFrederic Weisbecker	bool "BSD Process Accounting (DEPRECATED)"
649391dc69cSFrederic Weisbecker	depends on MULTIUSER
650391dc69cSFrederic Weisbecker	default n
65146329a9dSJeff Layton	help
65246329a9dSJeff Layton	  If you say Y here, a user level program will be able to instruct the
65346329a9dSJeff Layton	  kernel (via a special system call) to write process accounting
654391dc69cSFrederic Weisbecker	  information to a file: whenever a process exits, information about
655391dc69cSFrederic Weisbecker	  that process will be appended to the file by the kernel.  The
656391dc69cSFrederic Weisbecker	  information includes things such as creation time, owning user,
657391dc69cSFrederic Weisbecker	  command name, memory usage, controlling terminal etc. (the complete
658391dc69cSFrederic Weisbecker	  list is in the struct acct in <file:include/linux/acct.h>).  It is
659391dc69cSFrederic Weisbecker	  up to the user level program to do useful things with this
660391dc69cSFrederic Weisbecker	  information.  This mechanism is antiquated and has significant
661391dc69cSFrederic Weisbecker	  scalability issues.  You probably want to use eBPF instead.  Say
6623903bf94SRandy Dunlap	  N unless you really need this.
663391dc69cSFrederic Weisbecker
664391dc69cSFrederic Weisbeckerconfig BSD_PROCESS_ACCT_V3
665391dc69cSFrederic Weisbecker	bool "BSD Process Accounting version 3 file format"
666391dc69cSFrederic Weisbecker	depends on BSD_PROCESS_ACCT
667391dc69cSFrederic Weisbecker	default n
66819c92399SKees Cook	help
669391dc69cSFrederic Weisbecker	  If you say Y here, the process accounting information is written
6702813893fSIulia Manda	  in a new file format that also logs the process IDs of each
671391dc69cSFrederic Weisbecker	  process and its parent. Note that this file format is incompatible
672391dc69cSFrederic Weisbecker	  with previous v0/v1/v2 file formats, so you will need updated tools
673391dc69cSFrederic Weisbecker	  for processing it. A preliminary version of these tools is available
674391dc69cSFrederic Weisbecker	  at <http://www.gnu.org/software/acct/>.
675391dc69cSFrederic Weisbecker
676391dc69cSFrederic Weisbeckerconfig TASKSTATS
677391dc69cSFrederic Weisbecker	bool "Export task/process statistics through netlink"
678391dc69cSFrederic Weisbecker	depends on NET
679391dc69cSFrederic Weisbecker	depends on MULTIUSER
680391dc69cSFrederic Weisbecker	default n
681391dc69cSFrederic Weisbecker	help
68219c92399SKees Cook	  Export selected statistics for tasks/processes through the
683391dc69cSFrederic Weisbecker	  generic netlink interface. Unlike BSD process accounting, the
684f6db8347SNaveen N. Rao	  statistics are available during the lifetime of tasks/processes as
685391dc69cSFrederic Weisbecker	  responses to commands. Like BSD accounting, they are sent to user
686391dc69cSFrederic Weisbecker	  space on task exit.
687391dc69cSFrederic Weisbecker
688391dc69cSFrederic Weisbecker	  Say N if unsure.
689391dc69cSFrederic Weisbecker
690391dc69cSFrederic Weisbeckerconfig TASK_DELAY_ACCT
691391dc69cSFrederic Weisbecker	bool "Enable per-task delay accounting"
692391dc69cSFrederic Weisbecker	depends on TASKSTATS
693391dc69cSFrederic Weisbecker	select SCHED_INFO
69419c92399SKees Cook	help
695391dc69cSFrederic Weisbecker	  Collect information on time spent by a task waiting for system
696391dc69cSFrederic Weisbecker	  resources like cpu, synchronous block I/O completion and swapping
697391dc69cSFrederic Weisbecker	  in pages. Such statistics can help in setting a task's priorities
698391dc69cSFrederic Weisbecker	  relative to other tasks for cpu, io, rss limits etc.
699391dc69cSFrederic Weisbecker
700391dc69cSFrederic Weisbecker	  Say N if unsure.
701391dc69cSFrederic Weisbecker
702391dc69cSFrederic Weisbeckerconfig TASK_XACCT
70319c92399SKees Cook	bool "Enable extended accounting over taskstats"
704391dc69cSFrederic Weisbecker	depends on TASKSTATS
705391dc69cSFrederic Weisbecker	help
706391dc69cSFrederic Weisbecker	  Collect extended task accounting data and send the data
707391dc69cSFrederic Weisbecker	  to userland for processing over the taskstats interface.
708391dc69cSFrederic Weisbecker
709391dc69cSFrederic Weisbecker	  Say N if unsure.
710391dc69cSFrederic Weisbecker
711eb414681SJohannes Weinerconfig TASK_IO_ACCOUNTING
712eb414681SJohannes Weiner	bool "Enable per-task storage I/O accounting"
71398dfdd9eSRandy Dunlap	depends on TASK_XACCT
714eb414681SJohannes Weiner	help
715eb414681SJohannes Weiner	  Collect information on the number of bytes of storage I/O which this
716eb414681SJohannes Weiner	  task has caused.
717eb414681SJohannes Weiner
718eb414681SJohannes Weiner	  Say N if unsure.
719eb414681SJohannes Weiner
720eb414681SJohannes Weinerconfig PSI
721eb414681SJohannes Weiner	bool "Pressure stall information tracking"
722eb414681SJohannes Weiner	select KERNFS
7232ce7135aSJohannes Weiner	help
7242ce7135aSJohannes Weiner	  Collect metrics that indicate how overcommitted the CPU, memory,
7252ce7135aSJohannes Weiner	  and IO capacity are in the system.
7262ce7135aSJohannes Weiner
727c3123552SMauro Carvalho Chehab	  If you say Y here, the kernel will create /proc/pressure/ with the
728eb414681SJohannes Weiner	  pressure statistics files cpu, memory, and io. These will indicate
729eb414681SJohannes Weiner	  the share of walltime in which some or all tasks in the system are
730eb414681SJohannes Weiner	  delayed due to contention of the respective resource.
731e0c27447SJohannes Weiner
732e0c27447SJohannes Weiner	  In kernels with cgroup support, cgroups (cgroup2 only) will
733e0c27447SJohannes Weiner	  have cpu.pressure, memory.pressure, and io.pressure files,
734e0c27447SJohannes Weiner	  which aggregate pressure stalls for the grouped tasks only.
735e0c27447SJohannes Weiner
736e0c27447SJohannes Weiner	  For more details see Documentation/accounting/psi.rst.
737428a1cb4SBaruch Siach
738428a1cb4SBaruch Siach	  Say N if unsure.
739e0c27447SJohannes Weiner
7407b2489d3SJohannes Weinerconfig PSI_DEFAULT_DISABLED
7417b2489d3SJohannes Weiner	bool "Require boot parameter to enable pressure stall information tracking"
7427b2489d3SJohannes Weiner	default n
7437b2489d3SJohannes Weiner	depends on PSI
7447b2489d3SJohannes Weiner	help
7457b2489d3SJohannes Weiner	  If set, pressure stall information tracking will be disabled
7467b2489d3SJohannes Weiner	  per default but can be enabled through passing psi=1 on the
7477b2489d3SJohannes Weiner	  kernel commandline during boot.
7487b2489d3SJohannes Weiner
7497b2489d3SJohannes Weiner	  This feature adds some code to the task wakeup and sleep
7507b2489d3SJohannes Weiner	  paths of the scheduler. The overhead is too low to affect
751391dc69cSFrederic Weisbecker	  common scheduling-intense workloads in practice (such as
752391dc69cSFrederic Weisbecker	  webservers, memcache), but it does show up in artificial
7535c4991e2SFrederic Weisbecker	  scheduler stress tests, such as hackbench.
7545c4991e2SFrederic Weisbecker
75597577684SOleg Nesterov	  If you are paranoid and not sure what the kernel will be
7562c43838cSFrederic Weisbecker	  used for, say Y.
7575c4991e2SFrederic Weisbecker
7585c4991e2SFrederic Weisbecker	  Say N if unsure.
7595c4991e2SFrederic Weisbecker
7602c43838cSFrederic Weisbeckerendmenu # "CPU/Task time and stats accounting"
7612c43838cSFrederic Weisbecker
7622c43838cSFrederic Weisbeckerconfig CPU_ISOLATION
7632c43838cSFrederic Weisbecker	bool "CPU isolation"
7645c4991e2SFrederic Weisbecker	depends on SMP
7650af92d46SPaul E. McKenney	default y
766c903ff83SMike Travis	help
7671da177e4SLinus Torvalds	  Make sure that CPUs running critical tasks are not disturbed by
768f2443ab6SRoss Biro	  any source of "noise" such as unbound workqueues, timers, kthreads...
769a7f7f624SMasahiro Yamada	  Unbound jobs get offloaded to housekeeping CPUs. This is driven by
7701da177e4SLinus Torvalds	  the "isolcpus=" boot parameter.
7711da177e4SLinus Torvalds
7721da177e4SLinus Torvalds	  Say Y if unsure.
7731da177e4SLinus Torvalds
7741da177e4SLinus Torvaldssource "kernel/rcu/Kconfig"
7751da177e4SLinus Torvalds
7761da177e4SLinus Torvaldsconfig IKCONFIG
7771da177e4SLinus Torvalds	tristate "Kernel .config support"
7781da177e4SLinus Torvalds	help
7791da177e4SLinus Torvalds	  This option enables the complete Linux kernel ".config" file
7801da177e4SLinus Torvalds	  contents to be saved in the kernel. It provides documentation
7811da177e4SLinus Torvalds	  of which kernel options are used in a running kernel or in an
782a7f7f624SMasahiro Yamada	  on-disk kernel.  This information can be extracted from the kernel
7831da177e4SLinus Torvalds	  image file with the script scripts/extract-ikconfig and used as
7841da177e4SLinus Torvalds	  input to rebuild the current kernel or to build another kernel.
7851da177e4SLinus Torvalds	  It can also be extracted from a running kernel by reading
786f7b101d3SJoel Fernandes (Google)	  /proc/config.gz if enabled (below).
787f7b101d3SJoel Fernandes (Google)
788f7b101d3SJoel Fernandes (Google)config IKCONFIG_PROC
78943d8ce9dSJoel Fernandes (Google)	bool "Enable access to .config through /proc/config.gz"
790f7b101d3SJoel Fernandes (Google)	depends on IKCONFIG && PROC_FS
791f7b101d3SJoel Fernandes (Google)	help
792f7b101d3SJoel Fernandes (Google)	  This option enables access to the kernel configuration file
793f7b101d3SJoel Fernandes (Google)	  through /proc/config.gz.
79443d8ce9dSJoel Fernandes (Google)
795794543a2SAlistair John Strachanconfig IKHEADERS
796794543a2SAlistair John Strachan	tristate "Enable kernel headers through /sys/kernel/kheaders.tar.xz"
7971c4b5ecbSChristoph Hellwig	depends on SYSFS
798f17a32e9SAdrian Bunk	help
799361e9dfbSJosh Triplett	  This option enables access to the in-kernel headers that are generated during
800794543a2SAlistair John Strachan	  the build process. These can be used to build eBPF tracing programs,
80123b2899fSLuis R. Rodriguez	  or similar programs.  If you build the headers as a module, a module called
80223b2899fSLuis R. Rodriguez	  kheaders.ko is built which can be loaded on-demand to get access to headers.
80323b2899fSLuis R. Rodriguez
80423b2899fSLuis R. Rodriguezconfig LOG_BUF_SHIFT
80523b2899fSLuis R. Rodriguez	int "Kernel log buffer size (16 => 64KB, 17 => 128KB)"
806f17a32e9SAdrian Bunk	range 12 25
807f17a32e9SAdrian Bunk	default 17
808f17a32e9SAdrian Bunk	depends on PRINTK
809f17a32e9SAdrian Bunk	help
810f17a32e9SAdrian Bunk	  Select the minimal kernel log buffer size as a power of 2.
811794543a2SAlistair John Strachan	  The final size is affected by LOG_CPU_MAX_BUF_SHIFT config
812794543a2SAlistair John Strachan	  parameter, see below. Any higher size also might be forced
813794543a2SAlistair John Strachan	  by "log_buf_len" boot parameter.
81423b2899fSLuis R. Rodriguez
81523b2899fSLuis R. Rodriguez	  Examples:
8162240a31dSGeert Uytterhoeven		     17 => 128 KB
81723b2899fSLuis R. Rodriguez		     16 => 64 KB
81823b2899fSLuis R. Rodriguez		     15 => 32 KB
819320bf431SYoann Congal		     14 => 16 KB
820361e9dfbSJosh Triplett		     13 =>  8 KB
82123b2899fSLuis R. Rodriguez		     12 =>  4 KB
82223b2899fSLuis R. Rodriguez
82323b2899fSLuis R. Rodriguezconfig LOG_CPU_MAX_BUF_SHIFT
82423b2899fSLuis R. Rodriguez	int "CPU kernel log buffer size contribution (13 => 8 KB, 17 => 128KB)"
82523b2899fSLuis R. Rodriguez	depends on SMP
82623b2899fSLuis R. Rodriguez	range 0 21
82723b2899fSLuis R. Rodriguez	default 0 if BASE_SMALL
82823b2899fSLuis R. Rodriguez	default 12
82923b2899fSLuis R. Rodriguez	depends on PRINTK
83023b2899fSLuis R. Rodriguez	help
83123b2899fSLuis R. Rodriguez	  This option allows to increase the default ring buffer size
83223b2899fSLuis R. Rodriguez	  according to the number of CPUs. The value defines the contribution
8330f7636e1SPaul Menzel	  of each CPU as a power of 2. The used space is typically only few
83423b2899fSLuis R. Rodriguez	  lines however it might be much more when problems are reported,
83523b2899fSLuis R. Rodriguez	  e.g. backtraces.
83623b2899fSLuis R. Rodriguez
83723b2899fSLuis R. Rodriguez	  The increased size means that a new buffer has to be allocated and
83823b2899fSLuis R. Rodriguez	  the original static one is unused. It makes sense only on systems
8395e0d8d59SGeert Uytterhoeven	  with more CPUs. Therefore this value is used only when the sum of
8405e0d8d59SGeert Uytterhoeven	  contributions is greater than the half of the default kernel ring
84123b2899fSLuis R. Rodriguez	  buffer as defined by LOG_BUF_SHIFT. The default values are set
84223b2899fSLuis R. Rodriguez	  so that more than 16 CPUs are needed to trigger the allocation.
84323b2899fSLuis R. Rodriguez
84423b2899fSLuis R. Rodriguez	  Also this option is ignored when "log_buf_len" kernel parameter is
84523b2899fSLuis R. Rodriguez	  used as it forces an exact (power of two) size of the ring buffer.
84623b2899fSLuis R. Rodriguez
84723b2899fSLuis R. Rodriguez	  The number of possible CPUs is used for this computation ignoring
84823b2899fSLuis R. Rodriguez	  hotplugging making the computation optimal for the worst case
84923b2899fSLuis R. Rodriguez	  scenario while allowing a simple algorithm to be used from bootup.
85033701557SChris Down
85133701557SChris Down	  Examples shift values and their meaning:
85233701557SChris Down		     17 => 128 KB for each CPU
85333701557SChris Down		     16 =>  64 KB for each CPU
85433701557SChris Down		     15 =>  32 KB for each CPU
85533701557SChris Down		     14 =>  16 KB for each CPU
85633701557SChris Down		     13 =>   8 KB for each CPU
85733701557SChris Down		     12 =>   4 KB for each CPU
85833701557SChris Down
85933701557SChris Downconfig PRINTK_INDEX
86033701557SChris Down	bool "Printk indexing debugfs interface"
86133701557SChris Down	depends on PRINTK && DEBUG_FS
86233701557SChris Down	help
86333701557SChris Down	  Add support for indexing of all printk formats known at compile time
8645cdc38f9SKAMEZAWA Hiroyuki	  at <debugfs>/printk/index/<module>.
8655cdc38f9SKAMEZAWA Hiroyuki
8665cdc38f9SKAMEZAWA Hiroyuki	  This can be used as part of maintaining daemons which monitor
8675cdc38f9SKAMEZAWA Hiroyuki	  /dev/kmsg, as it permits auditing the printk formats present in a
8685cdc38f9SKAMEZAWA Hiroyuki	  kernel, allowing detection of cases where monitored printks are
8695cdc38f9SKAMEZAWA Hiroyuki	  changed or no longer present.
87038ff87f7SStephen Boyd
87138ff87f7SStephen Boyd	  There is no additional runtime cost to printk with this enabled.
87238ff87f7SStephen Boyd
87369842cbaSPatrick Bellasi#
87469842cbaSPatrick Bellasi# Architectures with an unreliable sched_clock() should select this:
87569842cbaSPatrick Bellasi#
87669842cbaSPatrick Bellasiconfig HAVE_UNSTABLE_SCHED_CLOCK
87769842cbaSPatrick Bellasi	bool
87869842cbaSPatrick Bellasi
87969842cbaSPatrick Bellasiconfig GENERIC_SCHED_CLOCK
88069842cbaSPatrick Bellasi	bool
88169842cbaSPatrick Bellasi
88269842cbaSPatrick Bellasimenu "Scheduler features"
88369842cbaSPatrick Bellasi
88469842cbaSPatrick Bellasiconfig UCLAMP_TASK
88569842cbaSPatrick Bellasi	bool "Enable utilization clamping for RT/FAIR tasks"
88669842cbaSPatrick Bellasi	depends on CPU_FREQ_GOV_SCHEDUTIL
88769842cbaSPatrick Bellasi	help
88869842cbaSPatrick Bellasi	  This feature enables the scheduler to track the clamped utilization
88969842cbaSPatrick Bellasi	  of each CPU based on RUNNABLE tasks scheduled on that CPU.
89069842cbaSPatrick Bellasi
89169842cbaSPatrick Bellasi	  With this option, the user can specify the min and max CPU
89269842cbaSPatrick Bellasi	  utilization allowed for RUNNABLE tasks. The max utilization defines
89369842cbaSPatrick Bellasi	  the maximum frequency a task should use while the min utilization
89469842cbaSPatrick Bellasi	  defines the minimum frequency it should use.
89569842cbaSPatrick Bellasi
89669842cbaSPatrick Bellasi	  Both min and max utilization clamp values are hints to the scheduler,
89769842cbaSPatrick Bellasi	  aiming at improving its frequency selection policy, but they do not
89869842cbaSPatrick Bellasi	  enforce or grant any specific bandwidth for tasks.
89969842cbaSPatrick Bellasi
90069842cbaSPatrick Bellasi	  If in doubt, say N.
90169842cbaSPatrick Bellasi
90269842cbaSPatrick Bellasiconfig UCLAMP_BUCKETS_COUNT
90369842cbaSPatrick Bellasi	int "Number of supported utilization clamp buckets"
90469842cbaSPatrick Bellasi	range 5 20
90569842cbaSPatrick Bellasi	default 5
90669842cbaSPatrick Bellasi	depends on UCLAMP_TASK
90769842cbaSPatrick Bellasi	help
90869842cbaSPatrick Bellasi	  Defines the number of clamp buckets to use. The range of each bucket
90969842cbaSPatrick Bellasi	  will be SCHED_CAPACITY_SCALE/UCLAMP_BUCKETS_COUNT. The higher the
91069842cbaSPatrick Bellasi	  number of clamp buckets the finer their granularity and the higher
91169842cbaSPatrick Bellasi	  the precision of clamping aggregation and tracking at run-time.
91269842cbaSPatrick Bellasi
91369842cbaSPatrick Bellasi	  For example, with the minimum configuration value we will have 5
91469842cbaSPatrick Bellasi	  clamp buckets tracking 20% utilization each. A 25% boosted tasks will
91569842cbaSPatrick Bellasi	  be refcounted in the [20..39]% bucket and will set the bucket clamp
91669842cbaSPatrick Bellasi	  effective value to 25%.
91769842cbaSPatrick Bellasi	  If a second 30% boosted task should be co-scheduled on the same CPU,
91869842cbaSPatrick Bellasi	  that task will be refcounted in the same bucket of the first task and
91969842cbaSPatrick Bellasi	  it will boost the bucket clamp effective value to 30%.
92069842cbaSPatrick Bellasi	  The clamp effective value of a bucket is reset to its nominal value
92169842cbaSPatrick Bellasi	  (20% in the example above) when there are no more tasks refcounted in
92269842cbaSPatrick Bellasi	  that bucket.
92369842cbaSPatrick Bellasi
92425c411fcSJohn Stultz	  An additional boost/capping margin can be added to some tasks. In the
92525c411fcSJohn Stultz	  example above the 25% task will be boosted to 30% until it exits the
92625c411fcSJohn Stultz	  CPU. If that should be considered not acceptable on certain systems,
92725c411fcSJohn Stultz	  it's always possible to reduce the margin by increasing the number of
92825c411fcSJohn Stultz	  clamp buckets to trade off used memory for run-time tracking
92925c411fcSJohn Stultz	  precision.
93025c411fcSJohn Stultz
93125c411fcSJohn Stultz	  If in doubt, use the default value.
93225c411fcSJohn Stultz
93325c411fcSJohn Stultzconfig SCHED_PROXY_EXEC
93425c411fcSJohn Stultz	bool "Proxy Execution"
93525c411fcSJohn Stultz	# Avoid some build failures w/ PREEMPT_RT until it can be fixed
93669842cbaSPatrick Bellasi	depends on !PREEMPT_RT
93769842cbaSPatrick Bellasi	# Need to investigate how to inform sched_ext of split contexts
938be3a7284SAndrea Arcangeli	depends on !SCHED_CLASS_EXT
939be3a7284SAndrea Arcangeli	# Not particularly useful until we get to multi-rq proxying
940be3a7284SAndrea Arcangeli	depends on EXPERT
941be3a7284SAndrea Arcangeli	help
942be3a7284SAndrea Arcangeli	  This option enables proxy execution, a mechanism for mutex-owning
943be3a7284SAndrea Arcangeli	  tasks to inherit the scheduling context of higher priority waiters.
944be3a7284SAndrea Arcangeli
945be5e610cSPeter Zijlstraendmenu
94672b252aeSMel Gorman
94772b252aeSMel Gorman#
94872b252aeSMel Gorman# For architectures that want to enable the support for NUMA-affine scheduler
94972b252aeSMel Gorman# balancing logic:
95072b252aeSMel Gorman#
95172b252aeSMel Gormanconfig ARCH_SUPPORTS_NUMA_BALANCING
95272b252aeSMel Gorman	bool
95372b252aeSMel Gorman
95472b252aeSMel Gorman#
955c12d3362SArd Biesheuvel# For architectures that prefer to flush all TLBs after a number of pages
9563a7c7331SMasahiro Yamada# are unmapped instead of sending one IPI per page to flush. The architecture
957c12d3362SArd Biesheuvel# must provide guarantees on what happens if a clean TLB cache entry is
958dee2b702SGustavo A. R. Silva# written after the unmap. Details are in mm/rmap.c near the check for
959dee2b702SGustavo A. R. Silva# should_defer_flush. The architecture should also consider if the full flush
960158ea2d2SGustavo A. R. Silva# and the refill costs are offset by the savings of sending fewer IPIs.
961dee2b702SGustavo A. R. Silvaconfig ARCH_WANT_BATCHED_UNMAP_TLB_FLUSH
962dee2b702SGustavo A. R. Silva	bool
9633e00f580SKees Cook
9640da6e5fdSLinus Torvaldsconfig CC_HAS_INT128
9653e00f580SKees Cook	def_bool !$(cc-option,$(m64-flag) -D__SIZEOF_INT128__=0) && 64BIT
9665a41237aSLinus Torvalds
9675a41237aSLinus Torvaldsconfig CC_IMPLICIT_FALLTHROUGH
968f0be87c4SLinus Torvalds	string
969f0be87c4SLinus Torvalds	default "-Wimplicit-fallthrough=5" if CC_IS_GCC && $(cc-option,-Wimplicit-fallthrough=5)
9708e5bd4eaSYury Norov	default "-Wimplicit-fallthrough" if CC_IS_CLANG && $(cc-option,-Wunreachable-code-fallthrough)
971f0be87c4SLinus Torvalds
97202153319SLinus Torvaldsconfig CC_MS_EXTENSIONS
97302153319SLinus Torvalds	string
974a5e0ace0SGustavo A. R. Silva	default "-fms-anonymous-structs" if $(cc-option,-fms-anonymous-structs)
975a5e0ace0SGustavo A. R. Silva	default "-fms-extensions"
976a5e0ace0SGustavo A. R. Silva
977a5e0ace0SGustavo A. R. Silva# Currently, disable gcc-10+ array-bounds globally.
97802153319SLinus Torvalds# It's still broken in gcc-13, so no upper bound yet.
979a5e0ace0SGustavo A. R. Silvaconfig GCC10_NO_ARRAY_BOUNDS
980a5e0ace0SGustavo A. R. Silva	def_bool y
981a5e0ace0SGustavo A. R. Silva
982a5e0ace0SGustavo A. R. Silvaconfig CC_NO_ARRAY_BOUNDS
983a5e0ace0SGustavo A. R. Silva	bool
98472b252aeSMel Gorman	default y if CC_IS_GCC && GCC_VERSION >= 90000 && GCC10_NO_ARRAY_BOUNDS
985be5e610cSPeter Zijlstra
986be5e610cSPeter Zijlstra# Currently, disable -Wstringop-overflow for GCC globally.
987be5e610cSPeter Zijlstraconfig GCC_NO_STRINGOP_OVERFLOW
988be5e610cSPeter Zijlstra	def_bool y
989be5e610cSPeter Zijlstra
990be3a7284SAndrea Arcangeliconfig CC_NO_STRINGOP_OVERFLOW
991be3a7284SAndrea Arcangeli	bool
992be3a7284SAndrea Arcangeli	default y if CC_IS_GCC && GCC_NO_STRINGOP_OVERFLOW
993be3a7284SAndrea Arcangeli
994be3a7284SAndrea Arcangeliconfig CC_STRINGOP_OVERFLOW
995be3a7284SAndrea Arcangeli	bool
996be3a7284SAndrea Arcangeli	default y if CC_IS_GCC && !CC_NO_STRINGOP_OVERFLOW
997be3a7284SAndrea Arcangeli
998be3a7284SAndrea Arcangeli#
999be3a7284SAndrea Arcangeli# For architectures that know their GCC __int128 support is sound
1000554b0f3cSSebastian Andrzej Siewior#
1001be3a7284SAndrea Arcangeliconfig ARCH_SUPPORTS_INT128
1002be3a7284SAndrea Arcangeli	bool
1003be3a7284SAndrea Arcangeli
10046d56a410SPaul Gortmaker# For architectures that (ab)use NUMA to represent different memory regions
1005be3a7284SAndrea Arcangeli# all cpu-local but of different latencies, such as SuperH.
1006be3a7284SAndrea Arcangeli#
1007be3a7284SAndrea Arcangeliconfig ARCH_WANT_NUMA_VARIABLE_LOCALITY
10086f7c97e8SAneesh Kumar K.V	bool
10096f7c97e8SAneesh Kumar K.V
10106f7c97e8SAneesh Kumar K.Vconfig NUMA_BALANCING
10116f7c97e8SAneesh Kumar K.V	bool "Memory placement aware NUMA scheduler"
10126f7c97e8SAneesh Kumar K.V	depends on ARCH_SUPPORTS_NUMA_BALANCING
10136f7c97e8SAneesh Kumar K.V	depends on !ARCH_WANT_NUMA_VARIABLE_LOCALITY
10146f7c97e8SAneesh Kumar K.V	depends on SMP && NUMA_MIGRATION && !PREEMPT_RT
10156f7c97e8SAneesh Kumar K.V	help
101621c690a3SSuren Baghdasaryan	  This option adds support for automatic NUMA aware memory/task placement.
101721c690a3SSuren Baghdasaryan	  The mechanism is quite primitive and is based on migrating memory when
101821c690a3SSuren Baghdasaryan	  it has references to the node the task is running on.
101923964d2dSLi Zefan
10206341e62bSChristoph Jaeger	  This system will be inactive on UMA systems.
10212bd59d48STejun Heo
1022ddbcc7e8SPaul Menageconfig NUMA_BALANCING_DEFAULT_ENABLED
102323964d2dSLi Zefan	bool "Automatically enable NUMA aware memory/task placement"
10245cdc38f9SKAMEZAWA Hiroyuki	default y
10255cdc38f9SKAMEZAWA Hiroyuki	depends on NUMA_BALANCING
10265cdc38f9SKAMEZAWA Hiroyuki	help
1027d6a3b247SMauro Carvalho Chehab	  If set, automatic NUMA balancing will be enabled if running on a NUMA
1028da82c92fSMauro Carvalho Chehab	  machine.
102945ce80fbSLi Zefan
1030ddbcc7e8SPaul Menageconfig SLAB_OBJ_EXT
1031ddbcc7e8SPaul Menage	bool
1032ddbcc7e8SPaul Menage
103323964d2dSLi Zefanmenuconfig CGROUPS
103423964d2dSLi Zefan	bool "Control Group support"
10353e32cb2eSJohannes Weiner	select KERNFS
10363e32cb2eSJohannes Weiner	help
10373e32cb2eSJohannes Weiner	  This option adds support for grouping sets of processes together, for
10386a010a49STejun Heo	  use with process control subsystems such as Cpusets, CFS, memory
10396a010a49STejun Heo	  controls or device isolation.
10406a010a49STejun Heo	  See
10416a010a49STejun Heo		- Documentation/scheduler/sched-design-CFS.rst	(CFS)
10426a010a49STejun Heo		- Documentation/admin-guide/cgroup-v1/ (features for grouping, isolation
10436a010a49STejun Heo					  and resource control)
10446a010a49STejun Heo
10456a010a49STejun Heo	  Say N if unsure.
10466a010a49STejun Heo
10476a010a49STejun Heoif CGROUPS
1048c255a458SAndrew Morton
1049a0166ec4SJohannes Weinerconfig PAGE_COUNTER
10503e32cb2eSJohannes Weiner	bool
105179bd9814STejun Heo
105221c690a3SSuren Baghdasaryanconfig CGROUP_FAVOR_DYNMODS
1053fdc5001bSKirill A. Shutemov        bool "Favor dynamic modification latency reduction by default"
105400f0b825SBalbir Singh        help
1055a0166ec4SJohannes Weiner          This option enables the "favordynmods" mount option by default
105600f0b825SBalbir Singh          which reduces the latencies of dynamic cgroup modifications such
105725352d2fSShakeel Butt          as task migrations and controller on/offs at the cost of making
105825352d2fSShakeel Butt          hot path operations such as forks and exits more expensive.
105925352d2fSShakeel Butt
106025352d2fSShakeel Butt          Say N if unsure.
106125352d2fSShakeel Butt
106225352d2fSShakeel Buttconfig MEMCG
106325352d2fSShakeel Butt	bool "Memory controller"
1064940b01fcSShakeel Butt	select PAGE_COUNTER
1065940b01fcSShakeel Butt	select EVENTFD
1066940b01fcSShakeel Butt	select SLAB_OBJ_EXT
1067940b01fcSShakeel Butt	select VM_EVENT_COUNTERS
1068940b01fcSShakeel Butt	help
1069940b01fcSShakeel Butt	  Provides control over the memory footprint of tasks in a cgroup.
1070940b01fcSShakeel Butt
1071e93d4166SRoman Gushchinconfig MEMCG_NMI_UNSAFE
1072e93d4166SRoman Gushchin	bool
1073c9929f0eSVlastimil Babka	depends on MEMCG
1074e93d4166SRoman Gushchin	depends on HAVE_NMI
1075e93d4166SRoman Gushchin	depends on !ARCH_HAS_NMI_SAFE_THIS_CPU_OPS && !ARCH_HAVE_NMI_SAFE_CMPXCHG
1076e93d4166SRoman Gushchin	default y
1077e93d4166SRoman Gushchin
1078e93d4166SRoman Gushchinconfig MEMCG_NMI_SAFETY_REQUIRES_ATOMIC
1079e93d4166SRoman Gushchin	bool
1080e93d4166SRoman Gushchin	depends on MEMCG
1081e93d4166SRoman Gushchin	depends on HAVE_NMI
1082e93d4166SRoman Gushchin	depends on !ARCH_HAS_NMI_SAFE_THIS_CPU_OPS && ARCH_HAVE_NMI_SAFE_CMPXCHG
1083e93d4166SRoman Gushchin	default y
1084e93d4166SRoman Gushchin
1085e93d4166SRoman Gushchinconfig MEMCG_V1
1086fcb4824bSValdis Kletnieks	bool "Legacy cgroup v1 memory controller"
108784c07d11SKirill Tkhai	depends on MEMCG
10886bf024e6SJohannes Weiner	default n
10896bf024e6SJohannes Weiner	help
10906bf024e6SJohannes Weiner	  Legacy cgroup v1 memory controller which has been deprecated by
10912bc64a20SAneesh Kumar K.V	  cgroup v2 implementation. The v1 is there for legacy applications
1092a7f7f624SMasahiro Yamada	  which haven't migrated to the new cgroup v2 interface yet. If you
10936bf024e6SJohannes Weiner	  do not have any such application then you are completely fine leaving
10946bf024e6SJohannes Weiner	  this option disabled.
10956bf024e6SJohannes Weiner
10962bc64a20SAneesh Kumar K.V	  Please note that feature set of the legacy memory controller is likely
10976bf024e6SJohannes Weiner	  going to shrink due to deprecation process. New deployments with v1
10986bf024e6SJohannes Weiner	  controller are highly discouraged.
10996bf024e6SJohannes Weiner
11006bf024e6SJohannes Weiner	  Say N if unsure.
1101e5d1367fSStephane Eranian
11026bf024e6SJohannes Weinerconfig BLK_CGROUP
11036bf024e6SJohannes Weiner	bool "IO controller"
11046bf024e6SJohannes Weiner	depends on BLOCK
11057baf2199SKrzysztof Kozlowski	default n
11066bf024e6SJohannes Weiner	help
11076bf024e6SJohannes Weiner	Generic block IO controller cgroup interface. This is the common
1108da82c92fSMauro Carvalho Chehab	cgroup interface which should be used by various IO controlling
11096bf024e6SJohannes Weiner	policies.
11106bf024e6SJohannes Weiner
11116bf024e6SJohannes Weiner	Currently, CFQ IO scheduler uses it to recognize task groups and
11126bf024e6SJohannes Weiner	control disk bandwidth allocation (proportional time slice allocation)
11136bf024e6SJohannes Weiner	to such task groups. It is also used by bio throttling logic in
1114e5d1367fSStephane Eranian	block layer to implement upper limit in IO rates on a device.
11157c941438SDhaval Giani
1116a0166ec4SJohannes Weiner	This option only enables generic Block IO controller infrastructure.
11177c941438SDhaval Giani	One needs to also enable actual IO controlling logic/policy. For
11187c941438SDhaval Giani	enabling proportional weight division of disk bandwidth in CFQ, set
11197c941438SDhaval Giani	CONFIG_BFQ_GROUP_IOSCHED=y; for enabling throttling policy, set
11207c941438SDhaval Giani	CONFIG_BLK_DEV_THROTTLING=y.
11217c941438SDhaval Giani
11227c941438SDhaval Giani	See Documentation/admin-guide/cgroup-v1/blkio-controller.rst for more information.
11237c941438SDhaval Giani
1124e179e80cSTejun Heoconfig CGROUP_WRITEBACK
1125e179e80cSTejun Heo	bool
1126e179e80cSTejun Heo	depends on MEMCG && BLK_CGROUP
1127ddceadceSTejun Heo	default y
1128ddceadceSTejun Heo
1129ddceadceSTejun Heomenuconfig CGROUP_SCHED
11307c941438SDhaval Giani	bool "CPU controller"
11317c941438SDhaval Giani	default n
11327c941438SDhaval Giani	help
1133e179e80cSTejun Heo	  This feature lets CPU scheduler recognize task groups and control CPU
11347c941438SDhaval Giani	  bandwidth allocation to such task groups. It uses cgroups to group
11357c941438SDhaval Giani	  tasks.
1136ab84d31eSPaul Turner
1137ab84d31eSPaul Turnerif CGROUP_SCHED
1138ab84d31eSPaul Turnerconfig GROUP_SCHED_WEIGHT
1139ddceadceSTejun Heo	def_bool n
1140ab84d31eSPaul Turner
1141ab84d31eSPaul Turnerconfig GROUP_SCHED_BANDWIDTH
1142ab84d31eSPaul Turner        def_bool n
1143ab84d31eSPaul Turner
1144ab84d31eSPaul Turnerconfig FAIR_GROUP_SCHED
1145ab84d31eSPaul Turner	bool "Group scheduling for SCHED_OTHER"
1146d6a3b247SMauro Carvalho Chehab	depends on CGROUP_SCHED
1147ab84d31eSPaul Turner	select GROUP_SCHED_WEIGHT
11487c941438SDhaval Giani	default CGROUP_SCHED
11497c941438SDhaval Giani
11507c941438SDhaval Gianiconfig CFS_BANDWIDTH
11517c941438SDhaval Giani	bool "CPU bandwidth provisioning for FAIR_GROUP_SCHED"
11527c941438SDhaval Giani	depends on FAIR_GROUP_SCHED
11537c941438SDhaval Giani	select GROUP_SCHED_BANDWIDTH
115432bd7eb5SLi Zefan	default n
11557c941438SDhaval Giani	help
11567c941438SDhaval Giani	  This option allows users to define CPU bandwidth rates (limits) for
1157d6a3b247SMauro Carvalho Chehab	  tasks running within the fair group scheduler.  Groups with no limit
11587c941438SDhaval Giani	  set are considered to be unconstrained and will run with no
1159e34e0131SMichal Koutný	  restriction.
1160e34e0131SMichal Koutný	  See Documentation/scheduler/sched-bwc.rst for more information.
1161e34e0131SMichal Koutný
1162e34e0131SMichal Koutnýconfig RT_GROUP_SCHED
1163e34e0131SMichal Koutný	bool "Group scheduling for SCHED_RR/FIFO"
1164e34e0131SMichal Koutný	depends on CGROUP_SCHED
1165e34e0131SMichal Koutný	default n
1166e34e0131SMichal Koutný	help
1167e34e0131SMichal Koutný	  This feature lets you explicitly allocate real CPU bandwidth
1168e34e0131SMichal Koutný	  to task groups. If enabled, it will also make it impossible to
1169e34e0131SMichal Koutný	  schedule realtime tasks for non-root users until you allocate
117081951366STejun Heo	  realtime bandwidth for them.
117181951366STejun Heo	  See Documentation/scheduler/sched-rt-group.rst for more information.
117281951366STejun Heo
117381951366STejun Heoconfig RT_GROUP_SCHED_DEFAULT_DISABLED
1174ddceadceSTejun Heo	bool "Require boot parameter to enable group scheduling for SCHED_RR/FIFO"
117581951366STejun Heo	depends on RT_GROUP_SCHED
117681951366STejun Heo	default n
11777c941438SDhaval Giani	help
11787c941438SDhaval Giani	  When set, the RT group scheduling is disabled by default. The option
1179af7f588dSMathieu Desnoyers	  is in inverted form so that mere RT_GROUP_SCHED enables the group
1180af7f588dSMathieu Desnoyers	  scheduling.
1181af7f588dSMathieu Desnoyers
1182af7f588dSMathieu Desnoyers	  Say N if unsure.
11832480c093SPatrick Bellasi
11842480c093SPatrick Bellasiconfig EXT_GROUP_SCHED
11852480c093SPatrick Bellasi	bool
11862480c093SPatrick Bellasi	depends on SCHED_CLASS_EXT && CGROUP_SCHED
11872480c093SPatrick Bellasi	select GROUP_SCHED_WEIGHT
11882480c093SPatrick Bellasi	select GROUP_SCHED_BANDWIDTH
11892480c093SPatrick Bellasi	default y
11902480c093SPatrick Bellasi
11912480c093SPatrick Bellasiendif #CGROUP_SCHED
11922480c093SPatrick Bellasi
11932480c093SPatrick Bellasiconfig EXT_SUB_SCHED
11942480c093SPatrick Bellasi        def_bool y
11952480c093SPatrick Bellasi        depends on SCHED_CLASS_EXT && CGROUPS
11962480c093SPatrick Bellasi
11972480c093SPatrick Bellasiconfig SCHED_MM_CID
11982480c093SPatrick Bellasi	def_bool y
11992480c093SPatrick Bellasi	depends on SMP && RSEQ
12002480c093SPatrick Bellasi
12012480c093SPatrick Bellasiconfig UCLAMP_TASK_GROUP
12022480c093SPatrick Bellasi	bool "Utilization clamping per group of tasks"
12032480c093SPatrick Bellasi	depends on CGROUP_SCHED
12042480c093SPatrick Bellasi	depends on UCLAMP_TASK
12056bf024e6SJohannes Weiner	default n
12066bf024e6SJohannes Weiner	help
12076bf024e6SJohannes Weiner	  This feature enables the scheduler to track the clamped utilization
12086bf024e6SJohannes Weiner	  of each CPU based on RUNNABLE tasks currently scheduled on that CPU.
12096bf024e6SJohannes Weiner
12106bf024e6SJohannes Weiner	  When this option is enabled, the user can specify a min and max
12116bf024e6SJohannes Weiner	  CPU bandwidth which is allowed for each single task in a group.
12126bf024e6SJohannes Weiner	  The max bandwidth allows to clamp the maximum frequency a task
12136bf024e6SJohannes Weiner	  can use, while the min bandwidth allows to define a minimum
12146cc578dfSParav Pandit	  frequency a task will always use.
12156bf024e6SJohannes Weiner
12166bf024e6SJohannes Weiner	  When task group based utilization clamping is enabled, an eventually
121798076833SJonathan Neuschäfer	  specified task-specific clamp value is constrained by the cgroup
12186bf024e6SJohannes Weiner	  specified clamp value. Both minimum and maximum task clamping cannot
12196bf024e6SJohannes Weiner	  be bigger than the corresponding clamping defined at task group level.
12206bf024e6SJohannes Weiner
122139d3e758SParav Pandit	  If in doubt, say N.
122239d3e758SParav Pandit
122339d3e758SParav Panditconfig CGROUP_PIDS
122439d3e758SParav Pandit	bool "PIDs controller"
122539d3e758SParav Pandit	help
122639d3e758SParav Pandit	  Provides enforcement of process number limits in the scope of a
122739d3e758SParav Pandit	  cgroup. Any attempt to fork more processes than is allowed in the
122839d3e758SParav Pandit	  cgroup will fail. PIDs are fundamentally a global resource because it
122939d3e758SParav Pandit	  is fairly trivial to reach PID exhaustion before you reach even a
123039d3e758SParav Pandit	  conservative kmemcg limit. As a result, it is possible to grind a
1231b168ed45SMaarten Lankhorst	  system to halt without being limited by other cgroup policies. The
1232b168ed45SMaarten Lankhorst	  PIDs controller is designed to stop this from happening.
1233e33b5149SMaxime Ripard
1234b168ed45SMaarten Lankhorst	  It should be noted that organisational operations (such as attaching
1235b168ed45SMaarten Lankhorst	  to a cgroup hierarchy) will *not* be blocked by the PIDs controller,
1236b168ed45SMaarten Lankhorst	  since the PIDs limit only affects a process's ability to fork, not to
1237b168ed45SMaarten Lankhorst	  attach to a cgroup.
1238b168ed45SMaarten Lankhorst
1239b168ed45SMaarten Lankhorstconfig CGROUP_RDMA
1240b168ed45SMaarten Lankhorst	bool "RDMA controller"
12416bf024e6SJohannes Weiner	help
12426bf024e6SJohannes Weiner	  Provides enforcement of RDMA resources defined by IB stack.
12436bf024e6SJohannes Weiner	  It is fairly easy for consumers to exhaust RDMA resources, which
12446bf024e6SJohannes Weiner	  can result into resource unavailability to other consumers.
12456bf024e6SJohannes Weiner	  RDMA controller is designed to stop this from happening.
12466bf024e6SJohannes Weiner	  Attaching processes with active RDMA resources to the cgroup
1247489c2a20SJohannes Weiner	  hierarchy is allowed even if can cross the hierarchy's limit.
1248489c2a20SJohannes Weiner
1249489c2a20SJohannes Weinerconfig CGROUP_DMEM
1250489c2a20SJohannes Weiner	bool "Device memory controller (DMEM)"
1251489c2a20SJohannes Weiner	select PAGE_COUNTER
12526bf024e6SJohannes Weiner	help
12536bf024e6SJohannes Weiner	  The DMEM controller allows compatible devices to restrict device
12546bf024e6SJohannes Weiner	  memory usage based on the cgroup hierarchy.
12556bf024e6SJohannes Weiner
1256afc24d49SVivek Goyal	  As an example, it allows you to restrict VRAM usage for applications
12576bf024e6SJohannes Weiner	  in the DRM subsystem.
12586bf024e6SJohannes Weiner
12596bf024e6SJohannes Weinerconfig CGROUP_FREEZER
12606bf024e6SJohannes Weiner	bool "Freezer controller"
12616bf024e6SJohannes Weiner	help
12626bf024e6SJohannes Weiner	  Provides a way to freeze and unfreeze all tasks in a
12636bf024e6SJohannes Weiner	  cgroup.
12646bf024e6SJohannes Weiner
12656bf024e6SJohannes Weiner	  This option affects the ORIGINAL cgroup interface. The cgroup2 memory
12666bf024e6SJohannes Weiner	  controller includes important in-kernel memory consumers per default.
1267afc24d49SVivek Goyal
12686bf024e6SJohannes Weiner	  If you're using cgroup2, say N.
12696bf024e6SJohannes Weiner
1270e1d4eeecSNicolas Pitreconfig CGROUP_HUGETLB
1271bf9850f6SKuan-Wei Chiu	bool "HugeTLB controller"
127223f09dccSFrederic Weisbecker	depends on HUGETLB_PAGE
12736bf024e6SJohannes Weiner	select PAGE_COUNTER
12746bf024e6SJohannes Weiner	default n
12756bf024e6SJohannes Weiner	help
12766bf024e6SJohannes Weiner	  Provides a cgroup controller for HugeTLB pages.
12776bf024e6SJohannes Weiner	  When you enable this, you can put a per cgroup limit on HugeTLB usage.
1278afc24d49SVivek Goyal	  The limit is enforced during page fault. Since HugeTLB doesn't
12796bf024e6SJohannes Weiner	  support page reclaim, enforcing the limit at page fault time implies
1280afc24d49SVivek Goyal	  that, the application will get SIGBUS signal if it tries to access
12811abab1baSChen Ridong	  HugeTLB pages beyond its limit. This requires the application to know
12821abab1baSChen Ridong	  beforehand how much HugeTLB pages it would require for its use. The
12831abab1baSChen Ridong	  control group is tracked in the third page lru pointer. This means
12841abab1baSChen Ridong	  that we cannot use the controller with huge page less than 3 pages.
12851abab1baSChen Ridong
12861abab1baSChen Ridongconfig CPUSETS
12871abab1baSChen Ridong	bool "Cpuset controller"
1288dae68fbaSMichal Koutný	depends on SMP
1289dae68fbaSMichal Koutný	select UNION_FIND
12901abab1baSChen Ridong	select CPU_ISOLATION
12911abab1baSChen Ridong	help
12921abab1baSChen Ridong	  This option will let you create and manage CPUSETs which
12931abab1baSChen Ridong	  allow dynamically partitioning a system into sets of CPUs and
12941abab1baSChen Ridong	  Memory Nodes and assigning tasks to run only within those sets.
12956bf024e6SJohannes Weiner	  This is primarily useful on large SMP or NUMA systems.
12966bf024e6SJohannes Weiner
1297dae68fbaSMichal Koutný	  Say N if unsure.
129889e9b9e0STejun Heo
129989e9b9e0STejun Heoconfig CPUSETS_V1
13006bf024e6SJohannes Weiner	bool "Legacy cgroup v1 cpusets controller"
13016bf024e6SJohannes Weiner	depends on CPUSETS
13026bf024e6SJohannes Weiner	default n
13036bf024e6SJohannes Weiner	help
13046bf024e6SJohannes Weiner	  Legacy cgroup v1 cpusets controller which has been deprecated by
13056bf024e6SJohannes Weiner	  cgroup v2 implementation. The v1 is there for legacy applications
13066bf024e6SJohannes Weiner	  which haven't migrated to the new cgroup v2 interface yet. Legacy
13076bf024e6SJohannes Weiner	  interface includes cpuset filesystem and /proc/<pid>/cpuset. If you
13086bf024e6SJohannes Weiner	  do not have any such application then you are completely fine leaving
13096bf024e6SJohannes Weiner	  this option disabled.
13106bf024e6SJohannes Weiner
13116bf024e6SJohannes Weiner	  Say N if unsure.
13126bf024e6SJohannes Weiner
13136bf024e6SJohannes Weinerconfig PROC_PID_CPUSET
13146bf024e6SJohannes Weiner	bool "Include legacy /proc/<pid>/cpuset file"
13156bf024e6SJohannes Weiner	depends on CPUSETS_V1
13166bf024e6SJohannes Weiner	default y
13176bf024e6SJohannes Weiner
13186546b19fSNamhyung Kimconfig CGROUP_DEVICE
13196546b19fSNamhyung Kim	bool "Device controller"
13206bf024e6SJohannes Weiner	help
13216bf024e6SJohannes Weiner	  Provides a cgroup controller implementing whitelists for
13226bf024e6SJohannes Weiner	  devices which a process in the cgroup can mknod or open.
132330070984SDaniel Mack
132430070984SDaniel Mackconfig CGROUP_CPUACCT
1325483c4933SAndy Lutomirski	bool "Simple CPU accounting controller"
1326483c4933SAndy Lutomirski	help
132730070984SDaniel Mack	  Provides a simple controller for monitoring the
132830070984SDaniel Mack	  total CPU consumed by the tasks in a cgroup.
132930070984SDaniel Mack
133030070984SDaniel Mackconfig CGROUP_PERF
133130070984SDaniel Mack	bool "Perf controller"
133230070984SDaniel Mack	depends on PERF_EVENTS
133330070984SDaniel Mack	help
133430070984SDaniel Mack	  This option extends the perf per-cpu mode to restrict monitoring
133530070984SDaniel Mack	  to threads which belong to the cgroup specified and run on the
1336a72232eaSVipin Sharma	  designated cpu.  Or this can be used to have cgroup ID in samples
1337a72232eaSVipin Sharma	  so that it can monitor performance events among cgroups.
1338a72232eaSVipin Sharma
1339a72232eaSVipin Sharma	  Say N if unsure.
1340a72232eaSVipin Sharma
1341a72232eaSVipin Sharmaconfig CGROUP_BPF
1342a72232eaSVipin Sharma	bool "Support for eBPF programs attached to cgroups"
1343a72232eaSVipin Sharma	depends on BPF_SYSCALL
1344a72232eaSVipin Sharma	select SOCK_CGROUP_DATA
1345a72232eaSVipin Sharma	help
1346a72232eaSVipin Sharma	  Allow attaching eBPF programs to a cgroup using the bpf(2)
1347a72232eaSVipin Sharma	  syscall command BPF_PROG_ATTACH.
1348a72232eaSVipin Sharma
1349a72232eaSVipin Sharma	  In which context these programs are accessed depends on the type
13506bf024e6SJohannes Weiner	  of attachment. For instance, programs that are attached using
135123b0be48SWaiman Long	  BPF_CGROUP_INET_INGRESS will be executed on the ingress path of
13526bf024e6SJohannes Weiner	  inet sockets.
135323b0be48SWaiman Long
13546bf024e6SJohannes Weinerconfig CGROUP_MISC
13556bf024e6SJohannes Weiner	bool "Misc resource controller"
135623b0be48SWaiman Long	default n
135723b0be48SWaiman Long	help
135823b0be48SWaiman Long	  Provides a controller for miscellaneous resources on a host.
13596bf024e6SJohannes Weiner
13606bf024e6SJohannes Weiner	  Miscellaneous scalar resources are the resources on the host system
13616bf024e6SJohannes Weiner	  which cannot be abstracted like the other cgroups. This controller
136273b35147SArnd Bergmann	  tracks and limits the miscellaneous resources used by a process
136373b35147SArnd Bergmann	  attached to a cgroup hierarchy.
136473b35147SArnd Bergmann
136573b35147SArnd Bergmann	  For more information, please check misc cgroup section in
136623964d2dSLi Zefan	  /Documentation/admin-guide/cgroup-v2.rst.
1367c077719bSKAMEZAWA Hiroyuki
13688dd2a82cSDaniel Lezcanoconfig CGROUP_DEBUG
13696a108a14SDavid Rientjes	bool "Debug controller"
13702813893fSIulia Manda	default n
13716a108a14SDavid Rientjes	depends on DEBUG_KERNEL
1372c5289a69SPavel Emelyanov	help
1373c5289a69SPavel Emelyanov	  This option enables a simple controller that exports
1374c5289a69SPavel Emelyanov	  debugging information about the cgroups framework. This
1375c5289a69SPavel Emelyanov	  controller is for control cgroup debugging only. Its
1376c5289a69SPavel Emelyanov	  interfaces are not stable.
1377c5289a69SPavel Emelyanov
13788dd2a82cSDaniel Lezcano	  Say N.
13798dd2a82cSDaniel Lezcano
138058bfdd6dSPavel Emelyanovconfig SOCK_CGROUP_DATA
138158bfdd6dSPavel Emelyanov	bool
138217a6d441SDaniel Lezcano	default n
138358bfdd6dSPavel Emelyanov
138458bfdd6dSPavel Emelyanovendif # CGROUPS
138558bfdd6dSPavel Emelyanov
138658bfdd6dSPavel Emelyanovmenuconfig NAMESPACES
1387769071acSAndrei Vagin	bool "Namespaces support" if EXPERT
1388769071acSAndrei Vagin	depends on MULTIUSER
1389bad53ae2SThomas Weißschuh	default !EXPERT
1390769071acSAndrei Vagin	help
1391769071acSAndrei Vagin	  Provides the way to make tasks work with different objects using
1392769071acSAndrei Vagin	  the same id. For example same IPC id may refer to different objects
1393769071acSAndrei Vagin	  or same user id or pid may refer to different tasks when used in
1394769071acSAndrei Vagin	  different namespaces.
1395ae5e1b22SPavel Emelyanov
1396ae5e1b22SPavel Emelyanovif NAMESPACES
13978dd2a82cSDaniel Lezcano
139817a6d441SDaniel Lezcanoconfig UTS_NS
1399ae5e1b22SPavel Emelyanov	bool "UTS namespace"
1400ae5e1b22SPavel Emelyanov	default y
1401614b84cfSSerge E. Hallyn	help
1402ae5e1b22SPavel Emelyanov	  In this namespace tasks see different info provided with the
1403aee16ce7SPavel Emelyanov	  uname() system call
140419c92399SKees Cook
14055673a94cSEric W. Biedermanconfig TIME_NS
1406aee16ce7SPavel Emelyanov	bool "TIME namespace"
1407aee16ce7SPavel Emelyanov	default y
1408aee16ce7SPavel Emelyanov	help
1409e11f0ae3SEric W. Biederman	  In this namespace boottime and monotonic clocks can be set.
1410e11f0ae3SEric W. Biederman	  The time will keep going with the same pace.
1411d886f4e4SJohannes Weiner
1412d886f4e4SJohannes Weinerconfig TIME_NS_VDSO
1413d886f4e4SJohannes Weiner	def_bool TIME_NS && GENERIC_GETTIMEOFDAY
1414e11f0ae3SEric W. Biederman
1415aee16ce7SPavel Emelyanovconfig IPC_NS
1416aee16ce7SPavel Emelyanov	bool "IPC namespace"
141774bd59bbSPavel Emelyanov	depends on (SYSVIPC || POSIX_MQUEUE)
14189bd38c2cSDaniel Lezcano	default y
141917a6d441SDaniel Lezcano	help
142074bd59bbSPavel Emelyanov	  In this namespace tasks work with IPC ids which correspond to
142112d2b8f9SHeikki Orsila	  different IPC objects in different namespaces.
1422692105b8SMatt LaPlante
142374bd59bbSPavel Emelyanovconfig USER_NS
142474bd59bbSPavel Emelyanov	bool "User namespace"
1425d6eb633fSMatt Helsley	default n
1426d6eb633fSMatt Helsley	help
14278dd2a82cSDaniel Lezcano	  This allows containers, i.e. vservers, to use user namespaces
142817a6d441SDaniel Lezcano	  to provide different user info for different servers.
1429d6eb633fSMatt Helsley
1430d6eb633fSMatt Helsley	  When user namespaces are enabled in the kernel it is
1431d6eb633fSMatt Helsley	  recommended that the MEMCG option also be enabled and that
1432d6eb633fSMatt Helsley	  user-space use the memory control groups to limit the amount
14338dd2a82cSDaniel Lezcano	  of memory a memory unprivileged users can use.
14348dd2a82cSDaniel Lezcano
14355cb366bbSAdrian Reber	  If unsure, say N.
14365cb366bbSAdrian Reber
143730341ec9SRen Zhijieconfig PID_NS
14385cb366bbSAdrian Reber	bool "PID Namespaces"
1439bfe3911aSChris Wilson	default y
14405cb366bbSAdrian Reber	help
14415cb366bbSAdrian Reber	  Support process id namespaces.  This allows having multiple
14425cb366bbSAdrian Reber	  processes with the same pid as long as they are in different
14435cb366bbSAdrian Reber	  pid namespaces.  This is a building block of containers.
14445cb366bbSAdrian Reber
14455cb366bbSAdrian Reberconfig NET_NS
14465cb366bbSAdrian Reber	bool "Network namespace"
14475cb366bbSAdrian Reber	depends on NET
14485cb366bbSAdrian Reber	default y
14495091faa4SMike Galbraith	help
14505091faa4SMike Galbraith	  Allow user space to create what appear to be multiple instances
14515091faa4SMike Galbraith	  of the network stack.
14525091faa4SMike Galbraith
14535091faa4SMike Galbraithendif # NAMESPACES
14545091faa4SMike Galbraith
14555091faa4SMike Galbraithconfig CHECKPOINT_RESTORE
14565091faa4SMike Galbraith	bool "Checkpoint/restore support"
14575091faa4SMike Galbraith	depends on PROC_FS
14585091faa4SMike Galbraith	select PROC_CHILDREN
14595091faa4SMike Galbraith	select KCMP
14605091faa4SMike Galbraith	default n
14617af37becSDaniel Lezcano	help
14627af37becSDaniel Lezcano	  Enables additional kernel features in a sake of checkpoint/restore.
146326b5679eSPeter Zijlstra	  In particular it adds auxiliary prctl codes to setup process text,
14647af37becSDaniel Lezcano	  data and heap segment sizes, and a few additional /proc filesystem
14657af37becSDaniel Lezcano	  entries.
14667af37becSDaniel Lezcano
14677af37becSDaniel Lezcano	  If unsure, say N here.
14687af37becSDaniel Lezcano
14697af37becSDaniel Lezcanoconfig SCHED_AUTOGROUP
14707af37becSDaniel Lezcano	bool "Automatic process group scheduling"
14717af37becSDaniel Lezcano	select CGROUPS
14727af37becSDaniel Lezcano	select CGROUP_SCHED
1473f991633dSDimitri Gorokhovik	select FAIR_GROUP_SCHED
1474f991633dSDimitri Gorokhovik	help
1475f991633dSDimitri Gorokhovik	  This option optimizes the scheduler for common desktop workloads by
1476f991633dSDimitri Gorokhovik	  automatically creating and populating task groups.  This separation
1477f991633dSDimitri Gorokhovik	  of workloads isolates aggressive CPU burners (like build jobs) from
1478f991633dSDimitri Gorokhovik	  desktop applications.  Task group autogeneration is currently based
1479f991633dSDimitri Gorokhovik	  upon task session.
14808c27ceffSMauro Carvalho Chehab
1481f991633dSDimitri Gorokhovikconfig RELAY
1482f991633dSDimitri Gorokhovik	bool "Kernel->user space relay support (formerly relayfs)"
1483f991633dSDimitri Gorokhovik	select IRQ_WORK
1484f991633dSDimitri Gorokhovik	help
1485f991633dSDimitri Gorokhovik	  This option enables support for relay interface support in
1486f991633dSDimitri Gorokhovik	  certain file systems (such as debugfs).
1487f991633dSDimitri Gorokhovik	  It is designed to provide an efficient mechanism for tools and
1488c33df4eaSJean-Paul Saman	  facilities to relay large amounts of data from kernel space to
1489c33df4eaSJean-Paul Saman	  user space.
1490dbec4866SSam Ravnborg
1491dbec4866SSam Ravnborg	  If unsure, say N.
1492c33df4eaSJean-Paul Saman
1493c33df4eaSJean-Paul Samanconfig BLK_DEV_INITRD
149476db5a27SMasami Hiramatsu	bool "Initial RAM filesystem and RAM disk (initramfs/initrd) support"
149576db5a27SMasami Hiramatsu	help
1496a2a9d67aSMasami Hiramatsu	  The initial RAM filesystem is a ramfs which is loaded by the
149776db5a27SMasami Hiramatsu	  boot loader (loadlin or lilo) and that is mounted as root
149876db5a27SMasami Hiramatsu	  before the normal boot procedure. It is typically used to
149976db5a27SMasami Hiramatsu	  load modules needed to mount the "real" root file system,
15000947db01SMasami Hiramatsu	  etc. See <file:Documentation/admin-guide/initrd.rst> for details.
150185c46b78SMasami Hiramatsu
15020947db01SMasami Hiramatsu	  If RAM disk support (BLK_DEV_RAM) is also included, this
150376db5a27SMasami Hiramatsu	  also enables initial RAM disk (initrd) support and adds
150476db5a27SMasami Hiramatsu	  15 Kbytes (more on some other architectures) to the kernel size.
150576db5a27SMasami Hiramatsu
1506b743852cSPaul E. McKenney	  If unsure say Y.
1507b743852cSPaul E. McKenney
1508b743852cSPaul E. McKenneyif BLK_DEV_INITRD
15096ded8a28SPaul E. McKenney
1510b743852cSPaul E. McKenneysource "usr/Kconfig"
1511b743852cSPaul E. McKenney
1512b743852cSPaul E. McKenneyendif
1513b743852cSPaul E. McKenney
1514b743852cSPaul E. McKenneyconfig BOOT_CONFIG
1515b743852cSPaul E. McKenney	bool "Boot config support"
1516b743852cSPaul E. McKenney	select BLK_DEV_INITRD if !BOOT_CONFIG_EMBED
1517b743852cSPaul E. McKenney	help
1518b743852cSPaul E. McKenney	  Extra boot config allows system admin to pass a config file as
1519a2a9d67aSMasami Hiramatsu	  complemental extension of kernel cmdline when booting.
1520a2a9d67aSMasami Hiramatsu	  The boot config file must be attached at the end of initramfs
1521a2a9d67aSMasami Hiramatsu	  with checksum, size and magic word.
1522a2a9d67aSMasami Hiramatsu	  See <file:Documentation/admin-guide/bootconfig.rst> for details.
1523a2a9d67aSMasami Hiramatsu
1524a2a9d67aSMasami Hiramatsu	  If unsure, say Y.
1525a2a9d67aSMasami Hiramatsu
1526a2a9d67aSMasami Hiramatsuconfig BOOT_CONFIG_FORCE
1527a2a9d67aSMasami Hiramatsu	bool "Force unconditional bootconfig processing"
1528a2a9d67aSMasami Hiramatsu	depends on BOOT_CONFIG
1529a2a9d67aSMasami Hiramatsu	default y if BOOT_CONFIG_EMBED
1530a2a9d67aSMasami Hiramatsu	help
1531a2a9d67aSMasami Hiramatsu	  With this Kconfig option set, BOOT_CONFIG processing is carried
1532a2a9d67aSMasami Hiramatsu	  out even when the "bootconfig" kernel-boot parameter is omitted.
1533a2a9d67aSMasami Hiramatsu	  In fact, with this Kconfig option set, there is no way to
1534a2a9d67aSMasami Hiramatsu	  make the kernel ignore the BOOT_CONFIG-supplied kernel-boot
1535a2a9d67aSMasami Hiramatsu	  parameters.
1536a2a9d67aSMasami Hiramatsu
1537a2a9d67aSMasami Hiramatsu	  If unsure, say N.
1538032a7302SDouglas Anderson
1539032a7302SDouglas Andersonconfig BOOT_CONFIG_EMBED
1540032a7302SDouglas Anderson	bool "Embed bootconfig file in the kernel"
1541032a7302SDouglas Anderson	depends on BOOT_CONFIG
1542032a7302SDouglas Anderson	help
1543032a7302SDouglas Anderson	  Embed a bootconfig file given by BOOT_CONFIG_EMBED_FILE in the
1544032a7302SDouglas Anderson	  kernel. Usually, the bootconfig file is loaded with the initrd
1545032a7302SDouglas Anderson	  image. But if the system doesn't support initrd, this option will
1546032a7302SDouglas Anderson	  help you by embedding a bootconfig file while building the kernel.
1547032a7302SDouglas Anderson
1548032a7302SDouglas Anderson	  If unsure, say N.
1549032a7302SDouglas Anderson
1550032a7302SDouglas Andersonconfig BOOT_CONFIG_EMBED_FILE
1551032a7302SDouglas Anderson	string "Embedded bootconfig file path"
1552032a7302SDouglas Anderson	depends on BOOT_CONFIG_EMBED
1553032a7302SDouglas Anderson	help
1554032a7302SDouglas Anderson	  Specify a bootconfig file which will be embedded to the kernel.
1555032a7302SDouglas Anderson	  This bootconfig will be used if there is no initrd or no other
15561274aea1SDavid Disseldorp	  bootconfig in the initrd.
15571274aea1SDavid Disseldorp
155874792608SGeert Uytterhoevenconfig CMDLINE_LOG_WRAP_IDEAL_LEN
15591274aea1SDavid Disseldorp	int "Length to try to wrap the cmdline when logged at boot"
15601274aea1SDavid Disseldorp	default 1021
15611274aea1SDavid Disseldorp	range 0 1021
15621274aea1SDavid Disseldorp	help
15631274aea1SDavid Disseldorp	  At boot time, the kernel command line is logged to the console.
15641274aea1SDavid Disseldorp	  The log message will start with the prefix "Kernel command line: ".
15651274aea1SDavid Disseldorp	  The log message will attempt to be wrapped (split into multiple log
15661274aea1SDavid Disseldorp	  messages) at spaces based on CMDLINE_LOG_WRAP_IDEAL_LEN characters.
156783c0b272SDavid Disseldorp	  If wrapping happens, each log message will start with the prefix and
156883c0b272SDavid Disseldorp	  all but the last message will end with " \". Messages may exceed the
156983c0b272SDavid Disseldorp	  ideal length if a place to wrap isn't found before the specified
157083c0b272SDavid Disseldorp	  number of characters.
157183c0b272SDavid Disseldorp
157283c0b272SDavid Disseldorp	  A value of 0 disables wrapping, though be warned that the maximum
157383c0b272SDavid Disseldorp	  length of a log message (1021 characters) may cause the cmdline to
1574877417e6SArnd Bergmann	  be truncated.
1575877417e6SArnd Bergmann
15762cc3ce24SUlf Magnussonconfig INITRAMFS_PRESERVE_MTIME
1577877417e6SArnd Bergmann	bool "Preserve cpio archive mtimes in initramfs"
1578877417e6SArnd Bergmann	depends on BLK_DEV_INITRD
157915f5db60SMasahiro Yamada	default y
1580877417e6SArnd Bergmann	help
1581877417e6SArnd Bergmann	  Each entry in an initramfs cpio archive carries an mtime value. When
1582877417e6SArnd Bergmann	  enabled, extracted cpio items take this mtime, with directory mtime
1583877417e6SArnd Bergmann	  setting deferred until after creation of any child entries.
1584877417e6SArnd Bergmann
1585c45b4f1fSLinus Torvalds	  If unsure, say Y.
158615f5db60SMasahiro Yamada
1587c45b4f1fSLinus Torvaldsconfig INITRAMFS_TEST
1588ce3b487fSMasahiro Yamada	bool "Test initramfs cpio archive extraction" if !KUNIT_ALL_TESTS
1589ce3b487fSMasahiro Yamada	depends on BLK_DEV_INITRD && KUNIT=y
1590c45b4f1fSLinus Torvalds	default KUNIT_ALL_TESTS
1591877417e6SArnd Bergmann	help
1592877417e6SArnd Bergmann	  Build KUnit tests for initramfs. See Documentation/dev-tools/kunit
15935d20ee31SNicholas Piggin
15945d20ee31SNicholas Pigginchoice
15955d20ee31SNicholas Piggin	prompt "Compiler optimization level"
15965d20ee31SNicholas Piggin	default CC_OPTIMIZE_FOR_PERFORMANCE
15975d20ee31SNicholas Piggin
15985d20ee31SNicholas Pigginconfig CC_OPTIMIZE_FOR_PERFORMANCE
15995d20ee31SNicholas Piggin	bool "Optimize for performance (-O2)"
16005d20ee31SNicholas Piggin	help
16015d20ee31SNicholas Piggin	  This is the default optimization level for the kernel, building
16025d20ee31SNicholas Piggin	  with the "-O2" compiler flag for best performance and most
16035d20ee31SNicholas Piggin	  helpful compile-time warnings.
16045d20ee31SNicholas Piggin
16055d20ee31SNicholas Pigginconfig CC_OPTIMIZE_FOR_SIZE
16065d20ee31SNicholas Piggin	bool "Optimize for size (-Os)"
1607e85d1d65SMasahiro Yamada	help
1608e85d1d65SMasahiro Yamada	  Choosing this option will pass "-Os" to your compiler resulting
16095d20ee31SNicholas Piggin	  in a smaller kernel.
16108b9d2712SMasahiro Yamada
16118b9d2712SMasahiro Yamadaendchoice
16128b9d2712SMasahiro Yamada
16135d20ee31SNicholas Pigginconfig HAVE_LD_DEAD_CODE_DATA_ELIMINATION
16145d20ee31SNicholas Piggin	bool
16155d20ee31SNicholas Piggin	help
16165d20ee31SNicholas Piggin	  This requires that the arch annotates or otherwise protects
16175d20ee31SNicholas Piggin	  its external entry points from being discarded. Linker scripts
16185d20ee31SNicholas Piggin	  must also merge .text.*, .data.*, and .bss.* correctly into
16195d20ee31SNicholas Piggin	  output sections. Care must be taken not to pull in unrelated
16205d20ee31SNicholas Piggin	  sections (e.g., '.text.init'). Typically '.' in section names
162159612b24SNathan Chancellor	  is used to distinguish them from label names / C identifiers.
162259612b24SNathan Chancellor
162359612b24SNathan Chancellorconfig LD_DEAD_CODE_DATA_ELIMINATION
162459612b24SNathan Chancellor	bool "Dead code and data elimination (EXPERIMENTAL)"
1625e1789d7cSXin Li	depends on HAVE_LD_DEAD_CODE_DATA_ELIMINATION
1626e1789d7cSXin Li	depends on EXPERT
1627e1789d7cSXin Li	depends on $(cc-option,-ffunction-sections -fdata-sections)
1628e1789d7cSXin Li	depends on $(ld-option,--gc-sections)
1629e1789d7cSXin Li	help
1630e1789d7cSXin Li	  Enable this if you want to do dead code and data elimination with
1631e1789d7cSXin Li	  the linker by compiling with -ffunction-sections -fdata-sections,
163259612b24SNathan Chancellor	  and linking with --gc-sections.
16330847062aSRandy Dunlap
16340847062aSRandy Dunlap	  This can reduce on disk and in-memory size of the kernel
16350847062aSRandy Dunlap	  code and static data, particularly for small configs and
1636657a5209SMike Frysinger	  on small systems. This has the possibility of introducing
1637657a5209SMike Frysinger	  silently broken kernel if the required annotations are not
1638657a5209SMike Frysinger	  present. This option is not well tested yet, so use at your
1639657a5209SMike Frysinger	  own risk.
1640657a5209SMike Frysinger
1641657a5209SMike Frysingerconfig LD_ORPHAN_WARN
1642657a5209SMike Frysinger	def_bool y
1643657a5209SMike Frysinger	depends on ARCH_WANT_LD_ORPHAN_WARN
1644657a5209SMike Frysinger	depends on $(ld-option,--orphan-handling=warn)
1645657a5209SMike Frysinger	depends on $(ld-option,--orphan-handling=error)
1646657a5209SMike Frysinger
1647657a5209SMike Frysingerconfig LD_ORPHAN_WARN_LEVEL
1648657a5209SMike Frysinger        string
1649657a5209SMike Frysinger        depends on LD_ORPHAN_WARN
1650657a5209SMike Frysinger        default "error" if WERROR
1651657a5209SMike Frysinger        default "warn"
1652657a5209SMike Frysinger
1653657a5209SMike Frysingerconfig SYSCTL
1654657a5209SMike Frysinger	bool
1655657a5209SMike Frysinger
1656657a5209SMike Frysingerconfig HAVE_UID16
1657657a5209SMike Frysinger	bool
1658657a5209SMike Frysinger
1659c443279aSChristian Braunerconfig SYSCTL_EXCEPTION_TRACE
1660c443279aSChristian Brauner	bool
1661c443279aSChristian Brauner	help
1662c443279aSChristian Brauner	  Enable support for /proc/sys/debug/exception-trace.
1663c443279aSChristian Brauner
1664c443279aSChristian Braunerconfig SYSCTL_ARCH_UNALIGN_NO_WARN
1665c443279aSChristian Brauner	bool
1666c443279aSChristian Brauner	help
1667c443279aSChristian Brauner	  Enable support for /proc/sys/kernel/ignore-unaligned-usertrap
1668c443279aSChristian Brauner	  Allows arch to define/use @no_unaligned_warning to possibly warn
1669657a5209SMike Frysinger	  about unaligned access emulation going on under the hood.
1670657a5209SMike Frysinger
1671657a5209SMike Frysingerconfig SYSCTL_ARCH_UNALIGN_ALLOW
16726a108a14SDavid Rientjes	bool
16736a108a14SDavid Rientjes	help
1674f505c553SJosh Triplett	  Enable support for /proc/sys/kernel/unaligned-trap
1675f505c553SJosh Triplett	  Allows arches to define/use @unaligned_enabled to runtime toggle
16761da177e4SLinus Torvalds	  the unaligned access emulation.
16771da177e4SLinus Torvalds	  see arch/parisc/kernel/unaligned.c for reference
16781da177e4SLinus Torvalds
16791da177e4SLinus Torvaldsconfig SYSFS_SYSCALL
16801da177e4SLinus Torvalds	bool "Sysfs syscall support"
16811da177e4SLinus Torvalds	default n
1682ae81f9e3SChuck Ebbert	help
16836a108a14SDavid Rientjes	  sys_sysfs is an obsolete system call no longer supported in libc.
16842813893fSIulia Manda	  Note that disabling this option is more secure but might break
1685ae81f9e3SChuck Ebbert	  compatibility with some systems.
1686ae81f9e3SChuck Ebbert
1687ae81f9e3SChuck Ebbert	  If unsure say N here.
1688ae81f9e3SChuck Ebbert
16892813893fSIulia Mandaconfig HAVE_PCSPKR_PLATFORM
16902813893fSIulia Manda	bool
16912813893fSIulia Manda
16922813893fSIulia Mandamenuconfig EXPERT
16932813893fSIulia Manda	bool "Configure standard kernel features (expert users)"
16942813893fSIulia Manda	# Unhide debug options, to make the on-by-default options visible
16952813893fSIulia Manda	select DEBUG_KERNEL
16962813893fSIulia Manda	help
16972813893fSIulia Manda	  This option allows certain base kernel options and settings
16982813893fSIulia Manda	  to be disabled or tweaked. This is for specialized
16992813893fSIulia Manda	  environments which can tolerate a "non-standard" kernel.
17002813893fSIulia Manda	  Only use this if you really know what you are doing.
17012813893fSIulia Manda
17022813893fSIulia Mandaconfig UID16
1703f6187769SFabian Frederick	bool "Enable 16-bit UID system calls" if EXPERT
1704f6187769SFabian Frederick	depends on HAVE_UID16 && MULTIUSER
1705cd14b018SMasahiro Yamada	default y
1706a7f7f624SMasahiro Yamada	help
1707f6187769SFabian Frederick	  This enables the legacy 16-bit UID syscall wrappers.
1708f6187769SFabian Frederick
1709f6187769SFabian Frederickconfig MULTIUSER
1710f6187769SFabian Frederick	bool "Multiple users, groups and capabilities support" if EXPERT
1711f6187769SFabian Frederick	default y
1712f6187769SFabian Frederick	help
1713d1b069f5SRandy Dunlap	  This option enables support for non-root users, groups and
1714d1b069f5SRandy Dunlap	  capabilities.
1715d1b069f5SRandy Dunlap
1716d1b069f5SRandy Dunlap	  If you say N here, all processes will run with UID 0, GID 0, and all
1717d1b069f5SRandy Dunlap	  possible capabilities.  Saying N here also compiles out support for
1718d1b069f5SRandy Dunlap	  system calls related to UIDs, GIDs, and capabilities, such as setuid,
1719d1b069f5SRandy Dunlap	  setgid, and capset.
1720d1b069f5SRandy Dunlap
1721d1b069f5SRandy Dunlap	  If unsure, say Y here.
1722d1b069f5SRandy Dunlap
1723d1b069f5SRandy Dunlapconfig SGETMASK_SYSCALL
1724d1b069f5SRandy Dunlap	bool "sgetmask/ssetmask syscalls support" if EXPERT
1725d1b069f5SRandy Dunlap	default PARISC || M68K || PPC || MIPS || X86 || SPARC || MICROBLAZE || SUPERH
1726baa73d9eSNicolas Pitre	help
1727baa73d9eSNicolas Pitre	  sys_sgetmask and sys_ssetmask are obsolete system calls
1728baa73d9eSNicolas Pitre	  no longer supported in libc but still enabled by default in some
1729baa73d9eSNicolas Pitre	  architectures.
1730baa73d9eSNicolas Pitre
1731baa73d9eSNicolas Pitre	  If unsure, leave the default option here.
1732baa73d9eSNicolas Pitre
1733baa73d9eSNicolas Pitreconfig FHANDLE
1734baa73d9eSNicolas Pitre	bool "open by fhandle syscalls" if EXPERT
1735baa73d9eSNicolas Pitre	select EXPORTFS
1736baa73d9eSNicolas Pitre	default y
1737baa73d9eSNicolas Pitre	help
1738baa73d9eSNicolas Pitre	  If you say Y here, a user level program will be able to map
1739baa73d9eSNicolas Pitre	  file names to handle and then later use the handle for
1740baa73d9eSNicolas Pitre	  different file system operations. This is useful in implementing
1741baa73d9eSNicolas Pitre	  userspace file servers, which now track files using handles instead
1742baa73d9eSNicolas Pitre	  of names. The handle would remain the same even if file names
1743d59745ceSMatt Mackall	  get renamed. Enables open_by_handle_at(2) and name_to_handle_at(2)
1744d59745ceSMatt Mackall	  syscalls.
17456a108a14SDavid Rientjes
174674876a98SFrederic Weisbeckerconfig POSIX_TIMERS
1747d59745ceSMatt Mackall	bool "Posix Clocks & timers" if EXPERT
1748d59745ceSMatt Mackall	default y
1749d59745ceSMatt Mackall	help
1750d59745ceSMatt Mackall	  This includes native support for POSIX timers to the kernel.
1751d59745ceSMatt Mackall	  Some embedded systems have no use for them and therefore they
1752d59745ceSMatt Mackall	  can be configured out to reduce the size of the kernel image.
1753d59745ceSMatt Mackall
17545ea2bcdfSThomas Weißschuh	  When this option is disabled, the following syscalls won't be
17555ea2bcdfSThomas Weißschuh	  available: timer_create, timer_gettime: timer_getoverrun,
17565ea2bcdfSThomas Weißschuh	  timer_settime, timer_delete, clock_adjtime, getitimer,
17575ea2bcdfSThomas Weißschuh	  setitimer, alarm. Furthermore, the clock_settime, clock_gettime,
17585ea2bcdfSThomas Weißschuh	  clock_getres and clock_nanosleep syscalls will be limited to
17595ea2bcdfSThomas Weißschuh	  CLOCK_REALTIME, CLOCK_MONOTONIC and CLOCK_BOOTTIME only.
17605ea2bcdfSThomas Weißschuh
17615ea2bcdfSThomas Weißschuh	  If unsure say y.
17625ea2bcdfSThomas Weißschuh
17635ea2bcdfSThomas Weißschuhconfig PRINTK
17645ea2bcdfSThomas Weißschuh	default y
17655ea2bcdfSThomas Weißschuh	bool "Enable support for printk" if EXPERT
1766c8538a7aSMatt Mackall	select IRQ_WORK
17676a108a14SDavid Rientjes	help
1768c8538a7aSMatt Mackall	  This option enables normal printk support. Removing it
1769c8538a7aSMatt Mackall	  eliminates most of the message strings from the kernel image
1770c8538a7aSMatt Mackall	  and makes the kernel more or less silent. As this makes it
1771c8538a7aSMatt Mackall	  very difficult to diagnose system problems, saying N here is
1772c8538a7aSMatt Mackall	  strongly discouraged.
1773c8538a7aSMatt Mackall
1774c8538a7aSMatt Mackallconfig PRINTK_RINGBUFFER_KUNIT_TEST
1775c8538a7aSMatt Mackall	tristate "KUnit Test for the printk ringbuffer" if !KUNIT_ALL_TESTS
1776708e9a79SMatt Mackall	depends on PRINTK && KUNIT
1777046d662fSAlex Kelly	default KUNIT_ALL_TESTS
1778708e9a79SMatt Mackall	help
17796a108a14SDavid Rientjes	  This builds the printk ringbuffer KUnit test suite.
1780708e9a79SMatt Mackall
1781708e9a79SMatt Mackall	  For more information on KUnit and unit tests in general, please refer
1782708e9a79SMatt Mackall	  to the KUnit documentation.
17838761f1abSRalf Baechle
1784e5e1d3cbSStas Sergeev	  If unsure, say N.
17856a108a14SDavid Rientjes
17868761f1abSRalf Baechleconfig BUG
178715f304b6SRalf Baechle	bool "BUG() support" if EXPERT
1788e5e1d3cbSStas Sergeev	default y
1789e5e1d3cbSStas Sergeev	help
1790e5e1d3cbSStas Sergeev	  Disabling this option eliminates support for BUG and WARN, reducing
1791e5e1d3cbSStas Sergeev	  the size of your kernel image and potentially quietly ignoring
1792e5e1d3cbSStas Sergeev	  numerous fatal conditions. You should only consider disabling this
179327021649SYoann Congal	  option for embedded systems with no facilities for reporting errors.
179427021649SYoann Congal	  Just say Y.
17951da177e4SLinus Torvalds
179627021649SYoann Congalconfig ELF_CORE
17971da177e4SLinus Torvalds	depends on COREDUMP
17981da177e4SLinus Torvalds	default y
17991da177e4SLinus Torvalds	bool "Enable ELF core dumps" if EXPERT
18001da177e4SLinus Torvalds	help
18016a108a14SDavid Rientjes	  Enable support for generating core dumps. Disabling saves about 4k.
18023f2bedabSArnd Bergmann
18031da177e4SLinus Torvalds
1804bc2eecd7SNicolas Pitreconfig PCSPKR_PLATFORM
18051da177e4SLinus Torvalds	bool "Enable PC-Speaker support" if EXPERT
18061da177e4SLinus Torvalds	depends on HAVE_PCSPKR_PLATFORM
18071da177e4SLinus Torvalds	select I8253_LOCK
18081da177e4SLinus Torvalds	default y
18091da177e4SLinus Torvalds	help
1810bc2eecd7SNicolas Pitre	  This option allows to disable the internal PC-Speaker
1811bc2eecd7SNicolas Pitre	  support, saving some memory.
1812bc2eecd7SNicolas Pitre
1813bc2eecd7SNicolas Pitreconfig BASE_SMALL
1814bc2eecd7SNicolas Pitre	bool "Enable smaller-sized data structures for core" if EXPERT
181580367ad0SSebastian Andrzej Siewior	help
181680367ad0SSebastian Andrzej Siewior	  Enabling this option reduces the size of miscellaneous core
181780367ad0SSebastian Andrzej Siewior	  kernel data structures. This saves memory on small machines,
181880367ad0SSebastian Andrzej Siewior	  but may reduce performance.
181980367ad0SSebastian Andrzej Siewior
1820c042c505SPeter Zijlstraconfig FUTEX
1821c042c505SPeter Zijlstra	bool "Enable futex support" if EXPERT
1822c042c505SPeter Zijlstra	depends on !(SPARC32 && SMP)
1823c042c505SPeter Zijlstra	default y
1824c042c505SPeter Zijlstra	imply RT_MUTEXES
18251da177e4SLinus Torvalds	help
18266a108a14SDavid Rientjes	  Disabling this option will cause the kernel to be built without
18271da177e4SLinus Torvalds	  support for "fast userspace mutexes".  The resulting kernel may not
18281da177e4SLinus Torvalds	  run glibc-based applications correctly.
18291da177e4SLinus Torvalds
18301da177e4SLinus Torvaldsconfig FUTEX_PI
18311da177e4SLinus Torvalds	bool
1832fba2afaaSDavide Libenzi	depends on FUTEX && RT_MUTEXES
18336a108a14SDavid Rientjes	default y
1834fba2afaaSDavide Libenzi
1835fba2afaaSDavide Libenziconfig FUTEX_PRIVATE_HASH
1836fba2afaaSDavide Libenzi	bool
1837fba2afaaSDavide Libenzi	depends on FUTEX && !BASE_SMALL && MMU
1838fba2afaaSDavide Libenzi	default y
1839fba2afaaSDavide Libenzi
1840fba2afaaSDavide Libenziconfig FUTEX_MPOL
1841b215e283SDavide Libenzi	bool
18426a108a14SDavid Rientjes	depends on FUTEX && NUMA
1843b215e283SDavide Libenzi	default y
1844b215e283SDavide Libenzi
1845b215e283SDavide Libenziconfig EPOLL
1846b215e283SDavide Libenzi	bool "Enable eventpoll support" if EXPERT
1847b215e283SDavide Libenzi	default y
1848b215e283SDavide Libenzi	help
1849b215e283SDavide Libenzi	  Disabling this option will cause the kernel to be built without
1850e1ad7468SDavide Libenzi	  support for epoll family of system calls.
18516a108a14SDavid Rientjes
1852e1ad7468SDavide Libenziconfig SIGNALFD
1853e1ad7468SDavide Libenzi	bool "Enable signalfd() system call" if EXPERT
1854e1ad7468SDavide Libenzi	default y
1855e1ad7468SDavide Libenzi	help
1856e1ad7468SDavide Libenzi	  Enable the signalfd() system call that allows to receive signals
1857e1ad7468SDavide Libenzi	  on a file descriptor.
1858e1ad7468SDavide Libenzi
18591da177e4SLinus Torvalds	  If unsure, say Y.
18606a108a14SDavid Rientjes
18611da177e4SLinus Torvaldsconfig TIMERFD
18621da177e4SLinus Torvalds	bool "Enable timerfd() system call" if EXPERT
18631da177e4SLinus Torvalds	default y
18641da177e4SLinus Torvalds	help
18651da177e4SLinus Torvalds	  Enable the timerfd() system call that allows to receive timer
18661da177e4SLinus Torvalds	  events on a file descriptor.
18671da177e4SLinus Torvalds
18681da177e4SLinus Torvalds	  If unsure, say Y.
18691da177e4SLinus Torvalds
1870ebf3f09cSThomas Petazzoniconfig EVENTFD
18716a108a14SDavid Rientjes	bool "Enable eventfd() system call" if EXPERT
1872ebf3f09cSThomas Petazzoni	default y
1873ebf3f09cSThomas Petazzoni	help
1874ebf3f09cSThomas Petazzoni	  Enable the eventfd() system call that allows to receive both
1875ebf3f09cSThomas Petazzoni	  kernel notification (ie. KAIO) or userspace notifications.
1876ebf3f09cSThomas Petazzoni
1877ebf3f09cSThomas Petazzoni	  If unsure, say Y.
18782b188cc1SJens Axboe
18792b188cc1SJens Axboeconfig SHMEM
1880561fb04aSJens Axboe	bool "Use full shmem filesystem" if EXPERT
18812b188cc1SJens Axboe	default y
18822b188cc1SJens Axboe	depends on MMU
18832b188cc1SJens Axboe	help
18842b188cc1SJens Axboe	  The shmem is an internal filesystem used to manage shared memory.
18852b188cc1SJens Axboe	  It is backed by swap and manages resource limits. It is also exported
18862b188cc1SJens Axboe	  to userspace as tmpfs if TMPFS is enabled. Disabling this
18871802656eSJens Axboe	  option replaces shmem and tmpfs with the much simpler ramfs code,
18881802656eSJens Axboe	  which may be appropriate on small systems without swap.
1889d1fbe1ebSRandy Dunlap
18901802656eSJens Axboeconfig AIO
18911802656eSJens Axboe	bool "Enable AIO support" if EXPERT
18921802656eSJens Axboe	default y
18931802656eSJens Axboe	help
18941802656eSJens Axboe	  This option enables POSIX asynchronous I/O which may by used
18951802656eSJens Axboe	  by some high performance threaded applications. Disabling
18961802656eSJens Axboe	  this option saves about 7k.
18971802656eSJens Axboe
18981802656eSJens Axboeconfig IO_URING
18991802656eSJens Axboe	bool "Enable IO uring support" if EXPERT
19003a0ae385SPavel Begunkov	select IO_WQ
19013a0ae385SPavel Begunkov	default y
19023a0ae385SPavel Begunkov	help
19033a0ae385SPavel Begunkov	  This option enables support for the io_uring interface, enabling
19043a0ae385SPavel Begunkov	  applications to submit and complete IO through submission and
19059e7dc228SJ. Neuschäfer	  completion rings that are shared between the kernel and application.
19063a0ae385SPavel Begunkov
19073a0ae385SPavel Begunkovconfig GCOV_PROFILE_URING
19083a0ae385SPavel Begunkov	bool "Enable GCOV profiling on the io_uring subsystem"
19093a0ae385SPavel Begunkov	depends on IO_URING && GCOV_KERNEL
19103a0ae385SPavel Begunkov	help
1911d3ac21caSJosh Triplett	  Enable GCOV profiling on the io_uring subsystem, to facilitate
1912d3ac21caSJosh Triplett	  code coverage testing.
1913d3ac21caSJosh Triplett
1914d3ac21caSJosh Triplett	  If unsure, say N.
1915d3ac21caSJosh Triplett
1916d3ac21caSJosh Triplett	  Note that this will have a negative impact on the performance of
1917d3ac21caSJosh Triplett	  the io_uring subsystem, hence this should only be enabled for
1918d3ac21caSJosh Triplett	  specific test purposes.
1919d3ac21caSJosh Triplett
1920d3ac21caSJosh Triplettconfig IO_URING_MOCK_FILE
19215b25b13aSMathieu Desnoyers	tristate "Enable io_uring mock files (Experimental)" if EXPERT
19225b25b13aSMathieu Desnoyers	default n
19235b25b13aSMathieu Desnoyers	depends on IO_URING
19245b25b13aSMathieu Desnoyers	help
19255b25b13aSMathieu Desnoyers	  Enable mock files for io_uring subsystem testing. The ABI might
19265b25b13aSMathieu Desnoyers	  still change, so it's still experimental and should only be enabled
19275b25b13aSMathieu Desnoyers	  for specific test purposes.
19285b25b13aSMathieu Desnoyers
19295b25b13aSMathieu Desnoyers	  If unsure, say N.
19305b25b13aSMathieu Desnoyers
19315b25b13aSMathieu Desnoyersconfig ADVISE_SYSCALLS
19325b25b13aSMathieu Desnoyers	bool "Enable madvise/fadvise syscalls" if EXPERT
1933a751ea34SRandy Dunlap	default y
1934a751ea34SRandy Dunlap	help
1935a751ea34SRandy Dunlap	  This option enables the madvise and fadvise syscalls, used by
1936a751ea34SRandy Dunlap	  applications to advise the kernel about their future memory or file
1937a751ea34SRandy Dunlap	  usage, improving performance. If building an embedded system where no
1938a751ea34SRandy Dunlap	  applications use these syscalls, you can disable this option to save
1939a751ea34SRandy Dunlap	  space.
1940a751ea34SRandy Dunlap
1941a751ea34SRandy Dunlapconfig MEMBARRIER
1942a751ea34SRandy Dunlap	bool "Enable membarrier() system call" if EXPERT
1943a751ea34SRandy Dunlap	default y
1944a751ea34SRandy Dunlap	help
1945a751ea34SRandy Dunlap	  Enable the membarrier() system call that allows issuing memory
1946a751ea34SRandy Dunlap	  barriers across all running threads, which can be used to distribute
1947a751ea34SRandy Dunlap	  the cost of user-space memory barriers asymmetrically by transforming
1948a751ea34SRandy Dunlap	  pairs of memory barriers into pairs consisting of membarrier() and a
1949a751ea34SRandy Dunlap	  compiler barrier.
1950a751ea34SRandy Dunlap
1951a751ea34SRandy Dunlap	  If unsure, say Y.
1952a751ea34SRandy Dunlap
1953a751ea34SRandy Dunlapconfig KCMP
1954a751ea34SRandy Dunlap	bool "Enable kcmp() system call" if EXPERT
1955a751ea34SRandy Dunlap	help
1956a751ea34SRandy Dunlap	  Enable the kernel resource comparison system call. It provides
1957d7a5da7aSThomas Gleixner	  user-space with the ability to compare two processes to see if they
1958d7a5da7aSThomas Gleixner	  share a common resource, such as a file descriptor or even virtual
1959d7a5da7aSThomas Gleixner	  memory space.
1960d7a5da7aSThomas Gleixner
1961d7a5da7aSThomas Gleixner	  If unsure, say N.
1962d7a5da7aSThomas Gleixner
1963d7a5da7aSThomas Gleixnerconfig RSEQ
1964d7a5da7aSThomas Gleixner	bool "Enable rseq() system call" if EXPERT
1965d7a5da7aSThomas Gleixner	default y
1966d7a5da7aSThomas Gleixner	depends on HAVE_RSEQ
1967d7a5da7aSThomas Gleixner	select MEMBARRIER
1968d7a5da7aSThomas Gleixner	help
196954129104SThomas Gleixner	  Enable the restartable sequences system call. It provides a
197054129104SThomas Gleixner	  user-space cache for the current CPU number value, which
197154129104SThomas Gleixner	  speeds up getting the current CPU number from user-space,
197254129104SThomas Gleixner	  as well as an ABI to speed up user-space operations on
197354129104SThomas Gleixner	  per-CPU data.
197454129104SThomas Gleixner
197554129104SThomas Gleixner	  If unsure, say Y.
197654129104SThomas Gleixner
197754129104SThomas Gleixnerconfig RSEQ_SLICE_EXTENSION
197854129104SThomas Gleixner	bool "Enable rseq-based time slice extension mechanism"
197954129104SThomas Gleixner	depends on RSEQ && HIGH_RES_TIMERS && GENERIC_ENTRY && HAVE_GENERIC_TIF_BITS
198054129104SThomas Gleixner	help
19819c37cb6eSThomas Gleixner	  Allows userspace to request a limited time slice extension when
19829c37cb6eSThomas Gleixner	  returning from an interrupt to user space via the RSEQ shared
19839c37cb6eSThomas Gleixner	  data ABI. If granted, that allows to complete a critical section,
19849c37cb6eSThomas Gleixner	  so that other threads are not stuck on a conflicted resource,
19859c37cb6eSThomas Gleixner	  while the task is scheduled out.
19869c37cb6eSThomas Gleixner
19879c37cb6eSThomas Gleixner	  If unsure, say N.
19889c37cb6eSThomas Gleixner
19899c37cb6eSThomas Gleixnerconfig RSEQ_STATS
19909c37cb6eSThomas Gleixner	default n
19919c37cb6eSThomas Gleixner	bool "Enable lightweight statistics of restartable sequences" if EXPERT
19929c37cb6eSThomas Gleixner	depends on RSEQ && DEBUG_FS
19939c37cb6eSThomas Gleixner	help
1994a751ea34SRandy Dunlap	  Enable lightweight counters which expose information about the
1995a751ea34SRandy Dunlap	  frequency of RSEQ operations via debugfs. Mostly interesting for
1996a751ea34SRandy Dunlap	  kernel debugging or performance analysis. While lightweight it's
19973db6b38dSThomas Gleixner	  still adding code into the user/kernel mode transitions.
19989c37cb6eSThomas Gleixner
1999a751ea34SRandy Dunlap	  If unsure, say N.
2000a751ea34SRandy Dunlap
2001a751ea34SRandy Dunlapconfig RSEQ_DEBUG_DEFAULT_ENABLE
2002a751ea34SRandy Dunlap	default n
2003a751ea34SRandy Dunlap	bool "Enable restartable sequences debug mode by default" if EXPERT
2004a751ea34SRandy Dunlap	depends on RSEQ
2005a751ea34SRandy Dunlap	help
2006a751ea34SRandy Dunlap	  This enables the static branch for debug mode of restartable
2007a751ea34SRandy Dunlap	  sequences.
2008a751ea34SRandy Dunlap
2009a751ea34SRandy Dunlap	  This also can be controlled on the kernel command line via the
2010a751ea34SRandy Dunlap	  command line parameter "rseq_debug=0/1" and through debugfs.
2011a751ea34SRandy Dunlap
2012a751ea34SRandy Dunlap	  If unsure, say N.
2013a751ea34SRandy Dunlap
2014d1b069f5SRandy Dunlapconfig DEBUG_RSEQ
2015d1b069f5SRandy Dunlap	default n
2016d1b069f5SRandy Dunlap	bool "Enable debugging of rseq() system call" if EXPERT
2017d1b069f5SRandy Dunlap	depends on RSEQ && DEBUG_KERNEL && !GENERIC_ENTRY
2018d1b069f5SRandy Dunlap	select RSEQ_DEBUG_DEFAULT_ENABLE
2019d1b069f5SRandy Dunlap	help
2020d1b069f5SRandy Dunlap	  Enable extra debugging checks for the rseq system call.
2021d1b069f5SRandy Dunlap
202230f3bb09SZhen Lei	  If unsure, say N.
202330f3bb09SZhen Lei
202430f3bb09SZhen Leiconfig CACHESTAT_SYSCALL
202530f3bb09SZhen Lei	bool "Enable cachestat() system call" if EXPERT
202630f3bb09SZhen Lei	default y
202730f3bb09SZhen Lei	help
202830f3bb09SZhen Lei	  Enable the cachestat system call, which queries the page cache
202930f3bb09SZhen Lei	  statistics of a file (number of cached pages, dirty pages,
203030f3bb09SZhen Lei	  pages marked for writeback, (recently) evicted pages).
203130f3bb09SZhen Lei
203230f3bb09SZhen Lei	  If unsure say Y here.
203330f3bb09SZhen Lei
203430f3bb09SZhen Leiconfig KALLSYMS
2035d1b069f5SRandy Dunlap	bool "Load all symbols for debugging/ksymoops" if EXPERT
2036d1b069f5SRandy Dunlap	default y
2037d1b069f5SRandy Dunlap	help
2038d1b069f5SRandy Dunlap	  Say Y here to let the kernel print out symbolic crash information and
2039d1b069f5SRandy Dunlap	  symbolic stack backtraces. This increases the size of the kernel
2040d1b069f5SRandy Dunlap	  somewhat, as all symbols have to be loaded into the kernel image.
2041bdf0fe33SBaruch Siach
2042bdf0fe33SBaruch Siachconfig KALLSYMS_SELFTEST
2043bdf0fe33SBaruch Siach	bool "Test the basic functions and performance of kallsyms"
2044bdf0fe33SBaruch Siach	depends on KALLSYMS
2045d1b069f5SRandy Dunlap	default n
2046d1b069f5SRandy Dunlap	help
2047d1b069f5SRandy Dunlap	  Test the basic functions and performance of some interfaces, such as
2048d1b069f5SRandy Dunlap	  kallsyms_lookup_name. It also calculates the compression rate of the
2049d1b069f5SRandy Dunlap	  kallsyms compression algorithm for the current symbol set.
2050d1b069f5SRandy Dunlap
2051bdf0fe33SBaruch Siach	  Start self-test automatically after system startup. Suggest executing
2052d1b069f5SRandy Dunlap	  "dmesg | grep kallsyms_selftest" to collect test results. "finish" is
2053d1b069f5SRandy Dunlap	  displayed in the last line, indicating that the test is complete.
2054d1b069f5SRandy Dunlap
20553ccfebedSMathieu Desnoyersconfig KALLSYMS_ALL
20563ccfebedSMathieu Desnoyers	bool "Include all symbols in kallsyms"
20573ccfebedSMathieu Desnoyers	depends on DEBUG_KERNEL && KALLSYMS
205870216e18SMathieu Desnoyers	help
205970216e18SMathieu Desnoyers	  Normally kallsyms only contains the symbols of functions for nicer
206070216e18SMathieu Desnoyers	  OOPS messages and backtraces (i.e., symbols from the text and inittext
20615796d396SJeff Xu	  sections). This is sufficient for most cases. And only if you want to
20625796d396SJeff Xu	  enable kernel live patching, or other less common use cases (e.g.,
20635796d396SJeff Xu	  when a debugger is used) all symbols are required (i.e., names of
20645796d396SJeff Xu	  variables from the data sections, etc).
20655796d396SJeff Xu
20665796d396SJeff Xu	  This option makes sure that all symbols are loaded into the kernel
20675796d396SJeff Xu	  image (i.e., symbols from all sections) in cost of increased kernel
20685796d396SJeff Xu	  size (depending on the kernel configuration, it may be 300KiB or
20695796d396SJeff Xu	  something like this).
20705796d396SJeff Xu
20715796d396SJeff Xu	  Say N unless you really need all symbols, or kernel live patching.
20725796d396SJeff Xu
20735796d396SJeff Xu# end of the "standard kernel features (expert users)" menu
20745796d396SJeff Xu
20755796d396SJeff Xuconfig ARCH_HAS_MEMBARRIER_CALLBACKS
20765796d396SJeff Xu	bool
20775796d396SJeff Xu
20785796d396SJeff Xuconfig ARCH_HAS_MEMBARRIER_SYNC_CORE
20795796d396SJeff Xu	bool
20805796d396SJeff Xu
20815796d396SJeff Xuconfig ARCH_SUPPORTS_MSEAL_SYSTEM_MAPPINGS
20825796d396SJeff Xu	bool
2083cdd6c482SIngo Molnar	help
20840793a61dSThomas Gleixner	  Control MSEAL_SYSTEM_MAPPINGS access based on architecture.
2085018df72dSMike Frysinger
2086018df72dSMike Frysinger	  A 64-bit kernel is required for the memory sealing feature.
20870793a61dSThomas Gleixner	  No specific hardware features from the CPU are needed.
20882aef6f30SSean Christopherson
20892aef6f30SSean Christopherson	  To enable this feature, the architecture needs to update their
20902aef6f30SSean Christopherson	  special mappings calls to include the sealing flag and confirm
20912aef6f30SSean Christopherson	  that it doesn't unmap/remap system mappings during the life
2092eff95e17SKan Liang	  time of the process. The existence of this flag for an architecture
2093eff95e17SKan Liang	  implies that it does not require the remapping of the system
2094eff95e17SKan Liang	  mappings during process lifetime, so sealing these mappings is safe
2095eff95e17SKan Liang	  from a kernel perspective.
2096906010b2SPeter Zijlstra
2097906010b2SPeter Zijlstra	  After the architecture enables this, a distribution can set
2098906010b2SPeter Zijlstra	  CONFIG_MSEAL_SYSTEM_MAPPING to manage access to the feature.
2099906010b2SPeter Zijlstra
2100906010b2SPeter Zijlstra	  For complete descriptions of memory sealing, please see
210157c0c15bSIngo Molnar	  Documentation/userspace-api/mseal.rst
21020793a61dSThomas Gleixner
2103cdd6c482SIngo Molnarconfig HAVE_PERF_EVENTS
210457c0c15bSIngo Molnar	bool
2105392d65a9SRobert Richter	help
2106cdd6c482SIngo Molnar	  See tools/perf/design.txt for details.
2107e360adbeSPeter Zijlstra
21080793a61dSThomas Gleixnerconfig GUEST_PERF_EVENTS
210957c0c15bSIngo Molnar	bool
211057c0c15bSIngo Molnar	depends on HAVE_PERF_EVENTS
21110793a61dSThomas Gleixner
2112dd77038dSThadeu Lima de Souza Cascardoconfig PERF_GUEST_MEDIATED_PMU
211357c0c15bSIngo Molnar	bool
211457c0c15bSIngo Molnar	depends on GUEST_PERF_EVENTS
211557c0c15bSIngo Molnar
211657c0c15bSIngo Molnarconfig PERF_USE_VMALLOC
21170793a61dSThomas Gleixner	bool
21180793a61dSThomas Gleixner	help
21190793a61dSThomas Gleixner	  See tools/perf/design.txt for details
21200793a61dSThomas Gleixner
21210793a61dSThomas Gleixnermenu "Kernel Performance Events And Counters"
21220793a61dSThomas Gleixner
212357c0c15bSIngo Molnarconfig PERF_EVENTS
2124dd77038dSThadeu Lima de Souza Cascardo	bool "Kernel performance events and counters"
212557c0c15bSIngo Molnar	default y if PROFILING
21260793a61dSThomas Gleixner	depends on HAVE_PERF_EVENTS
21270793a61dSThomas Gleixner	select IRQ_WORK
21280793a61dSThomas Gleixner	help
21290793a61dSThomas Gleixner	  Enable kernel support for various performance events provided
21300793a61dSThomas Gleixner	  by software and hardware.
2131906010b2SPeter Zijlstra
2132906010b2SPeter Zijlstra	  Software events are supported either built-in or via the
2133906010b2SPeter Zijlstra	  use of generic tracepoints.
2134cb307113SMichael Ellerman
2135906010b2SPeter Zijlstra	  Most modern CPUs support performance events via performance
2136906010b2SPeter Zijlstra	  counter registers. These registers count the number of certain
2137906010b2SPeter Zijlstra	  types of hw events: such as instructions executed, cachemisses
2138906010b2SPeter Zijlstra	  suffered, or branches mis-predicted - without slowing down the
2139906010b2SPeter Zijlstra	  kernel or applications. These registers can also trigger interrupts
2140906010b2SPeter Zijlstra	  when a threshold number of events have passed - and can thus be
2141906010b2SPeter Zijlstra	  used to profile the code that runs on that CPU.
2142906010b2SPeter Zijlstra
2143906010b2SPeter Zijlstra	  The Linux Performance Event subsystem provides an abstraction of
21440793a61dSThomas Gleixner	  these software and hardware event capabilities, available via a
21450793a61dSThomas Gleixner	  system call and used by the "perf" utility in tools/perf/. It
2146091f6e26SDavid Howells	  provides per task and per CPU counters, and it provides event
2147091f6e26SDavid Howells	  capabilities on top of those.
2148091f6e26SDavid Howells
2149091f6e26SDavid Howells	  Say Y if unsure.
2150091f6e26SDavid Howells
2151d43de6c7SDavid Howellsconfig DEBUG_PERF_USE_VMALLOC
2152091f6e26SDavid Howells	default n
2153091f6e26SDavid Howells	bool "Debug: use vmalloc to back perf mmap() buffers"
2154091f6e26SDavid Howells	depends on PERF_EVENTS && DEBUG_KERNEL && !PPC
2155091f6e26SDavid Howells	select PERF_USE_VMALLOC
2156091f6e26SDavid Howells	help
2157091f6e26SDavid Howells	  Use vmalloc memory to back perf mmap() buffers.
215882c04ff8SPeter Foley
2159091f6e26SDavid Howells	  Mostly useful for debugging the vmalloc code on platforms
2160091f6e26SDavid Howells	  that don't require it.
2161091f6e26SDavid Howells
2162091f6e26SDavid Howells	  Say N if unsure.
216382c04ff8SPeter Foley
2164125e5645SMathieu Desnoyersendmenu
2165b309a294SRobert Richter
2166125e5645SMathieu Desnoyersconfig SYSTEM_DATA_VERIFICATION
2167125e5645SMathieu Desnoyers	def_bool n
2168f8408264SViresh Kumar	select SYSTEM_TRUSTED_KEYRING
2169125e5645SMathieu Desnoyers	select KEYS
21702f7ab126SMiguel Ojeda	select CRYPTO
21712f7ab126SMiguel Ojeda	select CRYPTO_RSA
21722f7ab126SMiguel Ojeda	select ASYMMETRIC_KEY_TYPE
21732f7ab126SMiguel Ojeda	select ASYMMETRIC_PUBLIC_KEY_SUBTYPE
2174ac61506bSSami Tolvanen	select ASN1
2175ac61506bSSami Tolvanen	select OID_REGISTRY
2176f1385dc6SNeal Gompa	select X509_CERTIFICATE_PARSER
21772f7ab126SMiguel Ojeda	select PKCS7_MESSAGE_PARSER
21785daa0c35SMatthew Maurer	help
217923ef9d43SKees Cook	  Provide PKCS#7 message verification using the contents of the system
218023ef9d43SKees Cook	  trusted keyring to provide public keys.  This then can be used for
2181af6017b6SMiguel Ojeda	  module verification, kexec image verification and firmware blob
2182f64e2f3aSMatthew Maurer	  verification.
218393e34a0bSAlice Ryhl
21842f7ab126SMiguel Ojedaconfig PROFILING
21852f7ab126SMiguel Ojeda	bool "Profiling support"
21862f7ab126SMiguel Ojeda	help
21872f7ab126SMiguel Ojeda	  Say Y here to enable the extended profiling support mechanisms used
21882f7ab126SMiguel Ojeda	  by profilers.
21892f7ab126SMiguel Ojeda
21902f7ab126SMiguel Ojedaconfig RUST
21912f7ab126SMiguel Ojeda	bool "Rust support"
21922f7ab126SMiguel Ojeda	depends on HAVE_RUST
21932f7ab126SMiguel Ojeda	depends on RUST_IS_AVAILABLE
21942f7ab126SMiguel Ojeda	select EXTENDED_MODVERSIONS if MODVERSIONS
21952f7ab126SMiguel Ojeda	depends on !MODVERSIONS || GENDWARFKSYMS
21962f7ab126SMiguel Ojeda	depends on !GCC_PLUGIN_RANDSTRUCT
21972f7ab126SMiguel Ojeda	depends on !RANDSTRUCT
21982f7ab126SMiguel Ojeda	depends on !DEBUG_INFO_BTF || (PAHOLE_HAS_LANG_EXCLUDE && !LTO)
21992f7ab126SMiguel Ojeda	depends on !CFI || HAVE_CFI_ICALL_NORMALIZE_INTEGERS_RUSTC
22005134a335SMiguel Ojeda	select CFI_ICALL_NORMALIZE_INTEGERS if CFI
22015134a335SMiguel Ojeda	depends on !KASAN_SW_TAGS
22025134a335SMiguel Ojeda	help
22032f7ab126SMiguel Ojeda	  Enables Rust support in the kernel.
22042f7ab126SMiguel Ojeda
22052f7ab126SMiguel Ojeda	  This allows other Rust-related options, like drivers written in Rust,
22062f7ab126SMiguel Ojeda	  to be selected.
22079e98db17SMiguel Ojeda
2208c23d1f7eSMiguel Ojeda	  It is also required to be able to load external kernel modules
2209c23d1f7eSMiguel Ojeda	  written in Rust.
2210c23d1f7eSMiguel Ojeda
2211c23d1f7eSMiguel Ojeda	  See Documentation/rust/ for more information.
2212aacf93e8SMasahiro Yamada
22132f7ab126SMiguel Ojeda	  If unsure, say N.
22145f87f112SIngo Molnar
22155f87f112SIngo Molnarconfig RUSTC_VERSION_TEXT
22165f87f112SIngo Molnar	string
22175f87f112SIngo Molnar	depends on RUST
221897e1c18eSMathieu Desnoyers	default "$(RUSTC_VERSION_TEXT)"
22195f87f112SIngo Molnar	help
2220a363d27cSMathieu Desnoyers	  See `CC_VERSION_TEXT`.
222197e1c18eSMathieu Desnoyers
222289cde455SEric DeVolderconfig BINDGEN_VERSION_TEXT
222389cde455SEric DeVolder	string
222448a1b232SPasha Tatashin	depends on RUST
222548a1b232SPasha Tatashin	default "$(shell,$(BINDGEN) --version 2>/dev/null)"
22261da177e4SLinus Torvalds
22271da177e4SLinus Torvalds#
22281572497cSChristoph Hellwig# Place an empty function call at each tracepoint site. Can be
22291572497cSChristoph Hellwig# dynamically changed for a probe function.
2230ae81f9e3SChuck Ebbert#
22316341e62bSChristoph Jaegerconfig TRACEPOINTS
22321c6f9ec0SSebastian Andrzej Siewior	bool
2233ae81f9e3SChuck Ebbert	select TASKS_TRACE_RCU
2234c8424e77SThiago Jung Bauermann
2235c8424e77SThiago Jung Bauermannsource "kernel/Kconfig.kexec"
2236c8424e77SThiago Jung Bauermann
2237c8424e77SThiago Jung Bauermannsource "kernel/liveupdate/Kconfig"
223873b4fc92SChristophe Leroy
22396c9692e2SPeter Zijlstraendmenu		# General setup
224098a79d6aSRusty Russell
224198a79d6aSRusty Russellsource "arch/Kconfig"
224298a79d6aSRusty Russell
22435f054e31SRusty Russellconfig RT_MUTEXES
22445f054e31SRusty Russell	bool
224598a79d6aSRusty Russell	default y if PREEMPT_RT
224698a79d6aSRusty Russell
2247692105b8SMatt LaPlanteconfig MODULE_SIG_FORMAT
224898a79d6aSRusty Russell	def_bool n
22493a65dfe8SJens Axboe	select SYSTEM_DATA_VERIFICATION
2250e98c3202SAvi Kivity
2251e98c3202SAvi Kivitysource "kernel/module/Kconfig"
2252e98c3202SAvi Kivity
2253e260be67SPaul E. McKenneyconfig INIT_ALL_POSSIBLE
225416295becSSteffen Klassert	bool
225516295becSSteffen Klassert	help
225616295becSSteffen Klassert	  Back when each arch used to define their own cpu_online_mask and
225716295becSSteffen Klassert	  cpu_possible_mask, some of them chose to initialize cpu_possible_mask
22584520c6a4SDavid Howells	  with all 1s, and others with all 0s.  When they were centralised,
22594520c6a4SDavid Howells	  it was better to provide this option than to break all the archs
22604520c6a4SDavid Howells	  and have several arch maintainers pursuing me down dark alleys.
22614520c6a4SDavid Howells
22624520c6a4SDavid Howellssource "block/Kconfig"
22634520c6a4SDavid Howells
22644520c6a4SDavid Howellsconfig PREEMPT_NOTIFIERS
22654520c6a4SDavid Howells	bool
22666beb0009SThomas Gleixner
2267e61938a9SMathieu Desnoyersconfig PADATA
22680ebeea8cSDaniel Borkmann	depends on SMP
22690ebeea8cSDaniel Borkmann	bool
22700ebeea8cSDaniel Borkmann
22714ff4c745SAndrea Parriconfig ASN1
22724ff4c745SAndrea Parri	tristate
22734ff4c745SAndrea Parri	help
2274e61938a9SMathieu Desnoyers	  Build a simple ASN.1 grammar compiler that produces a bytecode output
2275e61938a9SMathieu Desnoyers	  that can be interpreted by the ASN.1 stream decoder and used to
22761bd21c6cSDominik Brodowski	  inform it as to what tags are to be expected in a stream and what
22771bd21c6cSDominik Brodowski	  functions to call on what tags.
22787303e30eSDominik Brodowski
22797303e30eSDominik Brodowskisource "kernel/Kconfig.locks"
22807303e30eSDominik Brodowski
22817303e30eSDominik Brodowskiconfig ARCH_HAS_NON_OVERLAPPING_ADDRESS_SPACE
22827303e30eSDominik Brodowski	bool
22837303e30eSDominik Brodowski
22841bd21c6cSDominik Brodowskiconfig ARCH_HAS_PREPARE_SYNC_CORE_CMD
22851bd21c6cSDominik Brodowski	bool
2286
2287config ARCH_HAS_SYNC_CORE_BEFORE_USERMODE
2288	bool
2289
2290# It may be useful for an architecture to override the definitions of the
2291# SYSCALL_DEFINE() and __SYSCALL_DEFINEx() macros in <linux/syscalls.h>
2292# and the COMPAT_ variants in <linux/compat.h>, in particular to use a
2293# different calling convention for syscalls. They can also override the
2294# macros for not-implemented syscalls in kernel/sys_ni.c and
2295# kernel/time/posix-stubs.c. All these overrides need to be available in
2296# <asm/syscall_wrapper.h>.
2297config ARCH_HAS_SYSCALL_WRAPPER
2298	def_bool n
2299