diff options
author | Jeff Dike <jdike@addtoit.com> | 2007-10-16 01:26:50 -0700 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2007-10-16 09:43:05 -0700 |
commit | 42fda66387daa53538ae13a2c858396aaf037158 (patch) | |
tree | 77955a91a958fde7be47cb0ff23ac9e1248217db /arch/um | |
parent | a1ff5878d2628bbe1e42821c024c96f48318f683 (diff) |
uml: throw out CONFIG_MODE_TT
This patchset throws out tt mode, which has been non-functional for a while.
This is done in phases, interspersed with code cleanups on the affected files.
The removal is done as follows:
remove all code, config options, and files which depend on
CONFIG_MODE_TT
get rid of the CHOOSE_MODE macro, which decided whether to
call tt-mode or skas-mode code, and replace invocations with their
skas portions
replace all now-trivial procedures with their skas equivalents
There are now a bunch of now-redundant pieces of data structures, including
mode-specific pieces of the thread structure, pt_regs, and mm_context. These
are all replaced with their skas-specific contents.
As part of the ongoing style compliance project, I made a style pass over all
files that were changed. There are three such patches, one for each phase,
covering the files affected by that phase but no later ones.
I noticed that we weren't freeing the LDT state associated with a process when
it exited, so that's fixed in one of the later patches.
The last patch is a tidying patch which I've had for a while, but which caused
inexplicable crashes under tt mode. Since that is no longer a problem, this
can now go in.
This patch:
Start getting rid of tt mode support.
This patch throws out CONFIG_MODE_TT and all config options, code, and files
which depend on it.
CONFIG_MODE_SKAS is gone and everything that depends on it is included
unconditionally.
The few changed lines are in re-written Kconfig help, lines which needed
something skas-related removed from them, and a few more which weren't
strictly deletions.
Signed-off-by: Jeff Dike <jdike@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/um')
85 files changed, 34 insertions, 4183 deletions
diff --git a/arch/um/Kconfig b/arch/um/Kconfig index e6ff3026654..a0e47e27115 100644 --- a/arch/um/Kconfig +++ b/arch/um/Kconfig @@ -62,55 +62,16 @@ config IRQ_RELEASE_METHOD menu "UML-specific options" -config MODE_TT - bool "Tracing thread support (DEPRECATED)" - default n - depends on BROKEN - help - This option controls whether tracing thread support is compiled - into UML. This option is largely obsolete, given that skas0 provides - skas security and performance without needing to patch the host. - It is safe to say 'N' here; saying 'Y' may cause additional problems - with the resulting binary even if you run UML in SKAS mode, and running - in TT mode is strongly *NOT RECOMMENDED*. - config STATIC_LINK bool "Force a static link" default n - depends on !MODE_TT help - If CONFIG_MODE_TT is disabled, then this option gives you the ability - to force a static link of UML. Normally, if only skas mode is built - in to UML, it will be linked as a shared binary. This is inconvenient - for use in a chroot jail. So, if you intend to run UML inside a - chroot, and you disable CONFIG_MODE_TT, you probably want to say Y - here. + 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 - disabling CONFIG_MODE_TT and enabling this option leads - to best results for this. - -config KERNEL_HALF_GIGS - int "Kernel address space size (in .5G units)" - default "1" - depends on MODE_TT - help - This determines the amount of address space that UML will allocate for - its own, measured in half Gigabyte units. The default is 1. - Change this only if you need to boot UML with an unusually large amount - of physical memory. - -config MODE_SKAS - bool "Separate Kernel Address Space support" if MODE_TT - default y - help - This option controls whether skas (separate kernel address space) - support is compiled in. - Unless you have specific needs to use TT mode (which applies almost only - to developers), you should say Y here. - SKAS mode will make use of the SKAS3 patch if it is applied on the host - (and your UML will run in SKAS3 mode), but if no SKAS patch is applied - on the host it will run in SKAS0 mode, which is anyway faster than TT - mode. + 2.75G) for UML. source "arch/um/Kconfig.arch" source "mm/Kconfig" @@ -118,7 +79,7 @@ source "mm/Kconfig" config LD_SCRIPT_STATIC bool default y - depends on MODE_TT || STATIC_LINK + depends on STATIC_LINK config LD_SCRIPT_DYN bool @@ -220,7 +181,7 @@ config SMP bool "Symmetric multi-processing support (EXPERIMENTAL)" default n #SMP_BROKEN is for x86_64. - depends on MODE_TT && EXPERIMENTAL && (!SMP_BROKEN || (BROKEN && SMP_BROKEN)) + depends on EXPERIMENTAL && (!SMP_BROKEN || (BROKEN && SMP_BROKEN)) help This option enables UML SMP support. It is NOT related to having a real SMP box. Not directly, at least. @@ -258,11 +219,6 @@ config NEST_LEVEL inside another UML, set CONFIG_NEST_LEVEL to one more than the host UML. - Note that if the hosting UML has its CONFIG_KERNEL_HALF_GIGS set to - greater than one, then the guest UML should have its CONFIG_NEST_LEVEL - set to the host's CONFIG_NEST_LEVEL + CONFIG_KERNEL_HALF_GIGS. - Only change this if you are running nested UMLs. - config HIGHMEM bool "Highmem support (EXPERIMENTAL)" depends on !64BIT && EXPERIMENTAL @@ -271,9 +227,9 @@ config HIGHMEM This was used to allow UML to run with big amounts of memory. Currently it is unstable, so if unsure say N. - To use big amounts of memory, it is recommended to disable TT mode (i.e. - CONFIG_MODE_TT) and enable static linking (i.e. CONFIG_STATIC_LINK) - - this should allow the guest to use up to 2.75G of memory. + To use big amounts of memory, it is recommended enable static + linking (i.e. CONFIG_STATIC_LINK) - this should allow the + guest to use up to 2.75G of memory. config KERNEL_STACK_ORDER int "Kernel stack size order" diff --git a/arch/um/Kconfig.char b/arch/um/Kconfig.char index a5b079d5e86..1168936fb15 100644 --- a/arch/um/Kconfig.char +++ b/arch/um/Kconfig.char @@ -65,8 +65,6 @@ config XTERM_CHAN 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. - If you disable this option, then CONFIG_PT_PROXY will be disabled as - well, since UML's gdb currently requires an xterm. It is safe to say 'Y' here. config NOCONFIG_CHAN diff --git a/arch/um/Kconfig.debug b/arch/um/Kconfig.debug index c86f5eb29fd..1eace4bd661 100644 --- a/arch/um/Kconfig.debug +++ b/arch/um/Kconfig.debug @@ -2,28 +2,9 @@ menu "Kernel hacking" source "lib/Kconfig.debug" -config CMDLINE_ON_HOST - bool "Show command line arguments on the host in TT mode" - depends on MODE_TT - default !DEBUG_INFO - help - This controls whether arguments in guest processes should be shown on - the host's ps output. - Enabling this option hinders debugging on some recent GDB versions - (because GDB gets "confused" when we do an execvp()). So probably you - should disable it. - -config PT_PROXY - bool "Enable ptrace proxy" - depends on XTERM_CHAN && DEBUG_INFO && MODE_TT - help - This option enables a debugging interface which allows gdb to debug - the kernel without needing to actually attach to kernel threads. - If you want to do kernel debugging, say Y here; otherwise say N. - config GPROF bool "Enable gprof support" - depends on DEBUG_INFO && MODE_SKAS && !MODE_TT + depends on DEBUG_INFO help This allows profiling of a User-Mode Linux kernel with the gprof utility. @@ -36,7 +17,7 @@ config GPROF config GCOV bool "Enable gcov support" - depends on DEBUG_INFO && MODE_SKAS + depends on DEBUG_INFO help This option allows developers to retrieve coverage data from a UML session. diff --git a/arch/um/Makefile b/arch/um/Makefile index 3efc4ffb32a..e7aa0535f5d 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -31,18 +31,9 @@ SYMLINK_HEADERS := $(foreach header,$(SYMLINK_HEADERS),include/asm-um/$(header)) ARCH_SYMLINKS = include/asm-um/arch $(ARCH_DIR)/include/sysdep $(ARCH_DIR)/os \ $(SYMLINK_HEADERS) $(ARCH_DIR)/include/uml-config.h -um-modes-$(CONFIG_MODE_TT) += tt -um-modes-$(CONFIG_MODE_SKAS) += skas +MODE_INCLUDE += -I$(srctree)/$(ARCH_DIR)/include/skas -MODE_INCLUDE += $(foreach mode,$(um-modes-y),\ - -I$(srctree)/$(ARCH_DIR)/include/$(mode)) - -MAKEFILES-INCL += $(foreach mode,$(um-modes-y),\ - $(srctree)/$(ARCH_DIR)/Makefile-$(mode)) - -ifneq ($(MAKEFILES-INCL),) - include $(MAKEFILES-INCL) -endif +include $(srctree)/$(ARCH_DIR)/Makefile-skas ARCH_INCLUDE := -I$(ARCH_DIR)/include ifneq ($(KBUILD_SRC),) @@ -89,9 +80,8 @@ CFLAGS += $(call cc-option,-fno-unit-at-a-time,) # included; the values here are meaningless CONFIG_NEST_LEVEL ?= 0 -CONFIG_KERNEL_HALF_GIGS ?= 0 -SIZE = (($(CONFIG_NEST_LEVEL) + $(CONFIG_KERNEL_HALF_GIGS)) * 0x20000000) +SIZE = ($(CONFIG_NEST_LEVEL) * 0x20000000) PHONY += linux @@ -124,7 +114,6 @@ CFLAGS_NO_HARDENING := $(call cc-option, -fno-PIC,) $(call cc-option, -fno-pic,) $(call cc-option, -fno-stack-protector,) \ $(call cc-option, -fno-stack-protector-all,) -CPP_MODE-$(CONFIG_MODE_TT) := -DMODE_TT CONFIG_KERNEL_STACK_ORDER ?= 2 STACK_SIZE := $(shell echo $$[ 4096 * (1 << $(CONFIG_KERNEL_STACK_ORDER)) ] ) @@ -132,11 +121,8 @@ ifndef START START = $(shell echo $$[ $(TOP_ADDR) - $(SIZE) ] ) endif -CPPFLAGS_vmlinux.lds = -U$(SUBARCH) \ - -DSTART=$(START) -DELF_ARCH=$(ELF_ARCH) \ - -DELF_FORMAT="$(ELF_FORMAT)" $(CPP_MODE-y) \ - -DKERNEL_STACK_SIZE=$(STACK_SIZE) \ - -DUNMAP_PATH=arch/um/sys-$(SUBARCH)/unmap.o +CPPFLAGS_vmlinux.lds = -U$(SUBARCH) -DSTART=$(START) -DELF_ARCH=$(ELF_ARCH) \ + -DELF_FORMAT="$(ELF_FORMAT)" -DKERNEL_STACK_SIZE=$(STACK_SIZE) #The wrappers will select whether using "malloc" or the kernel allocator. LINK_WRAPS = -Wl,--wrap,malloc -Wl,--wrap,free -Wl,--wrap,calloc diff --git a/arch/um/Makefile-i386 b/arch/um/Makefile-i386 index 60107ed4905..ae61e3c271e 100644 --- a/arch/um/Makefile-i386 +++ b/arch/um/Makefile-i386 @@ -2,11 +2,7 @@ core-y += arch/um/sys-i386/ arch/x86/crypto/ TOP_ADDR := $(CONFIG_TOP_ADDR) -ifeq ($(CONFIG_MODE_SKAS),y) - ifneq ($(CONFIG_MODE_TT),y) - START := 0x8048000 - endif -endif +START := 0x8048000 LDFLAGS += -m elf_i386 ELF_ARCH := $(SUBARCH) diff --git a/arch/um/defconfig b/arch/um/defconfig index 1e0f677c2f4..ed3196d8c90 100644 --- a/arch/um/defconfig +++ b/arch/um/defconfig @@ -12,9 +12,7 @@ CONFIG_IRQ_RELEASE_METHOD=y # # UML-specific options # -# CONFIG_MODE_TT is not set # CONFIG_STATIC_LINK is not set -CONFIG_MODE_SKAS=y # # Host processor type and features diff --git a/arch/um/drivers/mconsole_kern.c b/arch/um/drivers/mconsole_kern.c index d8709050740..4d563b9dde5 100644 --- a/arch/um/drivers/mconsole_kern.c +++ b/arch/um/drivers/mconsole_kern.c @@ -735,8 +735,6 @@ void mconsole_sysrq(struct mc_request *req) } #endif -#ifdef CONFIG_MODE_SKAS - static void stack_proc(void *arg) { struct task_struct *from = current, *to = arg; @@ -750,7 +748,7 @@ static void stack_proc(void *arg) * Dumps a stacks registers to the linux console. * Usage stack <pid>. */ -static void do_stack_trace(struct mc_request *req) +void mconsole_stack(struct mc_request *req) { char *ptr = req->request.data; int pid_requested= -1; @@ -781,17 +779,6 @@ static void do_stack_trace(struct mc_request *req) } with_console(req, stack_proc, to); } -#endif /* CONFIG_MODE_SKAS */ - -void mconsole_stack(struct mc_request *req) -{ - /* This command doesn't work in TT mode, so let's check and then - * get out of here - */ - CHOOSE_MODE(mconsole_reply(req, "Sorry, this doesn't work in TT mode", - 1, 0), - do_stack_trace(req)); -} /* Changed by mconsole_setup, which is __setup, and called before SMP is * active. diff --git a/arch/um/include/as-layout.h b/arch/um/include/as-layout.h index fccf187bf4e..e44f32940f8 100644 --- a/arch/um/include/as-layout.h +++ b/arch/um/include/as-layout.h @@ -28,7 +28,6 @@ extern unsigned long _unprotected_end; extern unsigned long brk_start; extern int linux_main(int argc, char **argv); -extern void set_cmdline(char *cmd); extern void (*sig_info[])(int, union uml_pt_regs *); diff --git a/arch/um/include/choose-mode.h b/arch/um/include/choose-mode.h index b87b36a87d9..51a387626da 100644 --- a/arch/um/include/choose-mode.h +++ b/arch/um/include/choose-mode.h @@ -8,26 +8,8 @@ #include "uml-config.h" -#if defined(UML_CONFIG_MODE_TT) && defined(UML_CONFIG_MODE_SKAS) -#define CHOOSE_MODE(tt, skas) (mode_tt ? (tt) : (skas)) - -extern int mode_tt; -static inline void *__choose_mode(void *tt, void *skas) { - return mode_tt ? tt : skas; -} - -#define __CHOOSE_MODE(tt, skas) (*( (typeof(tt) *) __choose_mode(&(tt), &(skas)))) - -#elif defined(UML_CONFIG_MODE_SKAS) #define CHOOSE_MODE(tt, skas) (skas) -#elif defined(UML_CONFIG_MODE_TT) -#define CHOOSE_MODE(tt, skas) (tt) - -#else -#error CONFIG_MODE_SKAS and CONFIG_MODE_TT are both disabled -#endif - #define CHOOSE_MODE_PROC(tt, skas, args...) \ CHOOSE_MODE(tt(args), skas(args)) diff --git a/arch/um/include/common-offsets.h b/arch/um/include/common-offsets.h index 2378ff42e41..439b91f141a 100644 --- a/arch/um/include/common-offsets.h +++ b/arch/um/include/common-offsets.h @@ -1,9 +1,6 @@ /* for use by sys-$SUBARCH/kernel-offsets.c */ DEFINE(KERNEL_MADV_REMOVE, MADV_REMOVE); -#ifdef CONFIG_MODE_TT -OFFSET(HOST_T |