M A Young | 1 Feb 2004 13:54
Picon
Picon

Patch for UML running on exec-shield hosts

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)

M A Young | 1 Feb 2004 14:03
Picon
Picon

sigjmp cleanup patch (2.6)

This patch cleans up the code so that the sigsetjmp calls use the correct
data type (sigjmp_buf rather than jmp_buf). This could fix a potential
bug, though I don't know of any actual bugs that this fixes. The patch is
for 2.6, though 2.4 has the same issue also.

	Michael Young
diff -Naur linux-2.6.0/arch/um/kernel/trap_user.c.orig linux-2.6.0/arch/um/kernel/trap_user.c
--- linux-2.6.0/arch/um/kernel/trap_user.c.orig	2004-01-13 23:21:34.264491000 +0000
+++ linux-2.6.0/arch/um/kernel/trap_user.c	2004-01-13 23:22:17.054491000 +0000
 <at>  <at>  -121,7 +121,7  <at>  <at> 
 
 void do_longjmp(void *b, int val)
 {
-	jmp_buf *buf = b;
+	sigjmp_buf *buf = b;
 
 	siglongjmp(*buf, val);
 }
diff -Naur linux-2.6.0/arch/um/kernel/process.c.orig linux-2.6.0/arch/um/kernel/process.c
--- linux-2.6.0/arch/um/kernel/process.c.orig	2004-01-13 23:20:09.004491000 +0000
+++ linux-2.6.0/arch/um/kernel/process.c	2004-01-13 23:21:10.264491000 +0000
 <at>  <at>  -231,7 +231,7  <at>  <at> 
 
 int run_kernel_thread(int (*fn)(void *), void *arg, void **jmp_ptr)
 {
-	jmp_buf buf;
+	sigjmp_buf buf;
 	int n;
 
(Continue reading)

Jeff Dike | 1 Feb 2004 21:09

Re: Patch for UML running on exec-shield hosts

On Sun, Feb 01, 2004 at 12:54:41PM +0000, M A Young wrote:
> 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. 

Applied, thanks.

> 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).

I'm not so sure about this part.  I need to think about it.

				Jeff

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Jeff Dike | 1 Feb 2004 21:17

Re: sigjmp cleanup patch (2.6)

On Sun, Feb 01, 2004 at 01:03:18PM +0000, M A Young wrote:
> This patch cleans up the code so that the sigsetjmp calls use the correct
> data type (sigjmp_buf rather than jmp_buf). This could fix a potential
> bug, though I don't know of any actual bugs that this fixes. The patch is
> for 2.6, though 2.4 has the same issue also.

Thanks, I thought I got them all.  I applied this to my 2.4 tree - they'll
get merged into my 2.6 tree next time I update it.

				Jeff

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
BlaisorBlade | 1 Feb 2004 20:13
Picon
Favicon

Re: User Mode Linux (UML) Host Skas3 patch for Linux Kernel 2.6.1 2004-01-09

Alle 18:55, sabato 10 gennaio 2004, Stephen D. Williams ha scritto:
> I was able to port to 2.6.1, yesterday's stable Linux kernel, the
> versions of the UML Skas3 patch that Steven James had ported to
> 2.6.0-test1.  This patch is based on a clean 2.6.1 base.
An user reports a bug with your patch; search for this thread inside the 
uml-user mailing list:

"[uml-user] 2.6.1-skas3 host oops"

there is another port (with no reported bugs) by Ingo Molnar with this title 
in the same ML:

[uml-user] [patch] host-skas support for 2.6.0, other UML fixes

FYI, I use marc.theaimsgroup.com as web ML archive.

Bye
--

-- 
cat <<EOSIGN
Paolo Giarrusso, aka Blaisorblade
Linux Kernel 2.4.23/2.6.0 on an i686; Linux registered user n. 292729
EOSIGN

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Stephen D. Williams | 2 Feb 2004 22:09
Favicon
Gravatar

Re: User Mode Linux (UML) Host Skas3 patch for Linux Kernel 2.6.1 2004-01-09

Retracted...  Thanks for the note.

sdw

BlaisorBlade wrote:

