Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

# SPDX-License-Identifier: GPL-2.0

menu "UML-specific options"

config CONFIG_UML
	bool
	default y
	select CONFIG_ARCH_HAS_KCOV
	select CONFIG_ARCH_NO_PREEMPT
	select CONFIG_HAVE_ARCH_AUDITSYSCALL
	select CONFIG_HAVE_ARCH_SECCOMP_FILTER
	select CONFIG_HAVE_ASM_MODVERSIONS
	select CONFIG_HAVE_UID16
	select CONFIG_HAVE_FUTEX_CMPXCHG if CONFIG_FUTEX
	select CONFIG_HAVE_DEBUG_KMEMLEAK
	select CONFIG_HAVE_DEBUG_BUGVERBOSE
	select CONFIG_GENERIC_IRQ_SHOW
	select CONFIG_GENERIC_CPU_DEVICES
	select CONFIG_GENERIC_CLOCKEVENTS
	select CONFIG_HAVE_GCC_PLUGINS
	select CONFIG_TTY # Needed for line.c

config CONFIG_MMU
	bool
	default y

config CONFIG_NO_IOMEM
	def_bool y

config CONFIG_ISA
	bool

config CONFIG_SBUS
	bool

config CONFIG_TRACE_IRQFLAGS_SUPPORT
	bool
	default y

config CONFIG_LOCKDEP_SUPPORT
	bool
	default y

config CONFIG_STACKTRACE_SUPPORT
	bool
	default y
	select CONFIG_STACKTRACE

config CONFIG_GENERIC_CALIBRATE_DELAY
	bool
	default y

config CONFIG_HZ
	int
	default 100

config CONFIG_NR_CPUS
	int
	range 1 1
	default 1

source "arch/$(HEADER_ARCH)/um/Kconfig"

config CONFIG_STATIC_LINK
	bool "Force a static link"
	default n
	help
	  This option gives you the ability to force a static link of CONFIG_UML.
	  Normally, CONFIG_UML is linked as a shared binary.  This is inconvenient for
	  use in a chroot jail.  So, if you intend to run CONFIG_UML inside a chroot,
	  you probably want to say Y here.
	  Additionally, this option enables using higher memory spaces (up to
	  2.75G) for CONFIG_UML.

config CONFIG_LD_SCRIPT_STATIC
	bool
	default y
	depends on CONFIG_STATIC_LINK

config CONFIG_LD_SCRIPT_DYN
	bool
	default y
	depends on !CONFIG_LD_SCRIPT_STATIC
	select CONFIG_MODULE_REL_CRCS if CONFIG_MODVERSIONS

config CONFIG_HOSTFS
	tristate "Host filesystem"
	help
	  While the User-Mode Linux port uses its own root file system for
	  booting and normal file access, this module lets the CONFIG_UML user
	  access files stored on the host.  It does not require any
	  network connection between the Host and CONFIG_UML.  An example use of
	  this might be:

	  mount none /tmp/fromhost -t hostfs -o /tmp/umlshare

	  where /tmp/fromhost is an empty directory inside CONFIG_UML and
	  /tmp/umlshare is a directory on the host with files the CONFIG_UML user
	  wishes to access.

	  For more information, see
	  <http://user-mode-linux.sourceforge.net/hostfs.html>.

	  If you'd like to be able to work with files stored on the host,
	  say Y or CONFIG_M here; otherwise say N.

config CONFIG_MCONSOLE
	bool "Management console"
	depends on CONFIG_PROC_FS
	default y
	help
	  The user mode linux management console is a low-level interface to
	  the kernel, somewhat like the i386 SysRq interface.  Since there is
	  a full-blown operating system running under every user mode linux
	  instance, there is much greater flexibility possible than with the
	  SysRq mechanism.

	  If you answer 'Y' to this option, to use this feature, you need the
	  mconsole client (called uml_mconsole) which is present in CVS in
	  2.4.5-9um and later (path /tools/mconsole), and is also in the
	  distribution RPM package in 2.4.6 and later.

	  It is safe to say 'Y' here.

config CONFIG_MAGIC_SYSRQ
	bool "Magic SysRq key"
	depends on CONFIG_MCONSOLE
	help
	  If you say Y here, you will have some control over the system even
	  if the system crashes for example during kernel debugging (e.g., you
	  will be able to flush the buffer cache to disk, reboot the system
	  immediately or dump some status information). CONFIG_A key for each of the
	  possible requests is provided.

	  This is the feature normally accomplished by pressing a key
	  while holding SysRq (Alt+PrintScreen).

	  On CONFIG_UML, this is accomplished by sending a "sysrq" command with
	  mconsole, followed by the letter for the requested command.

	  The keys are documented in <file:Documentation/admin-guide/sysrq.rst>. Don't say Y
	  unless you really know what this hack does.

config CONFIG_KERNEL_STACK_ORDER
	int "Kernel stack size order"
	default 2 if CONFIG_64BIT
	range 2 10 if CONFIG_64BIT
	default 1 if !CONFIG_64BIT
	help
	  This option determines the size of CONFIG_UML kernel stacks.  They will
	  be 1 << order pages.  The default is OK unless you're running Valgrind
	  on CONFIG_UML, in which case, set this to 3.
	  It is possible to reduce the stack to 1 for CONFIG_64BIT and 0 for CONFIG_32BIT on
	  older (pre-2017) CPUs. It is not recommended on newer CPUs due to the
	  increase in the size of the state which needs to be saved when handling
          signals.

config CONFIG_MMAPPER
	tristate "iomem emulation driver"
	help
	  This driver allows a host file to be used as emulated IO memory inside
	  CONFIG_UML.

config CONFIG_NO_DMA
	def_bool y

config CONFIG_PGTABLE_LEVELS
	int
	default 3 if CONFIG_3_LEVEL_PGTABLES
	default 2

config CONFIG_SECCOMP
	def_bool y
	prompt "Enable seccomp to safely compute untrusted bytecode"
	---help---
	  This kernel feature is useful for number crunching applications
	  that may need to compute untrusted bytecode during their
	  execution. By using pipes or other transports made available to
	  the process as file descriptors supporting the read/write
	  syscalls, it's possible to isolate those applications in
	  their own address space using seccomp. Once seccomp is
	  enabled via prctl(PR_SET_SECCOMP), it cannot be disabled
	  and the task is only allowed to execute a few safe syscalls
	  defined by each seccomp mode.

	  If unsure, say Y.

config CONFIG_UML_TIME_TRAVEL_SUPPORT
	bool
	prompt "Support time-travel mode (e.g. for test execution)"
	help
	  Enable this option to support time travel inside the CONFIG_UML instance.

	  After enabling this option, two modes are accessible at runtime
	  (selected by the kernel command line), see the kernel's command-
	  line help for more details.

	  It is safe to say Y, but you probably don't need this.

endmenu

source "arch/um/drivers/Kconfig"