All of lore.kernel.org
 help / color / mirror / Atom feed
* [uml-devel] Problems with the SKAS patch and 2.6
@ 2004-04-16  6:36 Steven Elliott
  2004-04-16  8:19 ` Jeff Chua
  0 siblings, 1 reply; 8+ messages in thread
From: Steven Elliott @ 2004-04-16  6:36 UTC (permalink / raw)
  To: User Mode Linux Devel

I'd like to first thank you for creating a very valuable kernel 
debugging tool.  I wish more people knew about UML as a means of 
learning about how kernels work.

I may be overlooking something, but as far as I can tell it is not 
currently possible to apply any of the SKAS patches to 2.6.

The host-skas3.patch patch has several conflicts when applied to 2.6.  I 
attempted to manually port host-skas3.patch to 2.6, but I ran into a 
missing file or function (unfortunately I can remember what it was).

Also, it is not obvious what host-skas-2.6.0-test1.diff should be 
applied to.  It seems to somehow depend on code added by the 
host-skas3.patch patch, but first applying the host-skas3.patch patch is 
not sufficient.  If someone could regenerate host-skas-2.6.0-test1.diff 
such that it can be applied to a straight 2.6 kernel that would be very 
helpful.

Right now I'll assume that there are some technical problems with 
porting SKAS to 2.6, so it is not just a simple matter of shuffling code 
from the host-skas3.patch patch to the corresponding place in 2.6.

Also, my experience has been that debugging with GDB works better when 
SKAS mode is used.  So, you might want to mention that in either the 
SKAS page or the debugging page.

-- 
-----------------------------------------------------------------------
|          Steven Elliott          |      selliott4@austin.rr.com     |
-----------------------------------------------------------------------



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&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] 8+ messages in thread

* Re: [uml-devel] Problems with the SKAS patch and 2.6
  2004-04-16  6:36 [uml-devel] Problems with the SKAS patch and 2.6 Steven Elliott
@ 2004-04-16  8:19 ` Jeff Chua
  2004-04-16 17:28   ` BlaisorBlade
  0 siblings, 1 reply; 8+ messages in thread
From: Jeff Chua @ 2004-04-16  8:19 UTC (permalink / raw)
  To: Steven Elliott; +Cc: User Mode Linux Devel

[-- Attachment #1: Type: TEXT/PLAIN, Size: 2668 bytes --]


It is possible to run SKAS on 2.6. I'm running 2.6.6-rc1-1um SKAS now.

Try the attached patch (00-2.6.6-v0-host-SKAS2.patch.bz2) for 2.6.6-rc1.
It's slightly modified from the original 00-2.6.2-v1-host-SKAS2.patch.bz2
patch, which should apply up to 2.6.5.

Up to 2.6.5, the uml kernel should compile fine, but to compile 2.6.6-rc1,
those files in arch/um/util need to be modified. I'll try to post those
modifications if you're interested. Currently, I just simply modified
those files to get the kernel to compile, and need to go back to trace the
changes.

Thanks,
Jeff


On Fri, 16 Apr 2004, Steven Elliott wrote:

> I'd like to first thank you for creating a very valuable kernel
> debugging tool.  I wish more people knew about UML as a means of
> learning about how kernels work.
>
> I may be overlooking something, but as far as I can tell it is not
> currently possible to apply any of the SKAS patches to 2.6.
>
> The host-skas3.patch patch has several conflicts when applied to 2.6.  I
> attempted to manually port host-skas3.patch to 2.6, but I ran into a
> missing file or function (unfortunately I can remember what it was).
>
> Also, it is not obvious what host-skas-2.6.0-test1.diff should be
> applied to.  It seems to somehow depend on code added by the
> host-skas3.patch patch, but first applying the host-skas3.patch patch is
> not sufficient.  If someone could regenerate host-skas-2.6.0-test1.diff
> such that it can be applied to a straight 2.6 kernel that would be very
> helpful.
>
> Right now I'll assume that there are some technical problems with
> porting SKAS to 2.6, so it is not just a simple matter of shuffling code
> from the host-skas3.patch patch to the corresponding place in 2.6.
>
> Also, my experience has been that debugging with GDB works better when
> SKAS mode is used.  So, you might want to mention that in either the
> SKAS page or the debugging page.
>
> --
> -----------------------------------------------------------------------
> |          Steven Elliott          |      selliott4@austin.rr.com     |
> -----------------------------------------------------------------------
>
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by: IBM Linux Tutorials
> Free Linux tutorial presented by Daniel Robbins, President and CEO of
> GenToo technologies. Learn everything from fundamentals to system
> administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&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
>

[-- Attachment #2: Type: APPLICATION/octet-stream, Size: 2992 bytes --]

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

* Re: [uml-devel] Problems with the SKAS patch and 2.6
  2004-04-16  8:19 ` Jeff Chua
