1 Feb 2004 13:54
Patch for UML running on exec-shield hosts
M A Young <m.a.young <at> durham.ac.uk>
2004-02-01 12:54:41 GMT
2004-02-01 12:54:41 GMT
Here is a revised version of my patch to address the UML crash when you try to run it on a host kernel with exec-shield enabled, such as on fedora core 1. The change is that it increases the value of the physmem_size for exec-shield users, so they actually get the memory they asked for (and adds zero in the non-exec shield case). Michael Young
diff -Naur linux-2.4.22/arch/um/kernel/tt/mem.c.orig linux-2.4.22/arch/um/kernel/tt/mem.c --- linux-2.4.22/arch/um/kernel/tt/mem.c.orig 2003-11-11 21:52:30.000000000 +0000 +++ linux-2.4.22/arch/um/kernel/tt/mem.c 2003-11-12 20:06:37.000000000 +0000 <at> <at> -18,7 +18,7 <at> <at> if(!jail || debug) remap_data(UML_ROUND_DOWN(&_stext), UML_ROUND_UP(&_etext), 1); remap_data(UML_ROUND_DOWN(&_sdata), UML_ROUND_UP(&_edata), 1); - remap_data(UML_ROUND_DOWN(&__bss_start), UML_ROUND_UP(brk_start), 1); + remap_data(UML_ROUND_DOWN(&__bss_start), UML_ROUND_UP(&_end), 1); } #ifdef CONFIG_HOST_2G_2G diff -Naur linux-2.4.22/arch/um/kernel/tt/process_kern.c.orig linux-2.4.22/arch/um/kernel/tt/process_kern.c --- linux-2.4.22/arch/um/kernel/tt/process_kern.c.orig 2003-11-11 21:52:30.000000000 +0000 +++ linux-2.4.22/arch/um/kernel/tt/process_kern.c 2003-11-12 20:07:46.000000000 +0000 <at> <at> -405,7 +405,7 <at> <at> protect_memory(start, end - start, 1, w, 1, 1); start = (unsigned long) UML_ROUND_DOWN(&__bss_start); - end = (unsigned long) UML_ROUND_UP(brk_start); + end = (unsigned long) UML_ROUND_UP(&_end); protect_memory(start, end - start, 1, w, 1, 1);(Continue reading)
RSS Feed