SOURCES (LINUX_2_6_20): linux-2.6-vs2.2.patch (NEW) - http://vserv...

mguevara mguevara at pld-linux.org
Thu Feb 8 00:18:05 CET 2007


Author: mguevara                     Date: Wed Feb  7 23:18:05 2007 GMT
Module: SOURCES                       Tag: LINUX_2_6_20
---- Log message:
- http://vserver.13thfloor.at/Experimental/patch-2.6.20-vs2.2.0-pre1.diff

---- Files affected:
SOURCES:
   linux-2.6-vs2.2.patch (NONE -> 1.1.2.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/linux-2.6-vs2.2.patch
diff -u /dev/null SOURCES/linux-2.6-vs2.2.patch:1.1.2.1
--- /dev/null	Thu Feb  8 00:18:05 2007
+++ SOURCES/linux-2.6-vs2.2.patch	Thu Feb  8 00:18:00 2007
@@ -0,0 +1,28091 @@
+diff -NurpP --minimal linux-2.6.20/Documentation/vserver/debug.txt linux-2.6.20-vs2.2.0-pre1/Documentation/vserver/debug.txt
+--- linux-2.6.20/Documentation/vserver/debug.txt	1970-01-01 01:00:00 +0100
++++ linux-2.6.20-vs2.2.0-pre1/Documentation/vserver/debug.txt	2007-02-06 03:05:21 +0100
+@@ -0,0 +1,154 @@
++
++debug_cvirt:
++
++ 2   4	"vx_map_tgid: %p/%llx: %d -> %d"
++	"vx_rmap_tgid: %p/%llx: %d -> %d"
++
++debug_dlim:
++
++ 0   1	"ALLOC (%p,#%d)%c inode (%d)"
++	"FREE  (%p,#%d)%c inode"
++ 1   2	"ALLOC (%p,#%d)%c %lld bytes (%d)"
++	"FREE  (%p,#%d)%c %lld bytes"
++ 2   4	"ADJUST: %lld,%lld on %ld,%ld [mult=%d]"
++ 3   8	"ext3_has_free_blocks(%p): %lu<%lu+1, %c, %u!=%u r=%d"
++	"ext3_has_free_blocks(%p): free=%lu, root=%lu"
++	"rcu_free_dl_info(%p)"
++ 4  10	"alloc_dl_info(%p,%d) = %p"
++	"dealloc_dl_info(%p)"
++	"get_dl_info(%p[#%d.%d])"
++	"put_dl_info(%p[#%d.%d])"
++ 5  20	"alloc_dl_info(%p,%d)*"
++ 6  40	"__hash_dl_info: %p[#%d]"
++	"__unhash_dl_info: %p[#%d]"
++ 7  80	"locate_dl_info(%p,#%d) = %p"
++
++debug_misc:
++
++ 0   1	"destroy_dqhash: %p [#0x%08x] c=%d"
++	"new_dqhash: %p [#0x%08x]"
++	"vroot[%d]_clr_dev: dev=%p[%lu,%d:%d]"
++	"vroot[%d]_get_real_bdev: dev=%p[%lu,%d:%d]"
++	"vroot[%d]_set_dev: dev=%p[%lu,%d:%d]"
++	"vroot_get_real_bdev not set"
++ 1   2	"cow_break_link(ť%sŤ)"
++	"temp copy ť%sŤ"
++ 2   4	"dentry_open(new): %p"
++	"dentry_open(old): %p"
++	"lookup_create(new): %p"
++	"old path ť%sŤ"
++	"path_lookup(old): %d"
++	"vfs_create(new): %d"
++	"vfs_rename: %d"
++	"vfs_sendfile: %d"
++ 3   8	"fput(new_file=%p[#%d])"
++	"fput(old_file=%p[#%d])"
++ 4  10	"vx_info_kill(%p[#%d],%d,%d) = %d"
++	"vx_info_kill(%p[#%d],%d,%d)*"
++ 5  20	"vs_reboot(%p[#%d],%d)"
++ 6  40	"dropping task %p[#%u,%u] for %p[#%u,%u]"
++
++debug_net:
++
++ 2   4	"nx_addr_conflict(%p,%p) %d.%d,%d.%d"
++ 3   8	"inet_bind(%p) %d.%d.%d.%d, %d.%d.%d.%d, %d.%d.%d.%d"
++	"inet_bind(%p)* %p,%p;%lx %d.%d.%d.%d"
++ 4  10	"ip_route_connect(%p) %p,%p;%lx"
++ 5  20	"__addr_in_socket(%p,%d.%d.%d.%d) %p:%d.%d.%d.%d %p;%lx"
++ 6  40	"sk,egf: %p [#%d] (from %d)"
++	"sk,egn: %p [#%d] (from %d)"
++	"sk,req: %p [#%d] (from %d)"
++	"sk: %p [#%d] (from %d)"
++	"tw: %p [#%d] (from %d)"
++ 7  80	"__sock_recvmsg: %p[%p,%p,%p;%d]:%d/%d"
++	"__sock_sendmsg: %p[%p,%p,%p;%d]:%d/%d"
++
++debug_nid:
++
++ 0   1	"__lookup_nx_info(#%u): %p[#%u]"
++	"alloc_nx_info(%d) = %p"
++	"create_nx_info(%d) (dynamic rejected)"
++	"create_nx_info(%d) = %p (already there)"
++	"create_nx_info(%d) = %p (new)"
++	"dealloc_nx_info(%p)"
++ 1   2	"alloc_nx_info(%d)*"
++	"create_nx_info(%d)*"
++ 2   4	"get_nx_info(%p[#%d.%d])"
++	"put_nx_info(%p[#%d.%d])"
++ 3   8	"claim_nx_info(%p[#%d.%d.%d]) %p"
++	"clr_nx_info(%p[#%d.%d])"
++	"init_nx_info(%p[#%d.%d])"
++	"release_nx_info(%p[#%d.%d.%d]) %p"
++	"set_nx_info(%p[#%d.%d])"
++ 4  10	"__hash_nx_info: %p[#%d]"
++	"__nx_dynamic_id: [#%d]"
++	"__unhash_nx_info: %p[#%d.%d.%d]"
++ 5  20	"moved task %p into nxi:%p[#%d]"
++	"nx_migrate_task(%p,%p[#%d.%d.%d])"
++	"task_get_nx_info(%p)"
++ 6  40	"nx_clear_persistent(%p[#%d])"
++
++debug_quota:
++
++ 0   1	"quota_sync_dqh(%p,%d) discard inode %p"
++ 1   2	"quota_sync_dqh(%p,%d)"
++	"sync_dquots(%p,%d)"
++	"sync_dquots_dqh(%p,%d)"
++ 3   8	"do_quotactl(%p,%d,cmd=%d,id=%d,%p)"
++
++debug_switch:
++
++ 0   1	"vc: VCMD_%02d_%d[%d], %d,%p [%d,%d,%x,%x]"
++ 1   2	"vc: VCMD_%02d_%d[%d] = %08lx(%ld) [%d,%d]"
++ 4  10	"%s: (%s %s) returned %s with %d"
++
++debug_tag:
++
++ 7  80	"dx_parse_tag(ť%sŤ): %d:#%d"
++	"dx_propagate_tag(%p[#%lu.%d]): %d,%d"
++
++debug_xid:
++
++ 0   1	"__lookup_vx_info(#%u): %p[#%u]"
++	"alloc_vx_info(%d) = %p"
++	"alloc_vx_info(%d)*"
++	"create_vx_info(%d) (dynamic rejected)"
++	"create_vx_info(%d) = %p (already there)"
++	"create_vx_info(%d) = %p (new)"
++	"dealloc_vx_info(%p)"
++	"loc_vx_info(%d) = %p (found)"
++	"loc_vx_info(%d) = %p (new)"
++	"loc_vx_info(%d) = %p (not available)"
++ 1   2	"create_vx_info(%d)*"
++	"loc_vx_info(%d)*"
++ 2   4	"get_vx_info(%p[#%d.%d])"
++	"put_vx_info(%p[#%d.%d])"
++ 3   8	"claim_vx_info(%p[#%d.%d.%d]) %p"
++	"clr_vx_info(%p[#%d.%d])"
++	"init_vx_info(%p[#%d.%d])"
++	"release_vx_info(%p[#%d.%d.%d]) %p"
++	"set_vx_info(%p[#%d.%d])"
++ 4  10	"__hash_vx_info: %p[#%d]"
++	"__unhash_vx_info: %p[#%d.%d.%d]"
++	"__vx_dynamic_id: [#%d]"
++ 5  20	"enter_vx_info(%p[#%d],%p) %p[#%d,%p]"
++	"leave_vx_info(%p[#%d,%p]) %p[#%d,%p]"
++	"moved task %p into vxi:%p[#%d]"
++	"task_get_vx_info(%p)"
++	"vx_migrate_task(%p,%p[#%d.%d])"
++ 6  40	"vx_clear_persistent(%p[#%d])"
++	"vx_exit_init(%p[#%d],%p[#%d,%d,%d])"
++	"vx_set_init(%p[#%d],%p[#%d,%d,%d])"
++	"vx_set_persistent(%p[#%d])"
++	"vx_set_reaper(%p[#%d],%p[#%d,%d])"
++ 7  80	"vx_child_reaper(%p[#%u,%u]) = %p[#%u,%u]"
++
++
++debug_limit:
++
++ n 2^n	"vx_acc_cres[%5d,%s,%2d]: %5d%s"
++	"vx_cres_avail[%5d,%s,%2d]: %5ld > %5d + %5d"
++
++ m 2^m	"vx_acc_page[%5d,%s,%2d]: %5d%s"
++	"vx_acc_pages[%5d,%s,%2d]: %5d += %5d"
++	"vx_pages_avail[%5d,%s,%2d]: %5ld > %5d + %5d"
+diff -NurpP --minimal linux-2.6.20/Makefile linux-2.6.20-vs2.2.0-pre1/Makefile
+--- linux-2.6.20/Makefile	2007-02-06 02:59:57 +0100
++++ linux-2.6.20-vs2.2.0-pre1/Makefile	2007-02-06 06:49:58 +0100
+@@ -1,7 +1,7 @@
+ VERSION = 2
+ PATCHLEVEL = 6
+ SUBLEVEL = 20
+-EXTRAVERSION =
++EXTRAVERSION = vs2.2.0-vs2.2.0-pre1
+ NAME = Homicidal Dwarf Hamster
+ 
+ # *DOCUMENTATION*
+diff -NurpP --minimal linux-2.6.20/arch/alpha/Kconfig linux-2.6.20-vs2.2.0-pre1/arch/alpha/Kconfig
+--- linux-2.6.20/arch/alpha/Kconfig	2007-02-06 02:59:58 +0100
++++ linux-2.6.20-vs2.2.0-pre1/arch/alpha/Kconfig	2007-02-06 03:05:21 +0100
+@@ -640,6 +640,8 @@ source "arch/alpha/oprofile/Kconfig"
+ 
+ source "arch/alpha/Kconfig.debug"
+ 
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+ 
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-2.6.20/arch/alpha/kernel/asm-offsets.c linux-2.6.20-vs2.2.0-pre1/arch/alpha/kernel/asm-offsets.c
+--- linux-2.6.20/arch/alpha/kernel/asm-offsets.c	2006-02-15 13:54:10 +0100
++++ linux-2.6.20-vs2.2.0-pre1/arch/alpha/kernel/asm-offsets.c	2007-02-06 03:05:21 +0100
+@@ -36,6 +36,7 @@ void foo(void)
+ 	DEFINE(PT_PTRACED, PT_PTRACED);
+ 	DEFINE(CLONE_VM, CLONE_VM);
+ 	DEFINE(CLONE_UNTRACED, CLONE_UNTRACED);
++	DEFINE(CLONE_KTHREAD, CLONE_KTHREAD);
+ 	DEFINE(SIGCHLD, SIGCHLD);
+ 	BLANK();
+ 
+diff -NurpP --minimal linux-2.6.20/arch/alpha/kernel/entry.S linux-2.6.20-vs2.2.0-pre1/arch/alpha/kernel/entry.S
+--- linux-2.6.20/arch/alpha/kernel/entry.S	2006-11-30 21:18:23 +0100
++++ linux-2.6.20-vs2.2.0-pre1/arch/alpha/kernel/entry.S	2007-02-06 03:05:21 +0100
+@@ -644,7 +644,7 @@ kernel_thread:
+ 	stq	$2, 152($sp)		/* HAE */
+ 
+ 	/* Shuffle FLAGS to the front; add CLONE_VM.  */
+-	ldi	$1, CLONE_VM|CLONE_UNTRACED
++	ldi	$1, CLONE_VM | CLONE_UNTRACED | CLONE_KTHREAD;
+ 	or	$18, $1, $16
+ 	bsr	$26, sys_clone
+ 
+@@ -873,24 +873,15 @@ sys_getxgid:
+ 	.globl	sys_getxpid
+ 	.ent	sys_getxpid
+ sys_getxpid:
++	lda	$sp, -16($sp)
++	stq	$26, 0($sp)
+ 	.prologue 0
+-	ldq	$2, TI_TASK($8)
+ 
+-	/* See linux/kernel/timer.c sys_getppid for discussion
+-	   about this loop.  */
+-	ldq	$3, TASK_GROUP_LEADER($2)
+-	ldq	$4, TASK_REAL_PARENT($3)
+-	ldl	$0, TASK_TGID($2)
+-1:	ldl	$1, TASK_TGID($4)
+-#ifdef CONFIG_SMP
+-	mov	$4, $5
+-	mb
+-	ldq	$3, TASK_GROUP_LEADER($2)
+-	ldq	$4, TASK_REAL_PARENT($3)
+-	cmpeq	$4, $5, $5
+-	beq	$5, 1b
+-#endif
+-	stq	$1, 80($sp)
++	lda	$16, 96($sp)
++	jsr	$26, do_getxpid
++	ldq	$26, 0($sp)
++
++	lda	$sp, 16($sp)
+ 	ret
+ .end sys_getxpid
+ 
+diff -NurpP --minimal linux-2.6.20/arch/alpha/kernel/osf_sys.c linux-2.6.20-vs2.2.0-pre1/arch/alpha/kernel/osf_sys.c
+--- linux-2.6.20/arch/alpha/kernel/osf_sys.c	2007-02-06 02:59:58 +0100
++++ linux-2.6.20-vs2.2.0-pre1/arch/alpha/kernel/osf_sys.c	2007-02-06 03:05:21 +0100
+@@ -885,7 +885,7 @@ osf_gettimeofday(struct timeval32 __user
+ {
+ 	if (tv) {
+ 		struct timeval ktv;
+-		do_gettimeofday(&ktv);
++		vx_gettimeofday(&ktv);
+ 		if (put_tv32(tv, &ktv))
+ 			return -EFAULT;
+ 	}
+diff -NurpP --minimal linux-2.6.20/arch/alpha/kernel/ptrace.c linux-2.6.20-vs2.2.0-pre1/arch/alpha/kernel/ptrace.c
+--- linux-2.6.20/arch/alpha/kernel/ptrace.c	2006-04-09 13:49:39 +0200
++++ linux-2.6.20-vs2.2.0-pre1/arch/alpha/kernel/ptrace.c	2007-02-06 03:05:21 +0100
+@@ -15,6 +15,7 @@
+ #include <linux/slab.h>
+ #include <linux/security.h>
+ #include <linux/signal.h>
++#include <linux/vs_base.h>
+ 
+ #include <asm/uaccess.h>
+ #include <asm/pgtable.h>
+@@ -283,6 +284,11 @@ do_sys_ptrace(long request, long pid, lo
+ 		goto out_notsk;
+ 	}
+ 
++	if (!vx_check(vx_task_xid(child), VS_WATCH_P|VS_IDENT)) {
++		ret = -EPERM;
++		goto out;
++	}
++
+ 	if (request == PTRACE_ATTACH) {
+ 		ret = ptrace_attach(child);
+ 		goto out;
+diff -NurpP --minimal linux-2.6.20/arch/alpha/kernel/semaphore.c linux-2.6.20-vs2.2.0-pre1/arch/alpha/kernel/semaphore.c
+--- linux-2.6.20/arch/alpha/kernel/semaphore.c	2004-08-14 12:55:32 +0200
++++ linux-2.6.20-vs2.2.0-pre1/arch/alpha/kernel/semaphore.c	2007-02-06 03:05:21 +0100
+@@ -68,8 +68,8 @@ __down_failed(struct semaphore *sem)
+ 	DECLARE_WAITQUEUE(wait, tsk);
+ 
+ #ifdef CONFIG_DEBUG_SEMAPHORE
+-	printk("%s(%d): down failed(%p)\n",
+-	       tsk->comm, tsk->pid, sem);
++	printk("%s(%d:#%u): down failed(%p)\n",
++	       tsk->comm, tsk->pid, tsk->xid, sem);
+ #endif
+ 
+ 	tsk->state = TASK_UNINTERRUPTIBLE;
+@@ -97,8 +97,8 @@ __down_failed(struct semaphore *sem)
+ 	wake_up(&sem->wait);
+ 
+ #ifdef CONFIG_DEBUG_SEMAPHORE
+-	printk("%s(%d): down acquired(%p)\n",
+-	       tsk->comm, tsk->pid, sem);
++	printk("%s(%d:#%u): down acquired(%p)\n",
++	       tsk->comm, tsk->pid, tsk->xid, sem);
+ #endif
+ }
+ 
+@@ -110,8 +110,8 @@ __down_failed_interruptible(struct semap
+ 	long ret = 0;
+ 
+ #ifdef CONFIG_DEBUG_SEMAPHORE
+-	printk("%s(%d): down failed(%p)\n",
+-	       tsk->comm, tsk->pid, sem);
++	printk("%s(%d:#%u): down failed(%p)\n",
++	       tsk->comm, tsk->pid, tsk->xid, sem);
+ #endif
+ 
+ 	tsk->state = TASK_INTERRUPTIBLE;
+diff -NurpP --minimal linux-2.6.20/arch/alpha/kernel/systbls.S linux-2.6.20-vs2.2.0-pre1/arch/alpha/kernel/systbls.S
+--- linux-2.6.20/arch/alpha/kernel/systbls.S	2006-11-30 21:18:23 +0100
++++ linux-2.6.20-vs2.2.0-pre1/arch/alpha/kernel/systbls.S	2007-02-06 03:05:21 +0100
+@@ -446,7 +446,7 @@ sys_call_table:
+ 	.quad sys_stat64			/* 425 */
+ 	.quad sys_lstat64
+ 	.quad sys_fstat64
+-	.quad sys_ni_syscall			/* sys_vserver */
++	.quad sys_vserver			/* sys_vserver */
+ 	.quad sys_ni_syscall			/* sys_mbind */
+ 	.quad sys_ni_syscall			/* sys_get_mempolicy */
+ 	.quad sys_ni_syscall			/* sys_set_mempolicy */
+diff -NurpP --minimal linux-2.6.20/arch/alpha/kernel/traps.c linux-2.6.20-vs2.2.0-pre1/arch/alpha/kernel/traps.c
+--- linux-2.6.20/arch/alpha/kernel/traps.c	2006-09-20 16:57:57 +0200
++++ linux-2.6.20-vs2.2.0-pre1/arch/alpha/kernel/traps.c	2007-02-06 03:05:21 +0100
+@@ -182,7 +182,8 @@ die_if_kernel(char * str, struct pt_regs
+ #ifdef CONFIG_SMP
+ 	printk("CPU %d ", hard_smp_processor_id());
+ #endif
+-	printk("%s(%d): %s %ld\n", current->comm, current->pid, str, err);
++	printk("%s(%d[#%u]): %s %ld\n", current->comm,
++		current->pid, current->xid, str, err);
+ 	dik_show_regs(regs, r9_15);
+ 	dik_show_trace((unsigned long *)(regs+1));
+ 	dik_show_code((unsigned int *)regs->pc);
+diff -NurpP --minimal linux-2.6.20/arch/alpha/mm/init.c linux-2.6.20-vs2.2.0-pre1/arch/alpha/mm/init.c
+--- linux-2.6.20/arch/alpha/mm/init.c	2006-11-30 21:18:23 +0100
++++ linux-2.6.20-vs2.2.0-pre1/arch/alpha/mm/init.c	2007-02-06 03:05:21 +0100
+@@ -20,6 +20,7 @@
+ #include <linux/init.h>
+ #include <linux/bootmem.h> /* max_low_pfn */
+ #include <linux/vmalloc.h>
++#include <linux/pagemap.h>
+ 
+ #include <asm/system.h>
+ #include <asm/uaccess.h>
+diff -NurpP --minimal linux-2.6.20/arch/arm/Kconfig linux-2.6.20-vs2.2.0-pre1/arch/arm/Kconfig
+--- linux-2.6.20/arch/arm/Kconfig	2007-02-06 02:59:58 +0100
++++ linux-2.6.20-vs2.2.0-pre1/arch/arm/Kconfig	2007-02-06 03:05:21 +0100
+@@ -970,6 +970,8 @@ source "arch/arm/oprofile/Kconfig"
+ 
+ source "arch/arm/Kconfig.debug"
+ 
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+ 
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-2.6.20/arch/arm/kernel/calls.S linux-2.6.20-vs2.2.0-pre1/arch/arm/kernel/calls.S
+--- linux-2.6.20/arch/arm/kernel/calls.S	2007-02-06 02:59:59 +0100
++++ linux-2.6.20-vs2.2.0-pre1/arch/arm/kernel/calls.S	2007-02-06 03:05:21 +0100
+@@ -322,7 +322,7 @@
+ /* 310 */	CALL(sys_request_key)
+ 		CALL(sys_keyctl)
+ 		CALL(ABI(sys_semtimedop, sys_oabi_semtimedop))
+-/* vserver */	CALL(sys_ni_syscall)
++		CALL(sys_vserver)
+ 		CALL(sys_ioprio_set)
+ /* 315 */	CALL(sys_ioprio_get)
+ 		CALL(sys_inotify_init)
+diff -NurpP --minimal linux-2.6.20/arch/arm/kernel/process.c linux-2.6.20-vs2.2.0-pre1/arch/arm/kernel/process.c
+--- linux-2.6.20/arch/arm/kernel/process.c	2007-02-06 02:59:59 +0100
++++ linux-2.6.20-vs2.2.0-pre1/arch/arm/kernel/process.c	2007-02-06 03:05:21 +0100
+@@ -246,7 +246,8 @@ void __show_regs(struct pt_regs *regs)
+ void show_regs(struct pt_regs * regs)
+ {
+ 	printk("\n");
+-	printk("Pid: %d, comm: %20s\n", current->pid, current->comm);
++	printk("Pid: %d[#%u], comm: %20s\n",
++		current->pid, current->xid, current->comm);
+ 	__show_regs(regs);
+ 	__backtrace();
+ }
+@@ -408,7 +409,8 @@ pid_t kernel_thread(int (*fn)(void *), v
+ 	regs.ARM_pc = (unsigned long)kernel_thread_helper;
+ 	regs.ARM_cpsr = SVC_MODE;
+ 
+-	return do_fork(flags|CLONE_VM|CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
++	return do_fork(flags | CLONE_VM | CLONE_UNTRACED | CLONE_KTHREAD,
++		0, &regs, 0, NULL, NULL);
+ }
+ EXPORT_SYMBOL(kernel_thread);
+ 
+diff -NurpP --minimal linux-2.6.20/arch/arm/kernel/traps.c linux-2.6.20-vs2.2.0-pre1/arch/arm/kernel/traps.c
+--- linux-2.6.20/arch/arm/kernel/traps.c	2007-02-06 02:59:59 +0100
++++ linux-2.6.20-vs2.2.0-pre1/arch/arm/kernel/traps.c	2007-02-06 03:05:21 +0100
+@@ -206,8 +206,8 @@ static void __die(const char *str, int e
+ 	printk("Internal error: %s: %x [#%d]\n", str, err, ++die_counter);
+ 	print_modules();
+ 	__show_regs(regs);
+-	printk("Process %s (pid: %d, stack limit = 0x%p)\n",
+-		tsk->comm, tsk->pid, thread + 1);
++	printk("Process %s (pid: %d:#%u, stack limit = 0x%p)\n",
++		tsk->comm, tsk->pid, tsk->xid, thread + 1);
+ 
+ 	if (!user_mode(regs) || in_interrupt()) {
+ 		dump_mem("Stack: ", regs->ARM_sp,
+diff -NurpP --minimal linux-2.6.20/arch/arm26/Kconfig linux-2.6.20-vs2.2.0-pre1/arch/arm26/Kconfig
+--- linux-2.6.20/arch/arm26/Kconfig	2007-02-06 03:00:02 +0100
++++ linux-2.6.20-vs2.2.0-pre1/arch/arm26/Kconfig	2007-02-06 03:05:21 +0100
+@@ -242,6 +242,8 @@ source "drivers/usb/Kconfig"
+ 
+ source "arch/arm26/Kconfig.debug"
+ 
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+ 
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-2.6.20/arch/arm26/kernel/calls.S linux-2.6.20-vs2.2.0-pre1/arch/arm26/kernel/calls.S
+--- linux-2.6.20/arch/arm26/kernel/calls.S	2005-03-02 12:38:19 +0100
++++ linux-2.6.20-vs2.2.0-pre1/arch/arm26/kernel/calls.S	2007-02-06 03:05:21 +0100
+@@ -257,6 +257,11 @@ __syscall_start:
+ 		.long	sys_lremovexattr
+ 		.long	sys_fremovexattr
+ 		.long	sys_tkill
++
++		.rept	313 - (. - __syscall_start) / 4
++			.long	sys_ni_syscall
++		.endr
++		.long	sys_vserver	/* 313 */
+ __syscall_end:
+ 
+ 		.rept	NR_syscalls - (__syscall_end - __syscall_start) / 4
+diff -NurpP --minimal linux-2.6.20/arch/arm26/kernel/process.c linux-2.6.20-vs2.2.0-pre1/arch/arm26/kernel/process.c
+--- linux-2.6.20/arch/arm26/kernel/process.c	2006-09-20 16:57:57 +0200
++++ linux-2.6.20-vs2.2.0-pre1/arch/arm26/kernel/process.c	2007-02-06 03:05:21 +0100
+@@ -365,7 +365,8 @@ pid_t kernel_thread(int (*fn)(void *), v
+         regs.ARM_r3 = (unsigned long)do_exit;
+         regs.ARM_pc = (unsigned long)kernel_thread_helper | MODE_SVC26;
+ 
+-        return do_fork(flags|CLONE_VM|CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
++	return do_fork(flags | CLONE_VM | CLONE_UNTRACED | CLONE_KTHREAD,
++		0, &regs, 0, NULL, NULL);
+ }
+ EXPORT_SYMBOL(kernel_thread);
+ 
+diff -NurpP --minimal linux-2.6.20/arch/arm26/kernel/traps.c linux-2.6.20-vs2.2.0-pre1/arch/arm26/kernel/traps.c
+--- linux-2.6.20/arch/arm26/kernel/traps.c	2006-09-20 16:57:57 +0200
++++ linux-2.6.20-vs2.2.0-pre1/arch/arm26/kernel/traps.c	2007-02-06 03:05:21 +0100
+@@ -185,8 +185,9 @@ NORET_TYPE void die(const char *str, str
+ 	printk("Internal error: %s: %x\n", str, err);
+ 	printk("CPU: %d\n", smp_processor_id());
+ 	show_regs(regs);
+-	printk("Process %s (pid: %d, stack limit = 0x%p)\n",
+-		current->comm, current->pid, end_of_stack(tsk));
++	printk("Process %s (pid: %d[#%u], stack limit = 0x%p)\n",
++		current->comm, current->pid,
++		current->xid, end_of_stack(tsk));
+ 
+ 	if (!user_mode(regs) || in_interrupt()) {
+ 		__dump_stack(tsk, (unsigned long)(regs + 1));
+diff -NurpP --minimal linux-2.6.20/arch/cris/Kconfig linux-2.6.20-vs2.2.0-pre1/arch/cris/Kconfig
+--- linux-2.6.20/arch/cris/Kconfig	2007-02-06 03:00:02 +0100
++++ linux-2.6.20-vs2.2.0-pre1/arch/cris/Kconfig	2007-02-06 03:05:21 +0100
+@@ -193,6 +193,8 @@ source "drivers/usb/Kconfig"
+ 
+ source "arch/cris/Kconfig.debug"
+ 
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+ 
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-2.6.20/arch/cris/arch-v10/kernel/process.c linux-2.6.20-vs2.2.0-pre1/arch/cris/arch-v10/kernel/process.c
+--- linux-2.6.20/arch/cris/arch-v10/kernel/process.c	2006-09-20 16:57:57 +0200
++++ linux-2.6.20-vs2.2.0-pre1/arch/cris/arch-v10/kernel/process.c	2007-02-06 03:05:21 +0100
+@@ -103,7 +103,8 @@ int kernel_thread(int (*fn)(void *), voi
+ 	regs.dccr = 1 << I_DCCR_BITNR;
+ 
+ 	/* Ok, create the new process.. */
+-        return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
++	return do_fork(flags | CLONE_VM | CLONE_UNTRACED | CLONE_KTHREAD,
++		0, &regs, 0, NULL, NULL);
+ }
+ 
+ /* setup the child's kernel stack with a pt_regs and switch_stack on it.
+diff -NurpP --minimal linux-2.6.20/arch/cris/arch-v32/kernel/process.c linux-2.6.20-vs2.2.0-pre1/arch/cris/arch-v32/kernel/process.c
+--- linux-2.6.20/arch/cris/arch-v32/kernel/process.c	2006-09-20 16:57:57 +0200
++++ linux-2.6.20-vs2.2.0-pre1/arch/cris/arch-v32/kernel/process.c	2007-02-06 03:05:21 +0100
+@@ -120,7 +120,8 @@ kernel_thread(int (*fn)(void *), void * 
+ 	regs.ccs = 1 << (I_CCS_BITNR + CCS_SHIFT);
+ 
+ 	/* Create the new process. */
+-        return do_fork(flags | CLONE_VM | CLONE_UNTRACED, 0, &regs, 0, NULL, NULL);
++	return do_fork(flags | CLONE_VM | CLONE_UNTRACED | CLONE_KTHREAD,
++		0, &regs, 0, NULL, NULL);
+ }
+ 
+ /*
+diff -NurpP --minimal linux-2.6.20/arch/cris/kernel/irq.c linux-2.6.20-vs2.2.0-pre1/arch/cris/kernel/irq.c
+--- linux-2.6.20/arch/cris/kernel/irq.c	2006-09-20 16:57:57 +0200
++++ linux-2.6.20-vs2.2.0-pre1/arch/cris/kernel/irq.c	2007-02-06 03:05:21 +0100
+@@ -92,6 +92,7 @@ skip:
+ asmlinkage void do_IRQ(int irq, struct pt_regs * regs)
+ {
+ 	unsigned long sp;
++
+ 	irq_enter();
+ 	sp = rdsp();
+ 	if (unlikely((sp & (PAGE_SIZE - 1)) < (PAGE_SIZE/8))) {
+diff -NurpP --minimal linux-2.6.20/arch/frv/kernel/kernel_thread.S linux-2.6.20-vs2.2.0-pre1/arch/frv/kernel/kernel_thread.S
+--- linux-2.6.20/arch/frv/kernel/kernel_thread.S	2005-03-02 12:38:20 +0100
++++ linux-2.6.20-vs2.2.0-pre1/arch/frv/kernel/kernel_thread.S	2007-02-06 03:05:21 +0100
+@@ -13,6 +13,8 @@
+ #include <asm/unistd.h>
+ 
+ #define CLONE_VM	0x00000100	/* set if VM shared between processes */
++#define CLONE_KTHREAD	0x10000000	/* kernel thread */
++#define CLONE_KT	(CLONE_VM | CLONE_KTHREAD)	/* kernel thread flags */
+ #define	KERN_ERR	"<3>"
+ 
+ 	.section .rodata
+@@ -37,7 +39,7 @@ kernel_thread:
+ 
+ 	# start by forking the current process, but with shared VM
+ 	setlos.p	#__NR_clone,gr7		; syscall number
+-	ori		gr10,#CLONE_VM,gr8	; first syscall arg	[clone_flags]
++	ori		gr10,#CLONE_KT,gr8	; first syscall arg	[clone_flags]
+ 	sethi.p		#0xe4e4,gr9		; second syscall arg	[newsp]
+ 	setlo		#0xe4e4,gr9
+ 	setlos.p	#0,gr10			; third syscall arg	[parent_tidptr]
+diff -NurpP --minimal linux-2.6.20/arch/h8300/Kconfig linux-2.6.20-vs2.2.0-pre1/arch/h8300/Kconfig
+--- linux-2.6.20/arch/h8300/Kconfig	2007-02-06 03:00:03 +0100
++++ linux-2.6.20-vs2.2.0-pre1/arch/h8300/Kconfig	2007-02-06 03:05:21 +0100
+@@ -207,6 +207,8 @@ source "fs/Kconfig"
+ 
+ source "arch/h8300/Kconfig.debug"
+ 
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+ 
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-2.6.20/arch/h8300/kernel/process.c linux-2.6.20-vs2.2.0-pre1/arch/h8300/kernel/process.c
+--- linux-2.6.20/arch/h8300/kernel/process.c	2006-09-20 16:57:58 +0200
++++ linux-2.6.20-vs2.2.0-pre1/arch/h8300/kernel/process.c	2007-02-06 03:05:21 +0100
+@@ -134,7 +134,7 @@ int kernel_thread(int (*fn)(void *), voi
+ 
+ 	fs = get_fs();
+ 	set_fs (KERNEL_DS);
+-	clone_arg = flags | CLONE_VM;
++	clone_arg = flags | CLONE_VM | CLONE_KTHREAD;
+ 	__asm__("mov.l sp,er3\n\t"
+ 		"sub.l er2,er2\n\t"
+ 		"mov.l %2,er1\n\t"
+diff -NurpP --minimal linux-2.6.20/arch/i386/Kconfig linux-2.6.20-vs2.2.0-pre1/arch/i386/Kconfig
+--- linux-2.6.20/arch/i386/Kconfig	2007-02-06 03:00:03 +0100
++++ linux-2.6.20-vs2.2.0-pre1/arch/i386/Kconfig	2007-02-06 03:05:21 +0100
+@@ -1214,6 +1214,8 @@ endmenu
+ 
+ source "arch/i386/Kconfig.debug"
+ 
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+ 
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-2.6.20/arch/i386/kernel/irq.c linux-2.6.20-vs2.2.0-pre1/arch/i386/kernel/irq.c
+--- linux-2.6.20/arch/i386/kernel/irq.c	2006-11-30 21:18:26 +0100
++++ linux-2.6.20-vs2.2.0-pre1/arch/i386/kernel/irq.c	2007-02-06 03:05:21 +0100
+@@ -84,7 +84,6 @@ fastcall unsigned int do_IRQ(struct pt_r
+ 		}
+ 	}
+ #endif
+-
+ #ifdef CONFIG_4KSTACKS
+ 
+ 	curctx = (union irq_ctx *) current_thread_info();
+@@ -124,7 +123,6 @@ fastcall unsigned int do_IRQ(struct pt_r
+ 	} else
+ #endif
+ 		desc->handle_irq(irq, desc);
+-
+ 	irq_exit();
+ 	set_irq_regs(old_regs);
+ 	return 1;
+diff -NurpP --minimal linux-2.6.20/arch/i386/kernel/process.c linux-2.6.20-vs2.2.0-pre1/arch/i386/kernel/process.c
+--- linux-2.6.20/arch/i386/kernel/process.c	2007-02-06 03:00:06 +0100
++++ linux-2.6.20-vs2.2.0-pre1/arch/i386/kernel/process.c	2007-02-06 03:05:21 +0100
+@@ -294,8 +294,10 @@ void show_regs(struct pt_regs * regs)
+ 	unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L;
+ 
<<Diff was trimmed, longer than 597 lines>>


More information about the pld-cvs-commit mailing list