#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"
.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,
{
printf("%s\n", system_utsname.release);
exit(0);
+
+ return 0;
}
__uml_setup("--version", uml_version_setup,
);
#endif
-int force_tt = 0;
+static int force_tt = 0;
#if defined(CONFIG_MODE_TT) && defined(CONFIG_MODE_SKAS)
#define DEFAULT_TT 0
p++;
}
exit(0);
+
+ return 0;
}
__uml_setup("--help", Usage,
/* Set during early boot */
unsigned long brk_start;
unsigned long end_iomem;
+EXPORT_SYMBOL(end_iomem);
#define MIN_VMALLOC (32 * 1024 * 1024)
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
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);