Linux Audio

Check our new training course

Yocto / OpenEmbedded training

Mar 24-27, 2025, special US time zones
Register
Loading...
v5.9
  1# SPDX-License-Identifier: GPL-2.0
  2
  3menu "UML-specific options"
  4
  5config UML
  6	bool
  7	default y
 
 
 
 
  8	select ARCH_HAS_KCOV
  9	select ARCH_NO_PREEMPT
 
 10	select HAVE_ARCH_AUDITSYSCALL
 
 
 11	select HAVE_ARCH_SECCOMP_FILTER
 12	select HAVE_ASM_MODVERSIONS
 13	select HAVE_UID16
 14	select HAVE_FUTEX_CMPXCHG if FUTEX
 15	select HAVE_DEBUG_KMEMLEAK
 16	select HAVE_DEBUG_BUGVERBOSE
 17	select NO_DMA
 
 
 18	select GENERIC_IRQ_SHOW
 19	select GENERIC_CPU_DEVICES
 20	select GENERIC_CLOCKEVENTS
 21	select HAVE_GCC_PLUGINS
 
 
 
 22	select TTY # Needed for line.c
 
 
 
 
 
 23
 24config MMU
 25	bool
 26	default y
 27
 
 
 
 28config NO_IOMEM
 29	def_bool y
 
 
 30
 31config ISA
 32	bool
 
 
 
 
 
 33
 34config SBUS
 
 
 
 35	bool
 36
 37config TRACE_IRQFLAGS_SUPPORT
 38	bool
 39	default y
 40
 41config LOCKDEP_SUPPORT
 42	bool
 43	default y
 44
 45config STACKTRACE_SUPPORT
 46	bool
 47	default y
 48	select STACKTRACE
 49
 50config GENERIC_CALIBRATE_DELAY
 51	bool
 52	default y
 53
 54config HZ
 55	int
 56	default 100
 57
 58config NR_CPUS
 59	int
 60	range 1 1
 61	default 1
 62
 
 
 
 63source "arch/$(HEADER_ARCH)/um/Kconfig"
 64
 65config FORBID_STATIC_LINK
 66	bool
 67
 68config STATIC_LINK
 69	bool "Force a static link"
 70	depends on !FORBID_STATIC_LINK
 71	help
 72	  This option gives you the ability to force a static link of UML.
 73	  Normally, UML is linked as a shared binary.  This is inconvenient for
 74	  use in a chroot jail.  So, if you intend to run UML inside a chroot,
 75	  you probably want to say Y here.
 76	  Additionally, this option enables using higher memory spaces (up to
 77	  2.75G) for UML.
 78
 79	  NOTE: This option is incompatible with some networking features which
 80	  depend on features that require being dynamically loaded (like NSS).
 81
 82config LD_SCRIPT_STATIC
 83	bool
 84	default y
 85	depends on STATIC_LINK
 86
 87config LD_SCRIPT_DYN
 88	bool
 89	default y
 90	depends on !LD_SCRIPT_STATIC
 91	select MODULE_REL_CRCS if MODVERSIONS
 
 
 
 
 
 
 
 
 
 
 
 
 92
 93config HOSTFS
 94	tristate "Host filesystem"
 95	help
 96	  While the User-Mode Linux port uses its own root file system for
 97	  booting and normal file access, this module lets the UML user
 98	  access files stored on the host.  It does not require any
 99	  network connection between the Host and UML.  An example use of