@ 2004-04-16 17:28   ` BlaisorBlade
  0 siblings, 0 replies; 8+ messages in thread
From: BlaisorBlade @ 2004-04-16 17:28 UTC (permalink / raw)
  To: user-mode-linux-devel

[-- Attachment #1: Type: text/plain, Size: 1065 bytes --]

Alle 10:19, venerdì 16 aprile 2004, Jeff Chua ha scritto:
> It is possible to run SKAS on 2.6. I'm running 2.6.6-rc1-1um SKAS now.
>
> Try the attached patch (00-2.6.6-v0-host-SKAS2.patch.bz2) for 2.6.6-rc1.
> It's slightly modified from the original 00-2.6.2-v1-host-SKAS2.patch.bz2
> patch, which should apply up to 2.6.5.

It applies until 2.6.5, yes, but I posted some time ago a new SKAS patch onto 
my home page because that one had a bug with SMP hosts, which is fixed in the 
new one (I have reports that it now works).

Also, that patch applies onto a kernel which has already been UML - patched, 
while the later version applies onto a vanilla kernel.

There is a separate version which can be applied like the old one, i.e. onto 
the kernel + UML patch, in the main UML page.

I applied your slight change to this 2nd version and attached the result - 
test at least if it applies correctly (this one goes onto the UML patch).

Bye and thanks for your update!
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729

[-- Attachment #2: host+Uml-skas3-2.6.6-rc1-v1.patch --]
[-- Type: text/x-diff, Size: 11936 bytes --]

--- ./arch/i386/kernel/sys_i386.c.~1~	2003-12-20 17:54:25.000000000 +0100
+++ ./arch/i386/kernel/sys_i386.c	2004-02-29 16:23:11.000000000 +0100
@@ -40,7 +40,7 @@
 }
 
 /* common code for old and new mmaps */
-static inline long do_mmap2(
+long do_mmap2(struct mm_struct *mm,
 	unsigned long addr, unsigned long len,
 	unsigned long prot, unsigned long flags,
 	unsigned long fd, unsigned long pgoff)
@@ -55,9 +55,9 @@
 			goto out;
 	}
 
-	down_write(&current->mm->mmap_sem);
-	error = do_mmap_pgoff(file, addr, len, prot, flags, pgoff);
-	up_write(&current->mm->mmap_sem);
+	down_write(&mm->mmap_sem);
+	error = __do_mmap_pgoff(mm, file, addr, len, prot, flags, pgoff);
+	up_write(&mm->mmap_sem);
 
 	if (file)
 		fput(file);
@@ -69,7 +69,7 @@
 	unsigned long prot, unsigned long flags,
 	unsigned long fd, unsigned long pgoff)
 {
-	return do_mmap2(addr, len, prot, flags, fd, pgoff);
+	return do_mmap2(current->mm, addr, len, prot, flags, fd, pgoff);
 }
 
 /*
@@ -100,7 +100,7 @@
 	if (a.offset & ~PAGE_MASK)
 		goto out;
 
-	err = do_mmap2(a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT);
+	err = do_mmap2(current->mm, a.addr, a.len, a.prot, a.flags, a.fd, a.offset >> PAGE_SHIFT);
 out:
 	return err;
 }
--- ./arch/i386/kernel/ptrace.c.~1~	2003-12-20 17:54:25.000000000 +0100
+++ ./arch/i386/kernel/ptrace.c	2004-02-29 16:23:11.000000000 +0100
@@ -14,3 +14,4 @@
 #include <linux/audit.h>
+#include <linux/proc_mm.h>
 
 #include <asm/uaccess.h>
@@ -507,6 +508,56 @@
 					     addr, (struct user_desc __user *) data);
 		break;
 
+#ifdef CONFIG_PROC_MM
+	case PTRACE_FAULTINFO: {
+		struct ptrace_faultinfo fault;
+
+		fault = ((struct ptrace_faultinfo) 
+			{ .is_write	= child->thread.error_code,
+			  .addr		= child->thread.cr2 });
+		ret = copy_to_user((unsigned long *) data, &fault, 
+				   sizeof(fault));
+		if(ret)
+			break;
+		break;
+	}
+
+	case PTRACE_SIGPENDING:
+		ret = copy_to_user((unsigned long *) data, 
+				   &child->pending.signal,
+				   sizeof(child->pending.signal));
+		break;
+
+	case PTRACE_LDT: {
+		struct ptrace_ldt ldt;
+
+		if(copy_from_user(&ldt, (unsigned long *) data, 
+				  sizeof(ldt))){
+			ret = -EIO;
+			break;
+		}
+		ret = modify_ldt(child->mm, ldt.func, ldt.ptr, ldt.bytecount);
+		break;
+	}
+
+	case PTRACE_SWITCH_MM: {
+		struct mm_struct *old = child->mm;
+		struct mm_struct *new = proc_mm_get_mm(data);
+
+		if(IS_ERR(new)){
+			ret = PTR_ERR(new);
+			break;
+		}
+
+		atomic_inc(&new->mm_users);
+		child->mm = new;
+		child->active_mm = new;
+		mmput(old);
+		ret = 0;
+		break;
+	}
+#endif
+
 	default:
 		ret = ptrace_request(child, request, addr, data);
 		break;
--- ./arch/i386/kernel/ldt.c.~1~	2003-12-25 19:23:56.000000000 +0100
+++ ./arch/i386/kernel/ldt.c	2004-02-29 16:23:11.000000000 +0100
@@ -54,7 +54,7 @@
 	pc->size = mincount;
 	wmb();
 
-	if (reload) {
+	if (reload && (&current->active_mm->context == pc)) {
 #ifdef CONFIG_SMP
 		cpumask_t mask;
 		preempt_disable();
@@ -89,14 +89,12 @@
  * we do not have to muck with descriptors here, that is
  * done in switch_mm() as needed.
  */
-int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
+int __init_new_context(struct mm_struct *mm, struct mm_struct *old_mm)
 {
-	struct mm_struct * old_mm;
 	int retval = 0;
 
 	init_MUTEX(&mm->context.sem);
 	mm->context.size = 0;
-	old_mm = current->mm;
 	if (old_mm && old_mm->context.size > 0) {
 		down(&old_mm->context.sem);
 		retval = copy_ldt(&mm->context, &old_mm->context);
@@ -105,6 +103,11 @@
 	return retval;
 }
 
+int init_new_context(struct task_struct *tsk, struct mm_struct *mm)
+{
+	return __init_new_context(mm, current->mm);
+}
+
 /*
  * No need to lock the MM as we are the last user
  */
@@ -121,11 +124,11 @@
 	}
 }
 
-static int read_ldt(void __user * ptr, unsigned long bytecount)
+static int read_ldt(struct mm_struct * mm, void __user * ptr,
+		    unsigned long bytecount)
 {
 	int err;
 	unsigned long size;
-	struct mm_struct * mm = current->mm;
 
 	if (!mm->context.size)
 		return 0;
@@ -169,9 +172,8 @@
 	return err;
 }
 
-static int write_ldt(void __user * ptr, unsigned long bytecount, int oldmode)
+static int write_ldt(struct mm_struct * mm, void __user * ptr, unsigned long bytecount, int oldmode)
 {
-	struct mm_struct * mm = current->mm;
 	__u32 entry_1, entry_2, *lp;
 	int error;
 	struct user_desc ldt_info;
@@ -195,7 +197,7 @@
 
 	down(&mm->context.sem);
 	if (ldt_info.entry_number >= mm->context.size) {
-		error = alloc_ldt(&current->mm->context, ldt_info.entry_number+1, 1);
+		error = alloc_ldt(&mm->context, ldt_info.entry_number+1, 1);
 		if (error < 0)
 			goto out_unlock;
 	}
@@ -228,23 +230,29 @@
 	return error;
 }
 
-asmlinkage int sys_modify_ldt(int func, void __user *ptr, unsigned long bytecount)
+int modify_ldt(struct mm_struct * mm, int func, void __user *ptr,
+	       unsigned long bytecount)
 {
 	int ret = -ENOSYS;
 
 	switch (func) {
 	case 0:
-		ret = read_ldt(ptr, bytecount);
+		ret = read_ldt(mm, ptr, bytecount);
 		break;
 	case 1:
-		ret = write_ldt(ptr, bytecount, 1);
+		ret = write_ldt(mm, ptr, bytecount, 1);
 		break;
 	case 2:
 		ret = read_default_ldt(ptr, bytecount);
 		break;
 	case 0x11:
-		ret = write_ldt(ptr, bytecount, 0);
+		ret = write_ldt(mm, ptr, bytecount, 0);
 		break;
 	}
 	return ret;
 }
+
+asmlinkage int sys_modify_ldt(int func, void __user *ptr, unsigned long bytecount)
+{
+	return modify_ldt(current->mm, func, ptr, bytecount);
+}
--- ./arch/i386/Kconfig.~1~	2004-02-20 16:34:03.000000000 +0100
+++ ./arch/i386/Kconfig	2004-02-29 16:23:11.000000000 +0100
@@ -698,6 +698,9 @@
 	depends on HIGHMEM64G
 	default y
 
+config PROC_MM
+	bool "/proc/mm support"
+
 # Common NUMA Features
 config NUMA
 	bool "Numa Memory Allocation Support"
--- ./arch/um/include/skas_ptrace.h.~1~	2004-02-20 18:43:26.000000000 +0100
+++ ./arch/um/include/skas_ptrace.h	2004-02-29 16:23:11.000000000 +0100
@@ -6,6 +6,10 @@
 #ifndef __SKAS_PTRACE_H
 #define __SKAS_PTRACE_H
 
+
+#ifndef _LINUX_PTRACE_STRUCT_DEF
+#define _LINUX_PTRACE_STRUCT_DEF
+
 struct ptrace_faultinfo {
 	int is_write;
 	unsigned long addr;
@@ -17,6 +21,8 @@
 	unsigned long bytecount;
 };
 
+#endif /*ifndef _LINUX_PTRACE_STRUCT_DEF*/
+
 #define PTRACE_FAULTINFO 52
 #define PTRACE_SIGPENDING 53
 #define PTRACE_LDT 54
--- ./arch/um/kernel/ptrace.c.~1~	2004-02-29 16:22:01.000000000 +0100
+++ ./arch/um/kernel/ptrace.c	2004-02-29 16:22:33.000000000 +0100
@@ -24,11 +24,6 @@
 { 
 }
 
-extern long do_mmap2(struct task_struct *task, unsigned long addr, 
-		     unsigned long len, unsigned long prot, 
-		     unsigned long flags, unsigned long fd,
-		     unsigned long pgoff);
-
 int sys_ptrace(long request, long pid, long addr, long data)
 {
 	struct task_struct *child;
--- ./arch/um/kernel/syscall_kern.c.~1~	2004-02-29 16:22:01.000000000 +0100
+++ ./arch/um/kernel/syscall_kern.c	2004-02-29 16:23:11.000000000 +0100
@@ -81,7 +81,7 @@
 	}
 
 	down_write(&mm->mmap_sem);
-	error = do_mmap_pgoff(mm, file, addr, len, prot, flags, pgoff);
+	error = __do_mmap_pgoff(mm, file, addr, len, prot, flags, pgoff);
 	up_write(&mm->mmap_sem);
 
 	if (file)
--- ./include/linux/mm.h.~1~	2004-02-29 16:22:01.000000000 +0100
+++ ./include/linux/mm.h	2004-02-29 16:23:11.000000000 +0100
@@ -540,10 +540,15 @@
 
 extern unsigned long get_unmapped_area(struct file *, unsigned long, unsigned long, unsigned long, unsigned long);
 
-extern unsigned long do_mmap_pgoff(struct mm_struct *mm, struct file *file, 
+extern unsigned long __do_mmap_pgoff(struct mm_struct *mm, struct file *file, 
 				   unsigned long addr, unsigned long len,
 				   unsigned long prot, unsigned long flag,
 				   unsigned long pgoff);
+static inline unsigned long do_mmap_pgoff(struct file *file, unsigned long addr,
+	unsigned long len, unsigned long prot,
+	unsigned long flag, unsigned long pgoff) {
+	return __do_mmap_pgoff(current->mm, file, addr, len, prot, flag, pgoff);
+}
 
 static inline unsigned long do_mmap(struct file *file, unsigned long addr,
 	unsigned long len, unsigned long prot,
@@ -553,8 +558,7 @@
 	if ((offset + PAGE_ALIGN(len)) < offset)
 		goto out;
 	if (!(offset & ~PAGE_MASK))
-		ret = do_mmap_pgoff(current->mm, file, addr, len, prot, flag, 
-				    offset >> PAGE_SHIFT);
+		ret = do_mmap_pgoff(file, addr, len, prot, flag, offset >> PAGE_SHIFT);
 out:
 	return ret;
 }
--- ./include/asm-i386/desc.h.~1~	2003-12-20 17:44:08.000000000 +0100
+++ ./include/asm-i386/desc.h	2004-02-29 16:23:11.000000000 +0100
@@ -123,6 +123,9 @@
 	put_cpu();
 }
 
+extern int modify_ldt(struct mm_struct * mm, int func, void __user *ptr,
+		      unsigned long bytecount);
+
 #endif /* !__ASSEMBLY__ */
 
 #endif
--- ./include/asm-i386/processor.h.~1~	2004-01-09 21:27:46.000000000 +0100
+++ ./include/asm-i386/processor.h	2004-02-29 16:23:11.000000000 +0100
@@ -630,4 +630,6 @@
 
 extern void select_idle_routine(const struct cpuinfo_x86 *c);
 
+extern int __init_new_context(struct mm_struct *mm, struct mm_struct *old_mm);
+
 #endif /* __ASM_I386_PROCESSOR_H */
--- ./include/asm-i386/ptrace.h.~1~	2003-12-20 17:21:33.000000000 +0100
+++ ./include/asm-i386/ptrace.h	2004-02-29 16:23:11.000000000 +0100
@@ -59,4 +59,26 @@
 #define instruction_pointer(regs) ((regs)->eip)
 #endif
 
+/*For SKAS3 support.*/
+#ifndef _LINUX_PTRACE_STRUCT_DEF
+#define _LINUX_PTRACE_STRUCT_DEF
+
+#define PTRACE_FAULTINFO	  52
+#define PTRACE_SIGPENDING	  53
+#define PTRACE_LDT		  54
+#define PTRACE_SWITCH_MM 	  55
+
+struct ptrace_faultinfo {
+	int is_write;
+	unsigned long addr;
+};
+
+struct ptrace_ldt {
+	int func;
+  	void *ptr;
+	unsigned long bytecount;
+};
+
+#endif /*ifndef _LINUX_PTRACE_STRUCT_DEF*/
+
 #endif
--- ./include/asm-i386/mmu_context.h.~1~	2003-12-25 19:24:24.000000000 +0100
+++ ./include/asm-i386/mmu_context.h	2004-02-29 16:23:11.000000000 +0100
@@ -29,6 +29,10 @@
 {
 	int cpu = smp_processor_id();
 
+#ifdef CONFIG_SMP
+	prev = cpu_tlbstate[cpu].active_mm;
+#endif
+
 	if (likely(prev != next)) {
 		/* stop flush ipis for the previous mm */
 		cpu_clear(cpu, prev->cpu_vm_mask);
@@ -50,7 +54,6 @@
 #ifdef CONFIG_SMP
 	else {
 		cpu_tlbstate[cpu].state = TLBSTATE_OK;
-		BUG_ON(cpu_tlbstate[cpu].active_mm != next);
 
 		if (!cpu_test_and_set(cpu, next->cpu_vm_mask)) {
 			/* We were in lazy tlb mode and leave_mm disabled 
--- ./include/asm-um/processor-generic.h.~1~	2004-02-20 18:43:27.000000000 +0100
+++ ./include/asm-um/processor-generic.h	2004-02-29 16:23:11.000000000 +0100
@@ -101,9 +101,9 @@
 
 extern unsigned long thread_saved_pc(struct task_struct *t);
 
-static inline void mm_copy_segments(struct mm_struct *from_mm, 
-				    struct mm_struct *new_mm)
+static inline int __init_new_context(struct mm_struct *mm, struct mm_struct *old_mm)
 {
+  return 0;
 }
 
 #define init_stack	(init_thread_union.stack)
--- ./mm/mmap.c.~1~	2004-02-29 16:22:01.000000000 +0100
+++ ./mm/mmap.c	2004-02-29 16:23:11.000000000 +0100
@@ -460,7 +460,7 @@
  * The caller must hold down_write(current->mm->mmap_sem).
  */
 
-unsigned long do_mmap_pgoff(struct mm_struct *mm, struct file * file, 
+unsigned long __do_mmap_pgoff(struct mm_struct *mm, struct file * file, 
 			    unsigned long addr, unsigned long len,
 			    unsigned long prot, unsigned long flags,
 			    unsigned long pgoff)
@@ -712,7 +712,7 @@
 	return error;
 }
 
-EXPORT_SYMBOL(do_mmap_pgoff);
+EXPORT_SYMBOL(__do_mmap_pgoff);
 
 /* Get an address range which is currently unmapped.
  * For shmat() with addr=0.
--- ./mm/mprotect.c.~1~	2004-02-29 16:22:01.000000000 +0100
+++ ./mm/mprotect.c	2004-02-29 16:23:11.000000000 +0100
@@ -221,7 +221,7 @@
 	return error;
 }
 
-asmlinkage long
+long
 do_mprotect(struct mm_struct *mm, unsigned long start, size_t len, 
 	     unsigned long prot)
 {
--- ./mm/proc_mm.c.~1~	2004-02-29 16:22:01.000000000 +0100
+++ ./mm/proc_mm.c	2004-02-29 16:23:11.000000000 +0100
@@ -93,7 +93,7 @@
 			break;
 		}
 
-		mm_copy_segments(from, mm);
+		__init_new_context(mm, from);
 		break;
 	}
 	default:

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

* Re: [uml-devel] Problems with the SKAS patch and 2.6
@ 2004-04-18 18:55 gboutwel
  2004-04-19  0:00 ` Jeff Chua
  2004-04-19 19:33 ` BlaisorBlade
  0 siblings, 2 replies; 8+ messages in thread
From: gboutwel @ 2004-04-18 18:55 UTC (permalink / raw)
  To: user-mode-linux-devel

[-- Attachment #1: Type: Text/Plain, Size: 1132 bytes --]

> There is a separate version which can be applied like the old
one, i.e. onto 

> the kernel + UML patch, in the main UML page.

> 

> I applied your slight change to this 2nd version and attached
the result - 

> test at least if it applies correctly (this one goes onto the
UML patch).



BlaisorBlade,



I tried this patch.  I'm able to compile the host fine, but I've

attached what happens when I try to compile the uml guest.



The steps.



tar jxf linux-2.6.5.tar.bz2

mv linux-2.6.5 linux-2.6.6-rc1

cd linux-2.6.6-rc1

bzcat ~/2.6.4/uml-patch-2.6.4-1.tar.bz2 | patch -p1

cat ~/2.6.6/host+Uml-skas3-2.6.6-rc1-v1.patch | patch -p1

cp ~/2.6.5/config-2.6.5-uml .config

make oldconfig ARCH=um

// I had to modify /arch/um/Makefile-i386 to add the word basic

// after scripts/ like before on 2.6.5

make linux ARCH=um



During the mk_kernel_constants.o, it erros complaining about

a bunch of undefines.



Maybe I'm missing a step or something?



The 2.6.6-rc1 host is doing good though.



George









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

Praize? The all-in-one Christian Community

http://www.praize.com/

[-- Attachment #2: uml-2.6.6-rc1.log --]
[-- Type: , Size: 1435 bytes --]

  HOSTCC  arch/um/sys-i386/util/mk_sc
  CHK     arch/um/include/sysdep-i386/sc.h
  UPD     arch/um/include/sysdep-i386/sc.h
  CHK     arch/um/include/uml-config.h
  UPD     arch/um/include/uml-config.h
  HOSTCC  arch/um/util/mk_constants_kern.o
arch/um/util/mk_constants_kern.c: In function `main':
arch/um/util/mk_constants_kern.c:16: error: `KERN_EMERG' undeclared (first use in this function)
arch/um/util/mk_constants_kern.c:16: error: (Each undeclared identifier is reported only once
arch/um/util/mk_constants_kern.c:16: error: for each function it appears in.)
arch/um/util/mk_constants_kern.c:17: error: `KERN_ALERT' undeclared (first use in this function)
arch/um/util/mk_constants_kern.c:18: error: `KERN_CRIT' undeclared (first use in this function)
arch/um/util/mk_constants_kern.c:19: error: `KERN_ERR' undeclared (first use in this function)
arch/um/util/mk_constants_kern.c:20: error: `KERN_WARNING' undeclared (first use in this function)
arch/um/util/mk_constants_kern.c:21: error: `KERN_NOTICE' undeclared (first use in this function)
arch/um/util/mk_constants_kern.c:22: error: `KERN_INFO' undeclared (first use in this function)
arch/um/util/mk_constants_kern.c:23: error: `KERN_DEBUG' undeclared (first use in this function)
arch/um/util/mk_constants_kern.c:25: error: `NSEC_PER_SEC' undeclared (first use in this function)
make[1]: *** [arch/um/util/mk_constants_kern.o] Error 1
make: *** [arch/um/util] Error 2
\r

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

* Re: [uml-devel] Problems with the SKAS patch and 2.6
  2004-04-18 18:55 gboutwel
@ 2004-04-19  0:00 ` Jeff Chua
  2004-04-19 19:33 ` BlaisorBlade
  1 sibling, 0 replies; 8+ messages in thread
From: Jeff Chua @ 2004-04-19  0:00 UTC (permalink / raw)
  To: gboutwel; +Cc: UserModeLinux


On Mon, 18 Apr 2004, gboutwel wrote:

> cat ~/2.6.6/host+Uml-skas3-2.6.6-rc1-v1.patch | patch -p1

you don't need SKAS on the guest system ...

Jeff


-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&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] 8+ messages in thread

* Re: [uml-devel] Problems with the SKAS patch and 2.6
  2004-04-18 18:55 gboutwel
  2004-04-19  0:00 ` Jeff Chua
