From 79b05c1f31e2ed3dbc4e1d098a29687f5c39c495 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 31 Jul 2018 13:39:26 +0200 Subject: um: stop abusing KBUILD_KCONFIG Instead create a arch/um/Kconfig file that just includes the actual per-arch Kconfig file. Note that we use HEADER_ARCH to find the per-arch Kconfig file as that variable already includes the normalization from i386 or x86_64 to x86. Signed-off-by: Christoph Hellwig Acked-by: Richard Weinberger Signed-off-by: Masahiro Yamada --- arch/um/Kconfig | 3 +++ arch/um/Makefile | 4 +--- 2 files changed, 4 insertions(+), 3 deletions(-) create mode 100644 arch/um/Kconfig (limited to 'arch/um') diff --git a/arch/um/Kconfig b/arch/um/Kconfig new file mode 100644 index 0000000..76b4a32 --- /dev/null +++ b/arch/um/Kconfig @@ -0,0 +1,3 @@ +# SPDX-License-Identifier: GPL-2.0 + +source "arch/$(HEADER_ARCH)/um/Kconfig" diff --git a/arch/um/Makefile b/arch/um/Makefile index e54dda8..d427bfc 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -113,8 +113,6 @@ define archhelp echo ' find in the kernel root.' endef -KBUILD_KCONFIG := $(HOST_DIR)/um/Kconfig - archheaders: $(Q)$(MAKE) -f $(srctree)/scripts/Makefile.asm-generic \ kbuild-file=$(HOST_DIR)/include/asm/Kbuild \ @@ -176,4 +174,4 @@ endef include/generated/user_constants.h: $(HOST_DIR)/um/user-offsets.s $(call filechk,gen-asm-offsets) -export SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS DEV_NULL_PATH +export HEADER_ARCH SUBARCH USER_CFLAGS CFLAGS_NO_HARDENING OS DEV_NULL_PATH -- cgit v1.1 From f163977d21a2b380ef83c25df2f83740577dc564 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 31 Jul 2018 13:39:27 +0200 Subject: um: cleanup Kconfig files We can handle all not architecture specific UM configuration directly in the newly added arch/um/Kconfig. Do so by merging the Kconfig.common, Kconfig.rest and Kconfig.um files into arch/um/Kconfig, and move the main UML menu as well. Signed-off-by: Christoph Hellwig Acked-by: Richard Weinberger Signed-off-by: Masahiro Yamada --- arch/um/Kconfig | 210 +++++++++++++++++++++++++++++++++++++++++++++++++ arch/um/Kconfig.common | 60 -------------- arch/um/Kconfig.rest | 22 ------ arch/um/Kconfig.um | 124 ----------------------------- 4 files changed, 210 insertions(+), 206 deletions(-) delete mode 100644 arch/um/Kconfig.common delete mode 100644 arch/um/Kconfig.rest delete mode 100644 arch/um/Kconfig.um (limited to 'arch/um') diff --git a/arch/um/Kconfig b/arch/um/Kconfig index 76b4a32..69fa01a 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig @@ -1,3 +1,213 @@ # SPDX-License-Identifier: GPL-2.0 +menu "UML-specific options" + +config UML + bool + default y + select ARCH_HAS_KCOV + select HAVE_ARCH_AUDITSYSCALL + select HAVE_ARCH_SECCOMP_FILTER + select HAVE_UID16 + select HAVE_FUTEX_CMPXCHG if FUTEX + select HAVE_DEBUG_KMEMLEAK + select GENERIC_IRQ_SHOW + select GENERIC_CPU_DEVICES + select GENERIC_CLOCKEVENTS + select HAVE_GCC_PLUGINS + select TTY # Needed for line.c + +config MMU + bool + default y + +config NO_IOMEM + def_bool y + +config ISA + bool + +config SBUS + bool + +config PCI + bool + +config PCMCIA + bool + +config TRACE_IRQFLAGS_SUPPORT + bool + default y + +config LOCKDEP_SUPPORT + bool + default y + +config STACKTRACE_SUPPORT + bool + default y + select STACKTRACE + +config GENERIC_CALIBRATE_DELAY + bool + default y + +config HZ + int + default 100 + +config NR_CPUS + int + range 1 1 + default 1 + source "arch/$(HEADER_ARCH)/um/Kconfig" + +config STATIC_LINK + bool "Force a static link" + default n + help + This option gives you the ability to force a static link of UML. + Normally, UML is linked as a shared binary. This is inconvenient for + use in a chroot jail. So, if you intend to run UML inside a chroot, + you probably want to say Y here. + Additionally, this option enables using higher memory spaces (up to + 2.75G) for UML. + +source "mm/Kconfig" + +config LD_SCRIPT_STATIC + bool + default y + depends on STATIC_LINK + +config LD_SCRIPT_DYN + bool + default y + depends on !LD_SCRIPT_STATIC + select MODULE_REL_CRCS if MODVERSIONS + +source "fs/Kconfig.binfmt" + +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 UML user + access files stored on the host. It does not require any + network connection between the Host and 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 UML and + /tmp/umlshare is a directory on the host with files the UML user + wishes to access. + + For more information, see + . + + If you'd like to be able to work with files stored on the host, + say Y or M here; otherwise say N. + +config MCONSOLE + bool "Management console" + depends on 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 MAGIC_SYSRQ + bool "Magic SysRq key" + depends on 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). 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 UML, this is accomplished by sending a "sysrq" command with + mconsole, followed by the letter for the requested command. + + The keys are documented in . Don't say Y + unless you really know what this hack does. + +config KERNEL_STACK_ORDER + int "Kernel stack size order" + default 1 if 64BIT + range 1 10 if 64BIT + default 0 if !64BIT + help + This option determines the size of UML kernel stacks. They will + be 1 << order pages. The default is OK unless you're running Valgrind + on UML, in which case, set this to 3. + +config MMAPPER + tristate "iomem emulation driver" + help + This driver allows a host file to be used as emulated IO memory inside + UML. + +config NO_DMA + def_bool y + +config PGTABLE_LEVELS + int + default 3 if 3_LEVEL_PGTABLES + default 2 + +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. + +endmenu + +source "init/Kconfig" + +source "kernel/Kconfig.freezer" + +source "arch/um/Kconfig.char" + +source "drivers/Kconfig" + +source "net/Kconfig" + +source "arch/um/Kconfig.net" + +source "fs/Kconfig" + +source "security/Kconfig" + +source "crypto/Kconfig" + +source "lib/Kconfig" + +source "arch/um/Kconfig.debug" diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common deleted file mode 100644 index 07f84c8..0000000 --- a/arch/um/Kconfig.common +++ /dev/null @@ -1,60 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -config UML - bool - default y - select ARCH_HAS_KCOV - select HAVE_ARCH_AUDITSYSCALL - select HAVE_ARCH_SECCOMP_FILTER - select HAVE_UID16 - select HAVE_FUTEX_CMPXCHG if FUTEX - select HAVE_DEBUG_KMEMLEAK - select GENERIC_IRQ_SHOW - select GENERIC_CPU_DEVICES - select GENERIC_CLOCKEVENTS - select HAVE_GCC_PLUGINS - select TTY # Needed for line.c - -config MMU - bool - default y - -config NO_IOMEM - def_bool y - -config ISA - bool - -config SBUS - bool - -config PCI - bool - -config PCMCIA - bool - -config TRACE_IRQFLAGS_SUPPORT - bool - default y - -config LOCKDEP_SUPPORT - bool - default y - -config STACKTRACE_SUPPORT - bool - default y - select STACKTRACE - -config GENERIC_CALIBRATE_DELAY - bool - default y - -config HZ - int - default 100 - -config NR_CPUS - int - range 1 1 - default 1 diff --git a/arch/um/Kconfig.rest b/arch/um/Kconfig.rest deleted file mode 100644 index 08327b9..0000000 --- a/arch/um/Kconfig.rest +++ /dev/null @@ -1,22 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -source "init/Kconfig" - -source "kernel/Kconfig.freezer" - -source "arch/um/Kconfig.char" - -source "drivers/Kconfig" - -source "net/Kconfig" - -source "arch/um/Kconfig.net" - -source "fs/Kconfig" - -source "security/Kconfig" - -source "crypto/Kconfig" - -source "lib/Kconfig" - -source "arch/um/Kconfig.debug" diff --git a/arch/um/Kconfig.um b/arch/um/Kconfig.um deleted file mode 100644 index 20da5a8..0000000 --- a/arch/um/Kconfig.um +++ /dev/null @@ -1,124 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -config STATIC_LINK - bool "Force a static link" - default n - help - This option gives you the ability to force a static link of UML. - Normally, UML is linked as a shared binary. This is inconvenient for - use in a chroot jail. So, if you intend to run UML inside a chroot, - you probably want to say Y here. - Additionally, this option enables using higher memory spaces (up to - 2.75G) for UML. - -source "mm/Kconfig" - -config LD_SCRIPT_STATIC - bool - default y - depends on STATIC_LINK - -config LD_SCRIPT_DYN - bool - default y - depends on !LD_SCRIPT_STATIC - select MODULE_REL_CRCS if MODVERSIONS - -source "fs/Kconfig.binfmt" - -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 UML user - access files stored on the host. It does not require any - network connection between the Host and 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 UML and - /tmp/umlshare is a directory on the host with files the UML user - wishes to access. - - For more information, see - . - - If you'd like to be able to work with files stored on the host, - say Y or M here; otherwise say N. - -config MCONSOLE - bool "Management console" - depends on 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 MAGIC_SYSRQ - bool "Magic SysRq key" - depends on 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). 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 UML, this is accomplished by sending a "sysrq" command with - mconsole, followed by the letter for the requested command. - - The keys are documented in . Don't say Y - unless you really know what this hack does. - -config KERNEL_STACK_ORDER - int "Kernel stack size order" - default 1 if 64BIT - range 1 10 if 64BIT - default 0 if !64BIT - help - This option determines the size of UML kernel stacks. They will - be 1 << order pages. The default is OK unless you're running Valgrind - on UML, in which case, set this to 3. - -config MMAPPER - tristate "iomem emulation driver" - help - This driver allows a host file to be used as emulated IO memory inside - UML. - -config NO_DMA - def_bool y - -config PGTABLE_LEVELS - int - default 3 if 3_LEVEL_PGTABLES - default 2 - -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. -- cgit v1.1 From 9bea18010f210dd24d2a4f2bd3df7b92132537ae Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 31 Jul 2018 13:39:28 +0200 Subject: um: create a proper drivers Kconfig Merge arch/um/Kconfig.char and arch/um/Kconfig.net into a new arch/um/drivers/Kconfig. This fits the way Kconfig files are placed elsewhere in the kernel tree. Signed-off-by: Christoph Hellwig Acked-by: Richard Weinberger Signed-off-by: Masahiro Yamada --- arch/um/Kconfig | 4 +- arch/um/Kconfig.char | 124 ------------------ arch/um/Kconfig.net | 214 ------------------------------ arch/um/drivers/Kconfig | 337 ++++++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 338 insertions(+), 341 deletions(-) delete mode 100644 arch/um/Kconfig.char delete mode 100644 arch/um/Kconfig.net create mode 100644 arch/um/drivers/Kconfig (limited to 'arch/um') diff --git a/arch/um/Kconfig b/arch/um/Kconfig index 69fa01a..ea35bf9 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig @@ -194,14 +194,12 @@ source "init/Kconfig" source "kernel/Kconfig.freezer" -source "arch/um/Kconfig.char" +source "arch/um/drivers/Kconfig" source "drivers/Kconfig" source "net/Kconfig" -source "arch/um/Kconfig.net" - source "fs/Kconfig" source "security/Kconfig" diff --git a/arch/um/Kconfig.char b/arch/um/Kconfig.char deleted file mode 100644 index f184bde..0000000 --- a/arch/um/Kconfig.char +++ /dev/null @@ -1,124 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 -menu "UML Character Devices" - -config STDERR_CONSOLE - bool "stderr console" - default y - help - console driver which dumps all printk messages to stderr. - -config SSL - bool "Virtual serial line" - help - The User-Mode Linux environment allows you to create virtual serial - lines on the UML that are usually made to show up on the host as - ttys or ptys. - - See for more - information and command line examples of how to use this facility. - - Unless you have a specific reason for disabling this, say Y. - -config NULL_CHAN - bool "null channel support" - help - This option enables support for attaching UML consoles and serial - lines to a device similar to /dev/null. Data written to it disappears - and there is never any data to be read. - -config PORT_CHAN - bool "port channel support" - help - This option enables support for attaching UML consoles and serial - lines to host portals. They may be accessed with 'telnet - '. Any number of consoles and serial lines may be - attached to a single portal, although what UML device you get when - you telnet to that portal will be unpredictable. - It is safe to say 'Y' here. - -config PTY_CHAN - bool "pty channel support" - help - This option enables support for attaching UML consoles and serial - lines to host pseudo-terminals. Access to both traditional - pseudo-terminals (/dev/pty*) and pts pseudo-terminals are controlled - with this option. The assignment of UML devices to host devices - will be announced in the kernel message log. - It is safe to say 'Y' here. - -config TTY_CHAN - bool "tty channel support" - help - This option enables support for attaching UML consoles and serial - lines to host terminals. Access to both virtual consoles - (/dev/tty*) and the slave side of pseudo-terminals (/dev/ttyp* and - /dev/pts/*) are controlled by this option. - It is safe to say 'Y' here. - -config XTERM_CHAN - bool "xterm channel support" - help - This option enables support for attaching UML consoles and serial - lines to xterms. Each UML device so assigned will be brought up in - its own xterm. - It is safe to say 'Y' here. - -config NOCONFIG_CHAN - bool - default !(XTERM_CHAN && TTY_CHAN && PTY_CHAN && PORT_CHAN && NULL_CHAN) - -config CON_ZERO_CHAN - string "Default main console channel initialization" - default "fd:0,fd:1" - help - This is the string describing the channel to which the main console - will be attached by default. This value can be overridden from the - command line. The default value is "fd:0,fd:1", which attaches the - main console to stdin and stdout. - It is safe to leave this unchanged. - -config CON_CHAN - string "Default console channel initialization" - default "xterm" - help - This is the string describing the channel to which all consoles - except the main console will be attached by default. This value can - be overridden from the command line. The default value is "xterm", - which brings them up in xterms. - It is safe to leave this unchanged, although you may wish to change - this if you expect the UML that you build to be run in environments - which don't have X or xterm available. - -config SSL_CHAN - string "Default serial line channel initialization" - default "pty" - help - This is the string describing the channel to which the serial lines - will be attached by default. This value can be overridden from the - command line. The default value is "pty", which attaches them to - traditional pseudo-terminals. - It is safe to leave this unchanged, although you may wish to change - this if you expect the UML that you build to be run in environments - which don't have a set of /dev/pty* devices. - -config UML_SOUND - tristate "Sound support" - help - This option enables UML sound support. If enabled, it will pull in - soundcore and the UML hostaudio relay, which acts as a intermediary - between the host's dsp and mixer devices and the UML sound system. - It is safe to say 'Y' here. - -config SOUND - tristate - default UML_SOUND - -config SOUND_OSS_CORE - bool - default UML_SOUND - -config HOSTAUDIO - tristate - default UML_SOUND - -endmenu diff --git a/arch/um/Kconfig.net b/arch/um/Kconfig.net deleted file mode 100644 index c390f3de..0000000 --- a/arch/um/Kconfig.net +++ /dev/null @@ -1,214 +0,0 @@ -# SPDX-License-Identifier: GPL-2.0 - -menu "UML Network Devices" - depends on NET - -# UML virtual driver -config UML_NET - bool "Virtual network device" - help - While the User-Mode port cannot directly talk to any physical - hardware devices, this choice and the following transport options - provide one or more virtual network devices through which the UML - kernels can talk to each other, the host, and with the host's help, - machines on the outside world. - - For more information, including explanations of the networking and - sample configurations, see - . - - If you'd like to be able to enable networking in the User-Mode - linux environment, say Y; otherwise say N. Note that you must - enable at least one of the following transport options to actually - make use of UML networking. - -config UML_NET_ETHERTAP - bool "Ethertap transport" - depends on UML_NET - help - The Ethertap User-Mode Linux network transport allows a single - running UML to exchange packets with its host over one of the - host's Ethertap devices, such as /dev/tap0. Additional running - UMLs can use additional Ethertap devices, one per running UML. - While the UML believes it's on a (multi-device, broadcast) virtual - Ethernet network, it's in fact communicating over a point-to-point - link with the host. - - To use this, your host kernel must have support for Ethertap - devices. Also, if your host kernel is 2.4.x, it must have - CONFIG_NETLINK_DEV configured as Y or M. - - For more information, see - That site - has examples of the UML command line to use to enable Ethertap - networking. - - If you'd like to set up an IP network with the host and/or the - outside world, say Y to this, the Daemon Transport and/or the - Slip Transport. You'll need at least one of them, but may choose - more than one without conflict. If you don't need UML networking, - say N. - -config UML_NET_TUNTAP - bool "TUN/TAP transport" - depends on UML_NET - help - The UML TUN/TAP network transport allows a UML instance to exchange - packets with the host over a TUN/TAP device. This option will only - work with a 2.4 host, unless you've applied the TUN/TAP patch to - your 2.2 host kernel. - - To use this transport, your host kernel must have support for TUN/TAP - devices, either built-in or as a module. - -config UML_NET_SLIP - bool "SLIP transport" - depends on UML_NET - help - The slip User-Mode Linux network transport allows a running UML to - network with its host over a point-to-point link. Unlike Ethertap, - which can carry any Ethernet frame (and hence even non-IP packets), - the slip transport can only carry IP packets. - - To use this, your host must support slip devices. - - For more information, see - . - has examples of the UML command line to use to enable slip - networking, and details of a few quirks with it. - - The Ethertap Transport is preferred over slip because of its - limitations. If you prefer slip, however, say Y here. Otherwise - choose the Multicast transport (to network multiple UMLs on - multiple hosts), Ethertap (to network with the host and the - outside world), and/or the Daemon transport (to network multiple - UMLs on a single host). You may choose more than one without - conflict. If you don't need UML networking, say N. - -config UML_NET_DAEMON - bool "Daemon transport" - depends on UML_NET - help - This User-Mode Linux network transport allows one or more running - UMLs on a single host to communicate with each other, but not to - the host. - - To use this form of networking, you'll need to run the UML - networking daemon on the host. - - For more information, see - That site - has examples of the UML command line to use to enable Daemon - networking. - - If you'd like to set up a network with other UMLs on a single host, - say Y. If you need a network between UMLs on multiple physical - hosts, choose the Multicast Transport. To set up a network with - the host and/or other IP machines, say Y to the Ethertap or Slip - transports. You'll need at least one of them, but may choose - more than one without conflict. If you don't need UML networking, - say N. - -config UML_NET_VECTOR - bool "Vector I/O high performance network devices" - depends on UML_NET - help - This User-Mode Linux network driver uses multi-message send - and receive functions. The host running the UML guest must have - a linux kernel version above 3.0 and a libc version > 2.13. - This driver provides tap, raw, gre and l2tpv3 network transports - with up to 4 times higher network throughput than the UML network - drivers. - -config UML_NET_VDE - bool "VDE transport" - depends on UML_NET - help - This User-Mode Linux network transport allows one or more running - UMLs on a single host to communicate with each other and also - with the rest of the world using Virtual Distributed Ethernet, - an improved fork of uml_switch. - - You must have libvdeplug installed in order to build the vde - transport into UML. - - To use this form of networking, you will need to run vde_switch - on the host. - - For more information, see - That site has a good overview of what VDE is and also examples - of the UML command line to use to enable VDE networking. - - If you need UML networking with VDE, - say Y. - -config UML_NET_MCAST - bool "Multicast transport" - depends on UML_NET - help - This Multicast User-Mode Linux network transport allows multiple - UMLs (even ones running on different host machines!) to talk to - each other over a virtual ethernet network. However, it requires - at least one UML with one of the other transports to act as a - bridge if any of them need to be able to talk to their hosts or any - other IP machines. - - To use this, your host kernel(s) must support IP Multicasting. - - For more information, see - That site - has examples of the UML command line to use to enable Multicast - networking, and notes about the security of this approach. - - If you need UMLs on multiple physical hosts to communicate as if - they shared an Ethernet network, say Y. If you need to communicate - with other IP machines, make sure you select one of the other - transports (possibly in addition to Multicast; they're not - exclusive). If you don't need to network UMLs say N to each of - the transports. - -config UML_NET_PCAP - bool "pcap transport" - depends on UML_NET - help - The pcap transport makes a pcap packet stream on the host look - like an ethernet device inside UML. This is useful for making - UML act as a network monitor for the host. You must have libcap - installed in order to build the pcap transport into UML. - - For more information, see - That site - has examples of the UML command line to use to enable this option. - - If you intend to use UML as a network monitor for the host, say - Y here. Otherwise, say N. - -config UML_NET_SLIRP - bool "SLiRP transport" - depends on UML_NET - help - The SLiRP User-Mode Linux network transport allows a running UML - to network by invoking a program that can handle SLIP encapsulated - packets. This is commonly (but not limited to) the application - known as SLiRP, a program that can re-socket IP packets back onto - the host on which it is run. Only IP packets are supported, - unlike other network transports that can handle all Ethernet - frames. In general, slirp allows the UML the same IP connectivity - to the outside world that the host user is permitted, and unlike - other transports, SLiRP works without the need of root level - privleges, setuid binaries, or SLIP devices on the host. This - also means not every type of connection is possible, but most - situations can be accommodated with carefully crafted slirp - commands that can be passed along as part of the network device's - setup string. The effect of this transport on the UML is similar - that of a host behind a firewall that masquerades all network - connections passing through it (but is less secure). - - To use this you should first have slirp compiled somewhere - accessible on the host, and have read its documentation. If you - don't need UML networking, say N. - - Startup example: "eth0=slirp,FE:FD:01:02:03:04,/usr/local/bin/slirp" - -endmenu - diff --git a/arch/um/drivers/Kconfig b/arch/um/drivers/Kconfig new file mode 100644 index 0000000..2b1aaf7 --- /dev/null +++ b/arch/um/drivers/Kconfig @@ -0,0 +1,337 @@ +# SPDX-License-Identifier: GPL-2.0 + +menu "UML Character Devices" + +config STDERR_CONSOLE + bool "stderr console" + default y + help + console driver which dumps all printk messages to stderr. + +config SSL + bool "Virtual serial line" + help + The User-Mode Linux environment allows you to create virtual serial + lines on the UML that are usually made to show up on the host as + ttys or ptys. + + See for more + information and command line examples of how to use this facility. + + Unless you have a specific reason for disabling this, say Y. + +config NULL_CHAN + bool "null channel support" + help + This option enables support for attaching UML consoles and serial + lines to a device similar to /dev/null. Data written to it disappears + and there is never any data to be read. + +config PORT_CHAN + bool "port channel support" + help + This option enables support for attaching UML consoles and serial + lines to host portals. They may be accessed with 'telnet + '. Any number of consoles and serial lines may be + attached to a single portal, although what UML device you get when + you telnet to that portal will be unpredictable. + It is safe to say 'Y' here. + +config PTY_CHAN + bool "pty channel support" + help + This option enables support for attaching UML consoles and serial + lines to host pseudo-terminals. Access to both traditional + pseudo-terminals (/dev/pty*) and pts pseudo-terminals are controlled + with this option. The assignment of UML devices to host devices + will be announced in the kernel message log. + It is safe to say 'Y' here. + +config TTY_CHAN + bool "tty channel support" + help + This option enables support for attaching UML consoles and serial + lines to host terminals. Access to both virtual consoles + (/dev/tty*) and the slave side of pseudo-terminals (/dev/ttyp* and + /dev/pts/*) are controlled by this option. + It is safe to say 'Y' here. + +config XTERM_CHAN + bool "xterm channel support" + help + This option enables support for attaching UML consoles and serial + lines to xterms. Each UML device so assigned will be brought up in + its own xterm. + It is safe to say 'Y' here. + +config NOCONFIG_CHAN + bool + default !(XTERM_CHAN && TTY_CHAN && PTY_CHAN && PORT_CHAN && NULL_CHAN) + +config CON_ZERO_CHAN + string "Default main console channel initialization" + default "fd:0,fd:1" + help + This is the string describing the channel to which the main console + will be attached by default. This value can be overridden from the + command line. The default value is "fd:0,fd:1", which attaches the + main console to stdin and stdout. + It is safe to leave this unchanged. + +config CON_CHAN + string "Default console channel initialization" + default "xterm" + help + This is the string describing the channel to which all consoles + except the main console will be attached by default. This value can + be overridden from the command line. The default value is "xterm", + which brings them up in xterms. + It is safe to leave this unchanged, although you may wish to change + this if you expect the UML that you build to be run in environments + which don't have X or xterm available. + +config SSL_CHAN + string "Default serial line channel initialization" + default "pty" + help + This is the string describing the channel to which the serial lines + will be attached by default. This value can be overridden from the + command line. The default value is "pty", which attaches them to + traditional pseudo-terminals. + It is safe to leave this unchanged, although you may wish to change + this if you expect the UML that you build to be run in environments + which don't have a set of /dev/pty* devices. + +config UML_SOUND + tristate "Sound support" + help + This option enables UML sound support. If enabled, it will pull in + soundcore and the UML hostaudio relay, which acts as a intermediary + between the host's dsp and mixer devices and the UML sound system. + It is safe to say 'Y' here. + +config SOUND + tristate + default UML_SOUND + +config SOUND_OSS_CORE + bool + default UML_SOUND + +config HOSTAUDIO + tristate + default UML_SOUND + +endmenu + +menu "UML Network Devices" + depends on NET + +# UML virtual driver +config UML_NET + bool "Virtual network device" + help + While the User-Mode port cannot directly talk to any physical + hardware devices, this choice and the following transport options + provide one or more virtual network devices through which the UML + kernels can talk to each other, the host, and with the host's help, + machines on the outside world. + + For more information, including explanations of the networking and + sample configurations, see + . + + If you'd like to be able to enable networking in the User-Mode + linux environment, say Y; otherwise say N. Note that you must + enable at least one of the following transport options to actually + make use of UML networking. + +config UML_NET_ETHERTAP + bool "Ethertap transport" + depends on UML_NET + help + The Ethertap User-Mode Linux network transport allows a single + running UML to exchange packets with its host over one of the + host's Ethertap devices, such as /dev/tap0. Additional running + UMLs can use additional Ethertap devices, one per running UML. + While the UML believes it's on a (multi-device, broadcast) virtual + Ethernet network, it's in fact communicating over a point-to-point + link with the host. + + To use this, your host kernel must have support for Ethertap + devices. Also, if your host kernel is 2.4.x, it must have + CONFIG_NETLINK_DEV configured as Y or M. + + For more information, see + That site + has examples of the UML command line to use to enable Ethertap + networking. + + If you'd like to set up an IP network with the host and/or the + outside world, say Y to this, the Daemon Transport and/or the + Slip Transport. You'll need at least one of them, but may choose + more than one without conflict. If you don't need UML networking, + say N. + +config UML_NET_TUNTAP + bool "TUN/TAP transport" + depends on UML_NET + help + The UML TUN/TAP network transport allows a UML instance to exchange + packets with the host over a TUN/TAP device. This option will only + work with a 2.4 host, unless you've applied the TUN/TAP patch to + your 2.2 host kernel. + + To use this transport, your host kernel must have support for TUN/TAP + devices, either built-in or as a module. + +config UML_NET_SLIP + bool "SLIP transport" + depends on UML_NET + help + The slip User-Mode Linux network transport allows a running UML to + network with its host over a point-to-point link. Unlike Ethertap, + which can carry any Ethernet frame (and hence even non-IP packets), + the slip transport can only carry IP packets. + + To use this, your host must support slip devices. + + For more information, see + . + has examples of the UML command line to use to enable slip + networking, and details of a few quirks with it. + + The Ethertap Transport is preferred over slip because of its + limitations. If you prefer slip, however, say Y here. Otherwise + choose the Multicast transport (to network multiple UMLs on + multiple hosts), Ethertap (to network with the host and the + outside world), and/or the Daemon transport (to network multiple + UMLs on a single host). You may choose more than one without + conflict. If you don't need UML networking, say N. + +config UML_NET_DAEMON + bool "Daemon transport" + depends on UML_NET + help + This User-Mode Linux network transport allows one or more running + UMLs on a single host to communicate with each other, but not to + the host. + + To use this form of networking, you'll need to run the UML + networking daemon on the host. + + For more information, see + That site + has examples of the UML command line to use to enable Daemon + networking. + + If you'd like to set up a network with other UMLs on a single host, + say Y. If you need a network between UMLs on multiple physical + hosts, choose the Multicast Transport. To set up a network with + the host and/or other IP machines, say Y to the Ethertap or Slip + transports. You'll need at least one of them, but may choose + more than one without conflict. If you don't need UML networking, + say N. + +config UML_NET_VECTOR + bool "Vector I/O high performance network devices" + depends on UML_NET + help + This User-Mode Linux network driver uses multi-message send + and receive functions. The host running the UML guest must have + a linux kernel version above 3.0 and a libc version > 2.13. + This driver provides tap, raw, gre and l2tpv3 network transports + with up to 4 times higher network throughput than the UML network + drivers. + +config UML_NET_VDE + bool "VDE transport" + depends on UML_NET + help + This User-Mode Linux network transport allows one or more running + UMLs on a single host to communicate with each other and also + with the rest of the world using Virtual Distributed Ethernet, + an improved fork of uml_switch. + + You must have libvdeplug installed in order to build the vde + transport into UML. + + To use this form of networking, you will need to run vde_switch + on the host. + + For more information, see + That site has a good overview of what VDE is and also examples + of the UML command line to use to enable VDE networking. + + If you need UML networking with VDE, + say Y. + +config UML_NET_MCAST + bool "Multicast transport" + depends on UML_NET + help + This Multicast User-Mode Linux network transport allows multiple + UMLs (even ones running on different host machines!) to talk to + each other over a virtual ethernet network. However, it requires + at least one UML with one of the other transports to act as a + bridge if any of them need to be able to talk to their hosts or any + other IP machines. + + To use this, your host kernel(s) must support IP Multicasting. + + For more information, see + That site + has examples of the UML command line to use to enable Multicast + networking, and notes about the security of this approach. + + If you need UMLs on multiple physical hosts to communicate as if + they shared an Ethernet network, say Y. If you need to communicate + with other IP machines, make sure you select one of the other + transports (possibly in addition to Multicast; they're not + exclusive). If you don't need to network UMLs say N to each of + the transports. + +config UML_NET_PCAP + bool "pcap transport" + depends on UML_NET + help + The pcap transport makes a pcap packet stream on the host look + like an ethernet device inside UML. This is useful for making + UML act as a network monitor for the host. You must have libcap + installed in order to build the pcap transport into UML. + + For more information, see + That site + has examples of the UML command line to use to enable this option. + + If you intend to use UML as a network monitor for the host, say + Y here. Otherwise, say N. + +config UML_NET_SLIRP + bool "SLiRP transport" + depends on UML_NET + help + The SLiRP User-Mode Linux network transport allows a running UML + to network by invoking a program that can handle SLIP encapsulated + packets. This is commonly (but not limited to) the application + known as SLiRP, a program that can re-socket IP packets back onto + the host on which it is run. Only IP packets are supported, + unlike other network transports that can handle all Ethernet + frames. In general, slirp allows the UML the same IP connectivity + to the outside world that the host user is permitted, and unlike + other transports, SLiRP works without the need of root level + privleges, setuid binaries, or SLIP devices on the host. This + also means not every type of connection is possible, but most + situations can be accommodated with carefully crafted slirp + commands that can be passed along as part of the network device's + setup string. The effect of this transport on the UML is similar + that of a host behind a firewall that masquerades all network + connections passing through it (but is less secure). + + To use this you should first have slirp compiled somewhere + accessible on the host, and have read its documentation. If you + don't need UML networking, say N. + + Startup example: "eth0=slirp,FE:FD:01:02:03:04,/usr/local/bin/slirp" + +endmenu -- cgit v1.1 From 1572497cb0e6d2016078bc9d5a95786bb878389f Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 31 Jul 2018 13:39:30 +0200 Subject: kconfig: include common Kconfig files from top-level Kconfig Instead of duplicating the source statements in every architecture just do it once in the toplevel Kconfig file. Note that with this the inclusion of arch/$(SRCARCH/Kconfig moves out of the top-level Kconfig into arch/Kconfig so that don't violate ordering constraits while keeping a sensible menu structure. Signed-off-by: Christoph Hellwig Signed-off-by: Masahiro Yamada --- arch/um/Kconfig | 20 -------------------- 1 file changed, 20 deletions(-) (limited to 'arch/um') diff --git a/arch/um/Kconfig b/arch/um/Kconfig index ea35bf9..a5cc2b1 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig @@ -75,8 +75,6 @@ config STATIC_LINK Additionally, this option enables using higher memory spaces (up to 2.75G) for UML. -source "mm/Kconfig" - config LD_SCRIPT_STATIC bool default y @@ -88,8 +86,6 @@ config LD_SCRIPT_DYN depends on !LD_SCRIPT_STATIC select MODULE_REL_CRCS if MODVERSIONS -source "fs/Kconfig.binfmt" - config HOSTFS tristate "Host filesystem" help @@ -190,22 +186,6 @@ config SECCOMP endmenu -source "init/Kconfig" - -source "kernel/Kconfig.freezer" - source "arch/um/drivers/Kconfig" -source "drivers/Kconfig" - -source "net/Kconfig" - -source "fs/Kconfig" - -source "security/Kconfig" - -source "crypto/Kconfig" - -source "lib/Kconfig" - source "arch/um/Kconfig.debug" -- cgit v1.1 From 06ec64b84c357693e9a5540de8eedfc775dbae12 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 31 Jul 2018 13:39:31 +0200 Subject: Kconfig: consolidate the "Kernel hacking" menu Move the source of lib/Kconfig.debug and arch/$(ARCH)/Kconfig.debug to the top-level Kconfig. For two architectures that means moving their arch-specific symbols in that menu into a new arch Kconfig.debug file, and for a few more creating a dummy file so that we can include it unconditionally. Also move the actual 'Kernel hacking' menu to lib/Kconfig.debug, where it belongs. Signed-off-by: Christoph Hellwig Signed-off-by: Masahiro Yamada --- arch/um/Kconfig | 2 -- arch/um/Kconfig.debug | 5 ----- 2 files changed, 7 deletions(-) (limited to 'arch/um') diff --git a/arch/um/Kconfig b/arch/um/Kconfig index a5cc2b1..3022d1b 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig @@ -187,5 +187,3 @@ config SECCOMP endmenu source "arch/um/drivers/Kconfig" - -source "arch/um/Kconfig.debug" diff --git a/arch/um/Kconfig.debug b/arch/um/Kconfig.debug index 967d310..2014597 100644 --- a/arch/um/Kconfig.debug +++ b/arch/um/Kconfig.debug @@ -1,7 +1,4 @@ # SPDX-License-Identifier: GPL-2.0 -menu "Kernel hacking" - -source "lib/Kconfig.debug" config GPROF bool "Enable gprof support" @@ -37,5 +34,3 @@ config EARLY_PRINTK This is useful for kernel debugging when your machine crashes very early before the console code is initialized. - -endmenu -- cgit v1.1 From 87a4c375995ed8eaa721b08825cf73d0b02b3145 Mon Sep 17 00:00:00 2001 From: Christoph Hellwig Date: Tue, 31 Jul 2018 13:39:32 +0200 Subject: kconfig: include kernel/Kconfig.preempt from init/Kconfig Almost all architectures include it. Add a ARCH_NO_PREEMPT symbol to disable preempt support for alpha, hexagon, non-coldfire m68k and user mode Linux. Signed-off-by: Christoph Hellwig Signed-off-by: Masahiro Yamada --- arch/um/Kconfig | 1 + 1 file changed, 1 insertion(+) (limited to 'arch/um') diff --git a/arch/um/Kconfig b/arch/um/Kconfig index 3022d1b..6b99389 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig @@ -6,6 +6,7 @@ config UML bool default y select ARCH_HAS_KCOV + select ARCH_NO_PREEMPT select HAVE_ARCH_AUDITSYSCALL select HAVE_ARCH_SECCOMP_FILTER select HAVE_UID16 -- cgit v1.1