100	  this might be:
101
102	  mount none /tmp/fromhost -t hostfs -o /tmp/umlshare
103
104	  where /tmp/fromhost is an empty directory inside UML and
105	  /tmp/umlshare is a directory on the host with files the UML user
106	  wishes to access.
107
108	  For more information, see
109	  <http://user-mode-linux.sourceforge.net/hostfs.html>.
110
111	  If you'd like to be able to work with files stored on the host,
112	  say Y or M here; otherwise say N.
113
114config MCONSOLE
115	bool "Management console"
116	depends on PROC_FS
117	default y
118	help
119	  The user mode linux management console is a low-level interface to
120	  the kernel, somewhat like the i386 SysRq interface.  Since there is
121	  a full-blown operating system running under every user mode linux
122	  instance, there is much greater flexibility possible than with the
123	  SysRq mechanism.
124
125	  If you answer 'Y' to this option, to use this feature, you need the
126	  mconsole client (called uml_mconsole) which is present in CVS in
127	  2.4.5-9um and later (path /tools/mconsole), and is also in the
128	  distribution RPM package in 2.4.6 and later.
129
130	  It is safe to say 'Y' here.
131
132config MAGIC_SYSRQ
133	bool "Magic SysRq key"
134	depends on MCONSOLE
135	help
136	  If you say Y here, you will have some control over the system even
137	  if the system crashes for example during kernel debugging (e.g., you
138	  will be able to flush the buffer cache to disk, reboot the system
139	  immediately or dump some status information). A key for each of the
140	  possible requests is provided.
141
142	  This is the feature normally accomplished by pressing a key
143	  while holding SysRq (Alt+PrintScreen).
144
145	  On UML, this is accomplished by sending a "sysrq" command with
146	  mconsole, followed by the letter for the requested command.
147
148	  The keys are documented in <file:Documentation/admin-guide/sysrq.rst>. Don't say Y
149	  unless you really know what this hack does.
150
151config KERNEL_STACK_ORDER
152	int "Kernel stack size order"
153	default 2 if 64BIT
154	range 2 10 if 64BIT
155	default 1 if !64BIT
156	help
157	  This option determines the size of UML kernel stacks.  They will
158	  be 1 << order pages.  The default is OK unless you're running Valgrind
159	  on UML, in which case, set this to 3.
160	  It is possible to reduce the stack to 1 for 64BIT and 0 for 32BIT on
161	  older (pre-2017) CPUs. It is not recommended on newer CPUs due to the
162	  increase in the size of the state which needs to be saved when handling
163	  signals.
164
165config MMAPPER
166	tristate "iomem emulation driver"
167	help
168	  This driver allows a host file to be used as emulated IO memory inside
169	  UML.
170
171config PGTABLE_LEVELS
172	int
173	default 3 if 3_LEVEL_PGTABLES
174	default 2
175
176config SECCOMP
177	def_bool y
178	prompt "Enable seccomp to safely compute untrusted bytecode"
179	help
180	  This kernel feature is useful for number crunching applications
181	  that may need to compute untrusted bytecode during their
182	  execution. By using pipes or other transports made available to
183	  the process as file descriptors supporting the read/write
184	  syscalls, it's possible to isolate those applications in
185	  their own address space using seccomp. Once seccomp is
186	  enabled via prctl(PR_SET_SECCOMP), it cannot be disabled
187	  and the task is only allowed to execute a few safe syscalls
188	  defined by each seccomp mode.
189
190	  If unsure, say Y.
191
192config UML_TIME_TRAVEL_SUPPORT
193	bool
194	prompt "Support time-travel mode (e.g. for test execution)"
195	# inf-cpu mode is incompatible with the benchmarking
196	depends on !RAID6_PQ_BENCHMARK
197	depends on !SMP
198	help
199	  Enable this option to support time travel inside the UML instance.
200
201	  After enabling this option, two modes are accessible at runtime
202	  (selected by the kernel command line), see the kernel's command-
203	  line help for more details.
204
205	  It is safe to say Y, but you probably don't need this.
206
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207endmenu
208
209source "arch/um/drivers/Kconfig"
v6.13.7
  1# SPDX-License-Identifier: GPL-2.0
  2
  3menu "UML-specific options"
  4
  5config UML
  6	bool
  7	default y
  8	select ARCH_WANTS_DYNAMIC_TASK_STRUCT
  9	select ARCH_HAS_CPU_FINALIZE_INIT
 10	select ARCH_HAS_FORTIFY_SOURCE
 11	select ARCH_HAS_GCOV_PROFILE_ALL
 12	select ARCH_HAS_KCOV
 13	select ARCH_HAS_STRNCPY_FROM_USER
 14	select ARCH_HAS_STRNLEN_USER
 15	select HAVE_ARCH_AUDITSYSCALL
 16	select HAVE_ARCH_KASAN if X86_64
 17	select HAVE_ARCH_KASAN_VMALLOC if HAVE_ARCH_KASAN
 18	select HAVE_ARCH_SECCOMP_FILTER
 19	select HAVE_ASM_MODVERSIONS
 20	select HAVE_UID16
 
 21	select HAVE_DEBUG_KMEMLEAK
 22	select HAVE_DEBUG_BUGVERBOSE
 23	select HAVE_PAGE_SIZE_4KB
 24	select NO_DMA if !UML_DMA_EMULATION
 25	select OF_EARLY_FLATTREE if OF
 26	select GENERIC_IRQ_SHOW
 27	select GENERIC_CPU_DEVICES
 
 28	select HAVE_GCC_PLUGINS
 29	select ARCH_SUPPORTS_LTO_CLANG
 30	select ARCH_SUPPORTS_LTO_CLANG_THIN
 31	select TRACE_IRQFLAGS_SUPPORT
 32	select TTY # Needed for line.c
 33	select HAVE_ARCH_VMAP_STACK
 34	select HAVE_RUST
 35	select ARCH_HAS_UBSAN
 36	select HAVE_ARCH_TRACEHOOK
 37	select THREAD_INFO_IN_TASK
 38
 39config MMU
 40	bool
 41	default y
 42
 43config UML_DMA_EMULATION
 44	bool
 45
 46config NO_IOMEM
 47	bool "disable IOMEM" if EXPERT
 48	depends on !INDIRECT_IOMEM
 49	default y
 50
 51config UML_IOMEM_EMULATION
 52	bool
 53	select INDIRECT_IOMEM
 54	select HAS_IOPORT
 55	select GENERIC_PCI_IOMAP
 56	select GENERIC_IOMAP
 57	select NO_GENERIC_PCI_IOPORT_MAP
 58
 59config NO_IOPORT_MAP
 60	def_bool !UML_IOMEM_EMULATION
 61
 62config ISA
 63	bool
 64
 65config SBUS
 66	bool
 
 67
 68config LOCKDEP_SUPPORT
 69	bool
 70	default y
 71
 72config STACKTRACE_SUPPORT
 73	bool
 74	default y
 75	select STACKTRACE
 76
 77config GENERIC_CALIBRATE_DELAY
 78	bool
 79	default y
 80
 81config HZ
 82	int
 83	default 100
 84
 85config NR_CPUS
 86	int
 87	range 1 1
 88	default 1
 89
 90config ARCH_HAS_CACHE_LINE_SIZE
 91	def_bool y
 92
 93source "arch/$(HEADER_ARCH)/um/Kconfig"
 94
 95config MAY_HAVE_RUNTIME_DEPS
 96	bool
 97
 98config STATIC_LINK
 99	bool "Force a static link"
