fixes for some compilation errors
RFC PATCH 1/1 fixes for some compilation errors
The patches in the patch tarball at
http://user-mode-linux.sf.net/patches.html for 2.6.15-rc1 kernel do not apply cleanly. Its the last patch constant-page-size which has the issue. There were some compilation issues too in
arch/um/include/tt/mode_kern_tt.harch/um/sys-i386/stub_segv.carch/um/kernel/skas/clone.carch/um/kernel/tt/process_kern.c
The following patch fixes them, but I am not sure if they are correct Please check,
RP
arch/um/include/tt/mode_kern_tt.h | 2 +- arch/um/kernel/skas/clone.c | 12 +++++++----- arch/um/sys-i386/stub_segv.c | 2 +- 3 files changed, 9 insertions(+), 7 deletions(-)
arch/um/include/tt/mode_kern_tt.h +1 -1
@@ -9,11 +9,11 @@#include "linux/sched.h" #include "asm/page.h" #include "asm/ptrace.h" #include "asm/uaccess.h" -extern void *switch_to_tt (void *prev,void *next); +extern void switch_to_tt (void *prev,void *next);extern void flush_thread_tt (void );extern void start_thread_tt (struct pt_regs *regs,unsigned long eip,unsigned long esp); extern int copy_thread_tt(int nr, unsigned long clone_flags, unsigned long sp, unsigned long stack_top, struct task_struct *p,
arch/um/sys-i386/stub_segv.c +1 -1
@@ -2,11 +2,11 @@* Copyright (C) 2004 Jeff Dike ([email protected]) * Licensed under the GPL */ #include <sys/select.h> /* The only way I can see to get sigset_t */ -#include <asm/signal.h> +//#include <asm/signal.h> #include <asm/unistd.h> #include "uml-config.h" #include "sysdep/stub.h" #include "sysdep/sigcontext.h" #include "sysdep/faultinfo.h"
arch/um/kernel/skas/clone.c +7 -5
@@ -7,10 +7,11 @@#include "ptrace_user.h" #include "skas.h" #include "stub-data.h" #include "uml-config.h" #include "sysdep/stub.h" +#include "kern_constants.h" /* This is in a separate file because it needs to be compiled with any * extraneous gcc flags (-pg, -fprofile-arcs, -ftest-coverage) disabled */
@@ -18,29 +19,30 @@void __attribute__ ((__section__ (".__syscall_stub" )))stub_clone_handler (void ) {long err; +struct stub_data *from = (struct stub_data *)UML_CONFIG_STUB_DATA ; err =stub_syscall2 (__NR_clone,CLONE_PARENT |CLONE_FILES |SIGCHLD , -UML_CONFIG_STUB_DATA +PAGE_SIZE /2 - +UML_CONFIG_STUB_DATA +UM_KERN_PAGE_SIZE /2 -sizeof (void *));if (err !=0 ) goto out; err =stub_syscall4 (__NR_ptrace,PTRACE_TRACEME ,0 ,0 ,0 );if (err) goto out; err =stub_syscall3 (__NR_setitimer,ITIMER_VIRTUAL , - (long )STUB_DATA (timer),0 ); + (long ) &from->timer,0 );if (err) goto out; - err =stub_syscall6 (STUB_MMAP_NR ,UML_CONFIG_STUB_DATA ,PAGE_SIZE , -PROT_READ |PROT_WRITE ,MAP_FIXED |MAP_SHARED , -STUB_DATA (fd),STUB_DATA (offset)); + err =stub_syscall6 (STUB_MMAP_NR ,UML_CONFIG_STUB_DATA , +UM_KERN_PAGE_SIZE ,PROT_READ |PROT_WRITE , +MAP_FIXED |MAP_SHARED , from->fd, from->offset); out:/* save current result. Parent: pid; child: retcode of mmap */ STUB_DATA (err) = err;trap_myself (); }
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
arch/um/include/tt/mode_kern_tt.h line 14
Quoted 2 lines · Ram Pai
arch/um/include/tt/mode_kern_tt.h +1
-1-extern void *switch_to_tt (void *prev,void *next); +extern void switch_to_tt (void *prev,void *next);
Oops, I hadn't built with CONFIG_MODE_TT enabled in a while.
arch/um/sys-i386/stub_segv.c line 7
Quoted 2 lines
arch/um/sys-i386/stub_segv.c +1
-1-#include <asm/signal.h> +//#include <asm/signal.h>
I now have this as <signal.h> which works here - can you check this?
Quoted 1 line
+#include "
kern_constants.h"
I already have this, I may not have refreshed the patch before pushing it out.
arch/um/kernel/skas/clone.c line 37
Quoted 3 lines
arch/um/kernel/skas/clone.c +1
-1err =stub_syscall3 (__NR_setitimer,ITIMER_VIRTUAL , - (long )STUB_DATA (timer),0 ); + (long ) &from->timer,0 );
What were these doing to you?
I pushed out a fixed patchset - can you recheck?
Jeff
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 16 lines · Jeff Dike
arch/um/include/tt/mode_kern_tt.h line 14
Quoted 2 lines · Ram Pai
arch/um/include/tt/mode_kern_tt.h +1
-1-extern void *switch_to_tt (void *prev,void *next); +extern void switch_to_tt (void *prev,void *next);Oops, I hadn't built with
CONFIG_MODE_TTenabled in a while.arch/um/sys-i386/stub_segv.c line 7
Quoted 2 lines
arch/um/sys-i386/stub_segv.c +1
-1-#include <asm/signal.h> +//#include <asm/signal.h> I now have this as <
signal.h> which works here - can you check this?Quoted 1 line
+#include "
kern_constants.h"I already have this, I may not have refreshed the patch before pushing it out.
Quoted 7 lines
arch/um/kernel/skas/clone.c line 37
Quoted 3 lines
arch/um/kernel/skas/clone.c +1
-1err =stub_syscall3 (__NR_setitimer,ITIMER_VIRTUAL , - (long )STUB_DATA (timer),0 ); + (long ) &from->timer,0 );What were these doing to you?
I pushed out a fixed patchset - can you recheck?
no. the last patch does not apply cleanly and it gives compilation errors.
make -j32 arch/um/kernel/skas/clone.o ARCH=um
CC arch/um/kernel/skas/clone.oarch/um/kernel/skas/clone.c: In function `stub_clone_handler':arch/um/kernel/skas/clone.c:39: error: aggregate value used where an integer was expected
make[1]: *** [arch/um/kernel/skas/clone.o] Error 1
make: *** [arch/um/kernel/skas/clone.o] Error 2
RP
Quoted 4 lines
Jeff
Quoted 9 lines
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 7 lines · Ram Pai
make -j32
arch/um/kernel/skas/clone.oARCH=um
CCarch/um/kernel/skas/clone.oarch/um/kernel/skas/clone.c: In function `stub_clone_handler':arch/um/kernel/skas/clone.c:39: error: aggregate value used where an integer was expected
make[1]: *** [arch/um/kernel/skas/clone.o] Error 1
make: *** [arch/um/kernel/skas/clone.o] Error 2
OK, I fixed this. That was the first patch in the series, and I was forgetting to refresh it.
What was the bit about a patch not applying cleanly? I just pulled my tarball, and everything is clean.
Jeff
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel
Quoted 9 lines · Jeff Dike
Quoted 7 lines · Ram Pai
make -j32
arch/um/kernel/skas/clone.oARCH=um
CCarch/um/kernel/skas/clone.oarch/um/kernel/skas/clone.c: In function `stub_clone_handler':arch/um/kernel/skas/clone.c:39: error: aggregate value used where an integer was expected
make[1]: *** [arch/um/kernel/skas/clone.o] Error 1
make: *** [arch/um/kernel/skas/clone.o] Error 2
Quoted 5 lines
OK, I fixed this. That was the first patch in the series, and I was forgetting to refresh it.
What was the bit about a patch not applying cleanly? I just pulled my tarball, and everything is clean.
Ok. confirmed. It works now! Patches apply cleanly and compiles cleanly too.
RP
-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc. Get Certified Today Register for a JBoss Training Course. Free Certification Exam for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_id=7628&alloc_id=16845&op=click
_______________________________________________
User-mode-linux-devel mailing list [email protected]
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel