All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] [RFC PATCH] fixes for some compilation errors
@ 2005-11-15 23:30 Ram Pai
  2005-11-16  1:23 ` Jeff Dike
  0 siblings, 1 reply; 5+ messages in thread
From: Ram Pai @ 2005-11-15 23:30 UTC (permalink / raw)
  To: user-mode-linux-devel

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.h
arch/um/sys-i386/stub_segv.c
arch/um/kernel/skas/clone.c
arch/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(-)

Index: 2.6.15-rc1/arch/um/include/tt/mode_kern_tt.h
===================================================================
--- 2.6.15-rc1.orig/arch/um/include/tt/mode_kern_tt.h
+++ 2.6.15-rc1/arch/um/include/tt/mode_kern_tt.h
@@ -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,
Index: 2.6.15-rc1/arch/um/sys-i386/stub_segv.c
===================================================================
--- 2.6.15-rc1.orig/arch/um/sys-i386/stub_segv.c
+++ 2.6.15-rc1/arch/um/sys-i386/stub_segv.c
@@ -2,11 +2,11 @@
  * Copyright (C) 2004 Jeff Dike (jdike@addtoit.com)
  * 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"
Index: 2.6.15-rc1/arch/um/kernel/skas/clone.c
===================================================================
--- 2.6.15-rc1.orig/arch/um/kernel/skas/clone.c
+++ 2.6.15-rc1/arch/um/kernel/skas/clone.c
@@ -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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [uml-devel] [RFC PATCH] fixes for some compilation errors
  2005-11-15 23:30 [uml-devel] [RFC PATCH] fixes for some compilation errors Ram Pai
@ 2005-11-16  1:23 ` Jeff Dike
  2005-11-16 10:42   ` Ram Pai
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Dike @ 2005-11-16  1:23 UTC (permalink / raw)
  To: Ram Pai; +Cc: user-mode-linux-devel

On Tue, Nov 15, 2005 at 03:30:06PM -0800, Ram Pai wrote:
> -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.

> -#include <asm/signal.h>
> +//#include <asm/signal.h>

I now have this as <signal.h> which works here - can you check this?

> +#include "kern_constants.h"

I already have this, I may not have refreshed the patch before pushing it
out.

>  	err = 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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [uml-devel] [RFC PATCH] fixes for some compilation errors
  2005-11-16  1:23 ` Jeff Dike
@ 2005-11-16 10:42   ` Ram Pai
  2005-11-16 19:18     ` Jeff Dike
  0 siblings, 1 reply; 5+ messages in thread
From: Ram Pai @ 2005-11-16 10:42 UTC (permalink / raw)
  To: Jeff Dike; +Cc: user-mode-linux-devel

On Tue, 2005-11-15 at 17:23, Jeff Dike wrote:
> On Tue, Nov 15, 2005 at 03:30:06PM -0800, Ram Pai wrote:
> > -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.
> 
> > -#include <asm/signal.h>
> > +//#include <asm/signal.h>
> 
> I now have this as <signal.h> which works here - can you check this?
> 
> > +#include "kern_constants.h"
> 
> I already have this, I may not have refreshed the patch before pushing it
> out.
> 
> >  	err = 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.o
arch/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




> 
> 				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
> User-mode-linux-devel@lists.sourceforge.net
> 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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [uml-devel] [RFC PATCH] fixes for some compilation errors
  2005-11-16 10:42   ` Ram Pai
@ 2005-11-16 19:18     ` Jeff Dike
  2005-11-17 22:43       ` Ram Pai
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Dike @ 2005-11-16 19:18 UTC (permalink / raw)
  To: Ram Pai; +Cc: user-mode-linux-devel

On Wed, Nov 16, 2005 at 02:42:13AM -0800, Ram Pai wrote:
> make -j32 arch/um/kernel/skas/clone.o ARCH=um
>   CC      arch/um/kernel/skas/clone.o
> arch/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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [uml-devel] [RFC PATCH] fixes for some compilation errors
  2005-11-16 19:18     ` Jeff Dike
@ 2005-11-17 22:43       ` Ram Pai
  0 siblings, 0 replies; 5+ messages in thread
From: Ram Pai @ 2005-11-17 22:43 UTC (permalink / raw)
  To: Jeff Dike; +Cc: user-mode-linux-devel

On Wed, 2005-11-16 at 11:18, Jeff Dike wrote:
> On Wed, Nov 16, 2005 at 02:42:13AM -0800, Ram Pai wrote:
> > make -j32 arch/um/kernel/skas/clone.o ARCH=um
> >   CC      arch/um/kernel/skas/clone.o
> > arch/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.

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
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2005-11-17 22:44 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-15 23:30 [uml-devel] [RFC PATCH] fixes for some compilation errors Ram Pai
2005-11-16  1:23 ` Jeff Dike
2005-11-16 10:42   ` Ram Pai
2005-11-16 19:18     ` Jeff Dike
2005-11-17 22:43       ` Ram Pai

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.