100	depends on !MAY_HAVE_RUNTIME_DEPS
101	help
102	  This option gives you the ability to force a static link of UML.
103	  Normally, UML is linked as a shared binary.  This is inconvenient for
104	  use in a chroot jail.  So, if you intend to run UML inside a chroot,
105	  you probably want to say Y here.
106	  Additionally, this option enables using higher memory spaces (up to
107	  2.75G) for UML.
108
109	  NOTE: This option is incompatible with some networking features which
110	  depend on features that require being dynamically loaded (like NSS).
111
112config LD_SCRIPT_STATIC
113	bool
114	default y
115	depends on STATIC_LINK
116
117config LD_SCRIPT_DYN
118	bool
119	default y
120	depends on !LD_SCRIPT_STATIC
121
122config LD_SCRIPT_DYN_RPATH
123	bool "set rpath in the binary" if EXPERT
124	default y
125	depends on LD_SCRIPT_DYN
126	help
127	  Add /lib (and /lib64 for 64-bit) to the linux binary's rpath
128	  explicitly.
129
130	  You may need to turn this off if compiling for nix systems
131	  that have their libraries in random /nix directories and
132	  might otherwise unexpected use libraries from /lib or /lib64
133	  instead of the desired ones.
134
135config HOSTFS
136	tristate "Host filesystem"
137	help
138	  While the User-Mode Linux port uses its own root file system for
139	  booting and normal file access, this module lets the UML user
140	  access files stored on the host.  It does not require any
141	  network connection between the Host and UML.  An example use of
142	  this might be:
143
144	  mount none /tmp/fromhost -t hostfs -o /tmp/umlshare
145
146	  where /tmp/fromhost is an empty directory inside UML and
147	  /tmp/umlshare is a directory on the host with files the UML user
148	  wishes to access.
149
150	  For more information, see
151	  <http://user-mode-linux.sourceforge.net/hostfs.html>.
152
153	  If you'd like to be able to work with files stored on the host,
154	  say Y or M here; otherwise say N.
155
156config MCONSOLE
157	bool "Management console"
158	depends on PROC_FS
159	default y
160	help
161	  The user mode linux management console is a low-level interface to
162	  the kernel, somewhat like the i386 SysRq interface.  Since there is
163	  a full-blown operating system running under every user mode linux
164	  instance, there is much greater flexibility possible than with the
165	  SysRq mechanism.
166
167	  If you answer 'Y' to this option, to use this feature, you need the
168	  mconsole client (called uml_mconsole) which is present in CVS in
169	  2.4.5-9um and later (path /tools/mconsole), and is also in the
170	  distribution RPM package in 2.4.6 and later.
171
172	  It is safe to say 'Y' here.
173
174config MAGIC_SYSRQ
175	bool "Magic SysRq key"
176	depends on MCONSOLE
177	help
178	  If you say Y here, you will have some control over the system even
179	  if the system crashes for example during kernel debugging (e.g., you
180	  will be able to flush the buffer cache to disk, reboot the system
181	  immediately or dump some status information). A key for each of the
182	  possible requests is provided.
183
184	  This is the feature normally accomplished by pressing a key
185	  while holding SysRq (Alt+PrintScreen).
186
187	  On UML, this is accomplished by sending a "sysrq" command with
188	  mconsole, followed by the letter for the requested command.
189
190	  The keys are documented in <file:Documentation/admin-guide/sysrq.rst>. Don't say Y
191	  unless you really know what this hack does.
192
193config KERNEL_STACK_ORDER
194	int "Kernel stack size order"
195	default 2 if 64BIT
196	range 2 10 if 64BIT
197	default 1 if !64BIT
198	help
199	  This option determines the size of UML kernel stacks.  They will
200	  be 1 << order pages.  The default is OK unless you're running Valgrind
201	  on UML, in which case, set this to 3.
202	  It is possible to reduce the stack to 1 for 64BIT and 0 for 32BIT on
203	  older (pre-2017) CPUs. It is not recommended on newer CPUs due to the
204	  increase in the size of the state which needs to be saved when handling
205	  signals.
206
207config MMAPPER
208	tristate "iomem emulation driver"
209	help
210	  This driver allows a host file to be used as emulated IO memory inside
211	  UML.
212
213config PGTABLE_LEVELS
214	int
215	default 4 if 64BIT
216	default 2 if !64BIT
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
218config UML_TIME_TRAVEL_SUPPORT
219	bool
220	prompt "Support time-travel mode (e.g. for test execution)"
221	# inf-cpu mode is incompatible with the benchmarking
222	depends on !RAID6_PQ_BENCHMARK
223	depends on !SMP
224	help
225	  Enable this option to support time travel inside the UML instance.
226
227	  After enabling this option, two modes are accessible at runtime
228	  (selected by the kernel command line), see the kernel's command-
229	  line help for more details.
230
231	  It is safe to say Y, but you probably don't need this.
232
233config UML_MAX_USERSPACE_ITERATIONS
234	int
235	prompt "Maximum number of unscheduled userspace iterations"
236	default 10000
237	depends on UML_TIME_TRAVEL_SUPPORT
238	help
239	  In UML inf-cpu and ext time-travel mode userspace can run without being
240	  interrupted. This will eventually overwhelm the kernel and create OOM
241	  situations (mainly RCU not running). This setting specifies the number
242	  of kernel/userspace switches (minor/major page fault, signal or syscall)
243	  for the same userspace thread before the sched_clock is advanced by a
244	  jiffie to trigger scheduling.
245
246	  Setting it to zero disables the feature.
247
248config KASAN_SHADOW_OFFSET
249	hex
250	depends on KASAN
251	default 0x100000000000
252	help
253	  This is the offset at which the ~16TB of shadow memory is
254	  mapped and used by KASAN for memory debugging. This can be any
255	  address that has at least KASAN_SHADOW_SIZE (total address space divided
256	  by 8) amount of space so that the KASAN shadow memory does not conflict
257	  with anything. The default is 0x100000000000, which works even if mem is
258	  set to a large value. On low-memory systems, try 0x7fff8000, as it fits
259	  into the immediate of most instructions, improving performance.
260
261endmenu
262
263source "arch/um/drivers/Kconfig"
264
265config ARCH_SUSPEND_POSSIBLE
266	def_bool y
267
268menu "Power management options"
269
270source "kernel/power/Kconfig"
271
272endmenu