summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-07-31 07:39:27 -0400
committerMasahiro Yamada <yamada.masahiro@socionext.com>2018-08-01 19:03:23 -0400
commitf163977d21a2b380ef83c25df2f83740577dc564 (patch)
treedbcd0a630841792c0d06e3c7fc8cb3434587bd88
parent79b05c1f31e2ed3dbc4e1d098a29687f5c39c495 (diff)
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 <hch@lst.de> Acked-by: Richard Weinberger <richard@nod.at> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
-rw-r--r--arch/um/Kconfig210
-rw-r--r--arch/um/Kconfig.common60
-rw-r--r--arch/um/Kconfig.rest22
-rw-r--r--arch/um/Kconfig.um124
-rw-r--r--arch/x86/um/Kconfig10
5 files changed, 210 insertions, 216 deletions
diff --git a/arch/um/Kconfig b/arch/um/Kconfig
index 76b4a32c9f42..69fa01a4a81b 100644
--- a/arch/um/Kconfig
+++ b/arch/um/Kconfig
@@ -1,3 +1,213 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2 2
3menu "UML-specific options"
4
5config UML
6 bool
7 default y
8 select ARCH_HAS_KCOV
9 select HAVE_ARCH_AUDITSYSCALL
10 select HAVE_ARCH_SECCOMP_FILTER
11 select HAVE_UID16
12 select HAVE_FUTEX_CMPXCHG if FUTEX
13 select HAVE_DEBUG_KMEMLEAK
14 select GENERIC_IRQ_SHOW
15 select GENERIC_CPU_DEVICES
16 select GENERIC_CLOCKEVENTS
17 select HAVE_GCC_PLUGINS
18 select TTY # Needed for line.c
19
20config MMU
21 bool
22 default y
23
24config NO_IOMEM
25 def_bool y
26
27config ISA
28 bool
29
30config SBUS
31 bool
32
33config PCI
34 bool
35
36config PCMCIA
37 bool
38
39config TRACE_IRQFLAGS_SUPPORT
40 bool
41 default y
42
43config LOCKDEP_SUPPORT
44 bool
45 default y
46
47config STACKTRACE_SUPPORT
48 bool
49 default y
50 select STACKTRACE
51
52config GENERIC_CALIBRATE_DELAY
53 bool
54 default y
55
56config HZ
57 int
58 default 100
59
60config NR_CPUS
61 int
62 range 1 1
63 default 1
64
3source "arch/$(HEADER_ARCH)/um/Kconfig" 65source "arch/$(HEADER_ARCH)/um/Kconfig"
66
67config STATIC_LINK
68 bool "Force a static link"
69 default n
70 help
71 This option gives you the ability to force a static link of UML.
72 Normally, UML is linked as a shared binary. This is inconvenient for
73 use in a chroot jail. So, if you intend to run UML inside a chroot,
74 you probably want to say Y here.
75 Additionally, this option enables using higher memory spaces (up to
76 2.75G) for UML.
77
78source "mm/Kconfig"
79
80config LD_SCRIPT_STATIC
81 bool
82 default y
83 depends on STATIC_LINK
84
85config LD_SCRIPT_DYN
86 bool
87 default y
88 depends on !LD_SCRIPT_STATIC
89 select MODULE_REL_CRCS if MODVERSIONS
90
91source "fs/Kconfig.binfmt"
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 1 if 64BIT
154 range 1 10 if 64BIT
155 default 0 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
161config MMAPPER
162 tristate "iomem emulation driver"
163 help
164 This driver allows a host file to be used as emulated IO memory inside
165 UML.
166
167config NO_DMA
168 def_bool y
169
170config PGTABLE_LEVELS
171 int
172 default 3 if 3_LEVEL_PGTABLES
173 default 2
174
175config SECCOMP
176 def_bool y
177 prompt "Enable seccomp to safely compute untrusted bytecode"
178 ---help---
179 This kernel feature is useful for number crunching applications
180 that may need to compute untrusted bytecode during their
181 execution. By using pipes or other transports made available to
182 the process as file descriptors supporting the read/write
183 syscalls, it's possible to isolate those applications in
184 their own address space using seccomp. Once seccomp is
185 enabled via prctl(PR_SET_SECCOMP), it cannot be disabled
186 and the task is only allowed to execute a few safe syscalls
187 defined by each seccomp mode.
188
189 If unsure, say Y.
190
191endmenu
192
193source "init/Kconfig"
194
195source "kernel/Kconfig.freezer"
196
197source "arch/um/Kconfig.char"
198
199source "drivers/Kconfig"
200
201source "net/Kconfig"
202
203source "arch/um/Kconfig.net"
204
205source "fs/Kconfig"
206
207source "security/Kconfig"
208
209source "crypto/Kconfig"
210
211source "lib/Kconfig"
212
213source "arch/um/Kconfig.debug"
diff --git a/arch/um/Kconfig.common b/arch/um/Kconfig.common
deleted file mode 100644
index 07f84c842cc3..000000000000
--- a/arch/um/Kconfig.common
+++ /dev/null
@@ -1,60 +0,0 @@
1# SPDX-License-Identifier: GPL-2.0
2config UML
3 bool
4 default y
5 select ARCH_HAS_KCOV
6 select HAVE_ARCH_AUDITSYSCALL
7 select HAVE_ARCH_SECCOMP_FILTER
8 select HAVE_UID16
9 select HAVE_FUTEX_CMPXCHG if FUTEX
10 select HAVE_DEBUG_KMEMLEAK
11 select GENERIC_IRQ_SHOW
12 select GENERIC_CPU_DEVICES
13 select GENERIC_CLOCKEVENTS
14 select HAVE_GCC_PLUGINS
15 select TTY # Needed for line.c
16
17config MMU
18 bool
19 default y
20
21config NO_IOMEM
22 def_bool y
23
24config ISA
25 bool
26
27config SBUS
28 bool
29
30config PCI
31 bool
32
33config PCMCIA
34 bool
35
36config TRACE_IRQFLAGS_SUPPORT
37 bool
38 default y
39
40config LOCKDEP_SUPPORT
41 bool
42 default y
43
44config STACKTRACE_SUPPORT
45 bool
46 default y
47 select STACKTRACE
48
49config GENERIC_CALIBRATE_DELAY
50 bool
51 default y
52
53config HZ
54 int
55 default 100
56
57config NR_CPUS
58 int
59 range 1 1
60 default 1
diff --git a/arch/um/Kconfig.rest b/arch/um/Kconfig.rest
deleted file mode 100644
index 08327b9c0cbe..000000000000
--- a/arch/um/Kconfig.rest
+++ /dev/null
@@ -1,22 +0,0 @@
1# SPDX-License-Identifier: GPL-2.0
2source "init/Kconfig"
3
4source "kernel/Kconfig.freezer"
5
6source "arch/um/Kconfig.char"
7
8source "drivers/Kconfig"
9
10source "net/Kconfig"
11
12source "arch/um/Kconfig.net"
13
14source "fs/Kconfig"
15
16source "security/Kconfig"
17
18source "crypto/Kconfig"
19
20source "lib/Kconfig"
21
22source "arch/um/Kconfig.debug"
diff --git a/arch/um/Kconfig.um b/arch/um/Kconfig.um
deleted file mode 100644
index 20da5a8ca949..000000000000
--- a/arch/um/Kconfig.um
+++ /dev/null
@@ -1,124 +0,0 @@
1# SPDX-License-Identifier: GPL-2.0
2config STATIC_LINK
3 bool "Force a static link"
4 default n
5 help
6 This option gives you the ability to force a static link of UML.
7 Normally, UML is linked as a shared binary. This is inconvenient for
8 use in a chroot jail. So, if you intend to run UML inside a chroot,
9 you probably want to say Y here.
10 Additionally, this option enables using higher memory spaces (up to
11 2.75G) for UML.
12
13source "mm/Kconfig"
14
15config LD_SCRIPT_STATIC
16 bool
17 default y
18 depends on STATIC_LINK
19
20config LD_SCRIPT_DYN
21 bool
22 default y
23 depends on !LD_SCRIPT_STATIC
24 select MODULE_REL_CRCS if MODVERSIONS
25
26source "fs/Kconfig.binfmt"
27
28config HOSTFS
29 tristate "Host filesystem"
30 help
31 While the User-Mode Linux port uses its own root file system for
32 booting and normal file access, this module lets the UML user
33 access files stored on the host. It does not require any
34 network connection between the Host and UML. An example use of
35 this might be:
36
37 mount none /tmp/fromhost -t hostfs -o /tmp/umlshare
38
39 where /tmp/fromhost is an empty directory inside UML and
40 /tmp/umlshare is a directory on the host with files the UML user
41 wishes to access.
42
43 For more information, see
44 <http://user-mode-linux.sourceforge.net/hostfs.html>.
45
46 If you'd like to be able to work with files stored on the host,
47 say Y or M here; otherwise say N.
48
49config MCONSOLE
50 bool "Management console"
51 depends on PROC_FS
52 default y
53 help
54 The user mode linux management console is a low-level interface to
55 the kernel, somewhat like the i386 SysRq interface. Since there is
56 a full-blown operating system running under every user mode linux
57 instance, there is much greater flexibility possible than with the
58 SysRq mechanism.
59
60 If you answer 'Y' to this option, to use this feature, you need the
61 mconsole client (called uml_mconsole) which is present in CVS in
62 2.4.5-9um and later (path /tools/mconsole), and is also in the
63 distribution RPM package in 2.4.6 and later.
64
65 It is safe to say 'Y' here.
66
67config MAGIC_SYSRQ
68 bool "Magic SysRq key"
69 depends on MCONSOLE
70 help
71 If you say Y here, you will have some control over the system even
72 if the system crashes for example during kernel debugging (e.g., you
73 will be able to flush the buffer cache to disk, reboot the system
74 immediately or dump some status information). A key for each of the
75 possible requests is provided.
76
77 This is the feature normally accomplished by pressing a key
78 while holding SysRq (Alt+PrintScreen).
79
80 On UML, this is accomplished by sending a "sysrq" command with
81 mconsole, followed by the letter for the requested command.
82
83 The keys are documented in <file:Documentation/admin-guide/sysrq.rst>. Don't say Y
84 unless you really know what this hack does.
85
86config KERNEL_STACK_ORDER
87 int "Kernel stack size order"
88 default 1 if 64BIT
89 range 1 10 if 64BIT
90 default 0 if !64BIT
91 help
92 This option determines the size of UML kernel stacks. They will
93 be 1 << order pages. The default is OK unless you're running Valgrind
94 on UML, in which case, set this to 3.
95
96config MMAPPER
97 tristate "iomem emulation driver"
98 help
99 This driver allows a host file to be used as emulated IO memory inside
100 UML.
101
102config NO_DMA
103 def_bool y
104
105config PGTABLE_LEVELS
106 int
107 default 3 if 3_LEVEL_PGTABLES
108 default 2
109
110config SECCOMP
111 def_bool y
112 prompt "Enable seccomp to safely compute untrusted bytecode"
113 ---help---
114 This kernel feature is useful for number crunching applications
115 that may need to compute untrusted bytecode during their
116 execution. By using pipes or other transports made available to
117 the process as file descriptors supporting the read/write
118 syscalls, it's possible to isolate those applications in
119 their own address space using seccomp. Once seccomp is
120 enabled via prctl(PR_SET_SECCOMP), it cannot be disabled
121 and the task is only allowed to execute a few safe syscalls
122 defined by each seccomp mode.
123
124 If unsure, say Y.
diff --git a/arch/x86/um/Kconfig b/arch/x86/um/Kconfig
index 7e509c83d80d..f518b4744ff8 100644
--- a/arch/x86/um/Kconfig
+++ b/arch/x86/um/Kconfig
@@ -1,9 +1,5 @@
1# SPDX-License-Identifier: GPL-2.0 1# SPDX-License-Identifier: GPL-2.0
2 2
3source "arch/um/Kconfig.common"
4
5menu "UML-specific options"
6
7menu "Host processor type and features" 3menu "Host processor type and features"
8 4
9source "arch/x86/Kconfig.cpu" 5source "arch/x86/Kconfig.cpu"
@@ -61,9 +57,3 @@ config ARCH_REUSE_HOST_VSYSCALL_AREA
61 57
62config GENERIC_HWEIGHT 58config GENERIC_HWEIGHT
63 def_bool y 59 def_bool y
64
65source "arch/um/Kconfig.um"
66
67endmenu
68
69source "arch/um/Kconfig.rest"