>Alle 18:55, sabato 10 gennaio 2004, Stephen D. Williams ha scritto:
>  
>
>>I was able to port to 2.6.1, yesterday's stable Linux kernel, the
>>versions of the UML Skas3 patch that Steven James had ported to
>>2.6.0-test1.  This patch is based on a clean 2.6.1 base.
>>    
>>
>An user reports a bug with your patch; search for this thread inside the 
>uml-user mailing list:
>
>"[uml-user] 2.6.1-skas3 host oops"
>
>there is another port (with no reported bugs) by Ingo Molnar with this title 
>in the same ML:
>
>[uml-user] [patch] host-skas support for 2.6.0, other UML fixes
>
>FYI, I use marc.theaimsgroup.com as web ML archive.
>
>Bye
>  
>

(Continue reading)

Sven 'Darkman' Michels | 3 Feb 2004 01:16
Picon

[uml-user] wall on shutdown

Hi there,

i've got a small problem here:
i'll use mconsoles cad feature to shutdown my uml. It works mostly like
it should. But sometimes the shutdown doesn't send the well known wall
msg. I tried multiple kernel configs etc., but it seems to be a race
condition. 2 times it worked, 3-4-5-6 time it doesn't work. The UML
simply goes down (clean shutdown, all ok execpt the missing wall).
Now i added a echo bla | wall; shutdown to the inittab, that 'works'
but isn't very beautiful ;)

Someone knows about this issue? I use debian (testing on the host,
stable inside the uml, also tested with the image from the page,
same problem) and kernel 2.4.24 (host), 2.4.24 with 2.4.23-2um patch.

Regards,
Sven

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Ingo Molnar | 3 Feb 2004 13:05
Picon
Picon
Favicon

[patch] uml-fixes-2.6.2-rc3-mm1-A2


the attached patch fixes UML on 2.6.2-rc3-mm1:

 - generic: dmapool.o depends on CONFIG_PCI

 - x86: reshuffle the way TASK_SIZE is defined on x86. [UML relied 
        on a specific order of definitions within the x86 header files, 
        the  4/4 patch broke this assumption.]

 - UML: sys_call_table.c: syscall layout changed

 - UML: um_arch.c: handle_sysrq() changed

UML compiles & works fine with this patch applied.

	Ingo
--- linux/drivers/base/Makefile.orig	
+++ linux/drivers/base/Makefile	
 <at>  <at>  -2,7 +2,8  <at>  <at> 

 obj-y			:= core.o sys.o interface.o bus.o \
 			   driver.o class.o class_simple.o platform.o \
-			   cpu.o firmware.o init.o map.o dmapool.o
+			   cpu.o firmware.o init.o map.o
+obj-$(CONFIG_PCI)	+= dmapool.o
 obj-y			+= power/
 obj-$(CONFIG_FW_LOADER)	+= firmware_class.o
 obj-$(CONFIG_NUMA)	+= node.o
(Continue reading)

gboutwel | 4 Feb 2004 18:38

UML & 2.6.2

Hey!

  Here we go again.  I just checked out the 2.6.2 release ChangeLog.
 Only thing I can see in there related to UML is a minor compile
fix.

  Do get an SKAS3/4 2.6.2 Host, and a 2.6.2 guest.  What do I
need?  the Kernel Source, Ingos' combo patch (for SKAS), and
the um-patch-2.6.1?

Thanks,

George

-----------------------------------------

Love to Chat?

Start talking in the Christian Chat Rooms

http://www.praize.com/chat/

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
Matt Ayres | 4 Feb 2004 20:12
Favicon

Hang on boot with 2.6.*

Hi,

I'm still fairly new to UML so perhaps this is a known issue and there
is a simple workaround.

I've tried 2.6.1-1um, 2.6.0-1um, 2.6.0-test9-1um, Ingo's A7 combo patch,
and Blaisorblade's v8 patches for 2.6.0.  On every single one whenever I
try to boot it just hangs when it should be starting init (aka. After
"Mounted devfs on /dev").

So it's obvious it's probably not a kernel problem and is user error on
my part.  I noticed with problem with 2.4.23-1um with the RTC/high mhz
bug, however I disabled RTC in the kernel configs and still had this
problem, not to mention the older kernels did not have this problem.

Has anyone had this problem and can offer a tip on what I am possibly
doing wrong? Host is 2.4.24.

Thanks,
Matt

-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn

Gmane