X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=arch%2Fum%2Fkernel%2Fum_arch.c;h=bffd8316f89230c576d9d810e24ef5b13021c9f7;hb=6a77f38946aaee1cd85eeec6cf4229b204c15071;hp=9146c11e5069a8feec53b0028349131d61299c35;hpb=87fc8d1bb10cd459024a742c6a10961fefcef18f;p=linux-2.6.git diff --git a/arch/um/kernel/um_arch.c b/arch/um/kernel/um_arch.c index 9146c11e5..bffd8316f 100644 --- a/arch/um/kernel/um_arch.c +++ b/arch/um/kernel/um_arch.c @@ -17,6 +17,7 @@ #include "linux/sysrq.h" #include "linux/seq_file.h" #include "linux/delay.h" +#include "linux/module.h" #include "asm/page.h" #include "asm/pgtable.h" #include "asm/ptrace.h" @@ -44,11 +45,6 @@ struct cpuinfo_um boot_cpu_data = { .ipi_pipe = { -1, -1 } }; -/* Placeholder to make UML link until the vsyscall stuff is actually - * implemented - */ -void *__kernel_vsyscall; - unsigned long thread_saved_pc(struct task_struct *task) { return(os_process_pc(CHOOSE_MODE_PROC(thread_pid_tt, thread_pid_skas, @@ -161,6 +157,8 @@ static int __init uml_version_setup(char *line, int *add) { printf("%s\n", system_utsname.release); exit(0); + + return 0; } __uml_setup("--version", uml_version_setup, @@ -200,7 +198,7 @@ __uml_setup("ncpus=", uml_ncpus_setup, ); #endif -int force_tt = 0; +static int force_tt = 0; #if defined(CONFIG_MODE_TT) && defined(CONFIG_MODE_SKAS) #define DEFAULT_TT 0 @@ -261,6 +259,8 @@ static int __init Usage(char *line, int *add) p++; } exit(0); + + return 0; } __uml_setup("--help", Usage, @@ -300,6 +300,7 @@ static void __init uml_postsetup(void) /* Set during early boot */ unsigned long brk_start; unsigned long end_iomem; +EXPORT_SYMBOL(end_iomem); #define MIN_VMALLOC (32 * 1024 * 1024) @@ -318,9 +319,22 @@ int linux_main(int argc, char **argv) if(have_root == 0) add_arg(saved_command_line, DEFAULT_COMMAND_LINE); mode_tt = force_tt ? 1 : !can_do_skas(); +#ifndef CONFIG_MODE_TT + if (mode_tt) { + /*Since CONFIG_MODE_TT is #undef'ed, force_tt cannot be 1. So, + * can_do_skas() returned 0, and the message is correct. */ + printf("Support for TT mode is disabled, and no SKAS support is present on the host.\n"); + exit(1); + } +#endif uml_start = CHOOSE_MODE_PROC(set_task_sizes_tt, set_task_sizes_skas, 0, &host_task_size, &task_size); + /* Need to check this early because mmapping happens before the + * kernel is running. + */ + check_tmpexec(); + brk_start = (unsigned long) sbrk(0); CHOOSE_MODE_PROC(before_mem_tt, before_mem_skas, brk_start); /* Increase physical memory size for exec-shield users @@ -400,9 +414,9 @@ extern int uml_exitcode; static int panic_exit(struct notifier_block *self, unsigned long unused1, void *unused2) { -#ifdef CONFIG_MAGIC_SYSRQ - handle_sysrq('p', ¤t->thread.regs, NULL); -#endif + bust_spinlocks(1); + show_regs(&(current->thread.regs)); + bust_spinlocks(0); uml_exitcode = 1; machine_halt(); return(0);