@ 2004-04-19 19:33 ` BlaisorBlade
  1 sibling, 0 replies; 8+ messages in thread
From: BlaisorBlade @ 2004-04-19 19:33 UTC (permalink / raw)
  To: user-mode-linux-devel

Alle 20:55, domenica 18 aprile 2004, gboutwel ha scritto:

> I tried this patch.  I'm able to compile the host fine, but I've
>
> attached what happens when I try to compile the uml guest.

Well, what you did is correct (you had to apply both the UML patch and that 
version of the SKAS patch); the problem is that for 2.6.6-rc1 you need one 
more fix for the UML patch (it was posted here by Jeff Chua and it's 2 thread 
before this one).

You must undo your changes to the Makefile since that patch already contains 
it.

> The steps.

Thanks, it is always important to post them, so that the help can be more 
detailed.

> // I had to modify /arch/um/Makefile-i386 to add the word basic
>
> // after scripts/ like before on 2.6.5

The patch from Jeff Chua did this work and also fixed the problems you have.

> The 2.6.6-rc1 host is doing good though.

Thanks for this test: the SKAS patch is very well tested, but I absolutely did 
not have the time to test that little change (2 lines, so don't worry).
-- 
Paolo Giarrusso, aka Blaisorblade
Linux registered user n. 292729



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&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] 8+ messages in thread

* Re: [uml-devel] Problems with the SKAS patch and 2.6
@ 2004-04-20 16:31 gboutwel
  0 siblings, 0 replies; 8+ messages in thread
From: gboutwel @ 2004-04-20 16:31 UTC (permalink / raw)
  To: user-mode-linux-devel

> Well, what you did is correct (you had to apply both the UML
patch and that 

> version of the SKAS patch); the problem is that for 2.6.6-rc1
you need one 

> more fix for the UML patch (it was posted here by Jeff Chua
and it's 2 thread 

> before this one).



Yeah I figured this out, and applied it, but wasn't able to finish
compiling an UML guest, started getting error in /usr/innclude/asm
directory.  Dealing with mpsecc.h, I think this is cause Debian
(unstable/SID) doesn't have new enough kernel-headers, does that
sound about right?



> You must undo your changes to the Makefile since that patch
already contains 

> it.



Actually I only applied part of Jeff's patch.  I've had problems
with some of his Makefile changes, but have up til now been able
to compile fine without those changes.



> The steps.



> Thanks, it is always important to post them, so that the help
can be more 

> detailed.



> > The 2.6.6-rc1 host is doing good though.



> Thanks for this test: the SKAS patch is very well tested, but
I absolutely did 

> not have the time to test that little change (2 lines, so don't
worry).



No problem, least I could do with you putting it out there is
try it, and wanted to provide feedback for those that might be
thinking about trying it.  That's what I use this box for.  To
'mess around' with UML. :) At this point I'll add that this box
is not an SMP box and I don't have SMP features enabled.



George



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

Need to store your files online? 

Upload them for free in Praize Briefcase

http://www.praize.com/cgi-bin/members/mybriefcase.cgi



-------------------------------------------------------
This SF.Net email is sponsored by: IBM Linux Tutorials
Free Linux tutorial presented by Daniel Robbins, President and CEO of
GenToo technologies. Learn everything from fundamentals to system
administration.http://ads.osdn.com/?ad_id=1470&alloc_id=3638&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] 8+ messages in thread

* Re: [uml-devel] Problems with the SKAS patch and 2.6
@ 2004-04-21  1:11 gboutwel
  0 siblings, 0 replies; 8+ messages in thread
From: gboutwel @ 2004-04-21  1:11 UTC (permalink / raw)
  To: user-mode-linux-devel

[-- Attachment #1: Type: Text/Plain, Size: 733 bytes --]

> Yeah I figured this out, and applied it, but wasn't able to
finish

> compiling an UML guest, started getting error in /usr/innclude/asm

> directory.  Dealing with mpsecc.h, I think this is cause Debian

> (unstable/SID) doesn't have new enough kernel-headers, does
that

> sound about right?



mpsecc.h should be mpspec.h, it acts like it thinks I have an
SMP config, but I don't.  Also, if it wasn't an UML specific
problem, why did the host compile fine, but the guest doesn't?



I'm attaching the 'log' generated by:



make linux ARCH=um 2>&1 | tee uml-2.6.6-rc1.log



HTH,

George



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

Want to talk to other Christians?

Get the Christian Instant Messenger

http://www.praize.com/IM/ 

[-- Attachment #2: uml-2.6.6-rc1.log --]
[-- Type: , Size: 3619 bytes --]

  CHK     include/linux/version.h
  UPD     include/linux/version.h
  SYMLINK include/asm -> include/asm-um
  SPLIT   include/linux/autoconf.h -> include/config/*
  HOSTCC  arch/um/sys-i386/util/mk_sc
  HOSTCC  arch/um/kernel/skas/util/mk_ptregs
  Generating /usr/src/linux-2.6.6-rc1/arch/um/include/skas_ptregs.h (updated)
  CHK     arch/um/include/sysdep-i386/sc.h
  UPD     arch/um/include/sysdep-i386/sc.h
cd /usr/src/linux-2.6.6-rc1/include/asm-um && ln -sf ../asm-i386 arch
cd arch/um/include && ln -sf sysdep-i386 sysdep
cd arch/um && ln -sf os-Linux os
cd /usr/src/linux-2.6.6-rc1/include/asm-um/ ; \
ln -sf archparam-i386.h archparam.h
cd /usr/src/linux-2.6.6-rc1/include/asm-um/ ; \
ln -sf system-i386.h system.h
cd /usr/src/linux-2.6.6-rc1/include/asm-um/ ; \
ln -sf sigcontext-i386.h sigcontext.h
cd /usr/src/linux-2.6.6-rc1/include/asm-um/ ; \
ln -sf processor-i386.h processor.h
cd /usr/src/linux-2.6.6-rc1/include/asm-um/ ; \
ln -sf ptrace-i386.h ptrace.h
cd /usr/src/linux-2.6.6-rc1/include/asm-um/ ; \
ln -sf arch-signal-i386.h arch-signal.h
  CHK     arch/um/include/uml-config.h
  UPD     arch/um/include/uml-config.h
  HOSTCC  arch/um/util/mk_constants_kern.o
  HOSTCC  arch/um/util/mk_constants_user.o
  HOSTCC  arch/um/util/mk_task_kern.o
In file included from /usr/include/asm/smp.h:18,
                 from /usr/include/linux/smp.h:17,
                 from /usr/include/linux/sched.h:23,
                 from arch/um/util/mk_task_kern.c:2:
/usr/include/asm/mpspec.h:6:25: mach_mpspec.h: No such file or directory
In file included from /usr/include/asm/smp.h:18,
                 from /usr/include/linux/smp.h:17,
                 from /usr/include/linux/sched.h:23,
                 from arch/um/util/mk_task_kern.c:2:
/usr/include/asm/mpspec.h:8: error: `MAX_MP_BUSSES' undeclared here (not in a function)
/usr/include/asm/mpspec.h:9: error: `MAX_MP_BUSSES' undeclared here (not in a function)
/usr/include/asm/mpspec.h:10: error: `MAX_MP_BUSSES' undeclared here (not in a function)
/usr/include/asm/mpspec.h:12: error: `MAX_MP_BUSSES' undeclared here (not in a function)
/usr/include/asm/mpspec.h:19: error: `MAX_APICS' undeclared here (not in a function)
/usr/include/asm/mpspec.h:20: error: `MAX_MP_BUSSES' undeclared here (not in a function)
/usr/include/asm/mpspec.h:20: error: conflicting types for `mp_bus_id_to_type'
/usr/include/asm/mpspec.h:8: error: previous declaration of `mp_bus_id_to_type'
/usr/include/asm/mpspec.h:22: error: `MAX_IRQ_SOURCES' undeclared here (not in a function)
/usr/include/asm/mpspec.h:24: error: `MAX_MP_BUSSES' undeclared here (not in a function)
/usr/include/asm/mpspec.h:24: error: conflicting types for `mp_bus_id_to_pci_bus'
/usr/include/asm/mpspec.h:12: error: previous declaration of `mp_bus_id_to_pci_bus'
/usr/include/asm/mpspec.h:54: error: `MAX_APICS' undeclared here (not in a function)
In file included from /usr/include/asm/smp.h:20,
                 from /usr/include/linux/smp.h:17,
                 from /usr/include/linux/sched.h:23,
                 from arch/um/util/mk_task_kern.c:2:
/usr/include/asm/io_apic.h:120: error: `MAX_IRQ_SOURCES' undeclared here (not in a function)
/usr/include/asm/io_apic.h:120: error: conflicting types for `mp_irqs'
/usr/include/asm/mpspec.h:22: error: previous declaration of `mp_irqs'
In file included from /usr/include/linux/smp.h:17,
                 from /usr/include/linux/sched.h:23,
                 from arch/um/util/mk_task_kern.c:2:
/usr/include/asm/smp.h:73:26: mach_apicdef.h: No such file or directory
make[1]: *** [arch/um/util/mk_task_kern.o] Error 1
make: *** [arch/um/util] Error 2
\r

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

end of thread, other threads:[~2004-04-21  1:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-04-16  6:36 [uml-devel] Problems with the SKAS patch and 2.6 Steven Elliott
2004-04-16  8:19 ` Jeff Chua
2004-04-16 17:28   ` BlaisorBlade
  -- strict thread matches above, loose matches on Subject: below --
2004-04-18 18:55 gboutwel
2004-04-19  0:00 ` Jeff Chua
2004-04-19 19:33 ` BlaisorBlade
2004-04-20 16:31 gboutwel
2004-04-21  1:11 gboutwel

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.