]> git.proxmox.com Git - mirror_ubuntu-zesty-kernel.git/blobdiff - arch/um/kernel/um_arch.c
[PATCH] uml: move libc-dependent code from signal_user.c
[mirror_ubuntu-zesty-kernel.git] / arch / um / kernel / um_arch.c
index 09f6f7ce4695f73c10a1507acfb122b854cf2fe5..26626b2b9172cfbd9a230cad4e95684682105825 100644 (file)
@@ -137,7 +137,7 @@ static char *argv1_end = NULL;
 
 /* Set in early boot */
 static int have_root __initdata = 0;
-long physmem_size = 32 * 1024 * 1024;
+long long physmem_size = 32 * 1024 * 1024;
 
 void set_cmdline(char *cmd)
 {
@@ -146,8 +146,8 @@ void set_cmdline(char *cmd)
 
        if(CHOOSE_MODE(honeypot, 0)) return;
 
-       umid = get_umid(1);
-       if(umid != NULL){
+       umid = get_umid();
+       if(*umid != '\0'){
                snprintf(argv1_begin, 
                         (argv1_end - argv1_begin) * sizeof(*ptr), 
                         "(%s) ", umid);
@@ -334,6 +334,8 @@ int linux_main(int argc, char **argv)
                add_arg(DEFAULT_COMMAND_LINE);
 
        os_early_checks();
+       if (force_tt)
+               clear_can_do_skas();
        mode_tt = force_tt ? 1 : !can_do_skas();
 #ifndef CONFIG_MODE_TT
        if (mode_tt) {
@@ -361,11 +363,6 @@ int linux_main(int argc, char **argv)
        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
@@ -405,7 +402,7 @@ int linux_main(int argc, char **argv)
 #ifndef CONFIG_HIGHMEM
                highmem = 0;
                printf("CONFIG_HIGHMEM not enabled - physical memory shrunk "
-                      "to %ld bytes\n", physmem_size);
+                      "to %lu bytes\n", physmem_size);
 #endif
        }
 
@@ -417,8 +414,8 @@ int linux_main(int argc, char **argv)
 
        setup_physmem(uml_physmem, uml_reserved, physmem_size, highmem);
        if(init_maps(physmem_size, iomem_size, highmem)){
-               printf("Failed to allocate mem_map for %ld bytes of physical "
-                      "memory and %ld bytes of highmem\n", physmem_size,
+               printf("Failed to allocate mem_map for %lu bytes of physical "
+                      "memory and %lu bytes of highmem\n", physmem_size,
                       highmem);
                exit(1);
        }
@@ -429,7 +426,7 @@ int linux_main(int argc, char **argv)
        end_vm = start_vm + virtmem_size;
 
        if(virtmem_size < physmem_size)
-               printf("Kernel virtual memory size shrunk to %ld bytes\n",
+               printf("Kernel virtual memory size shrunk to %lu bytes\n",
                       virtmem_size);
 
        uml_postsetup();