packages: kernel-xenU/kernel-xenU.spec, kernel-xenU/linux-2.6-vs2.3.patch (...

pawelz pawelz at pld-linux.org
Tue Nov 10 11:10:06 CET 2009


Author: pawelz                       Date: Tue Nov 10 10:10:06 2009 GMT
Module: packages                      Tag: HEAD
---- Log message:
- apply vserver patch (disabled by default)

---- Files affected:
packages/kernel-xenU:
   kernel-xenU.spec (1.20 -> 1.21) , linux-2.6-vs2.3.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: packages/kernel-xenU/kernel-xenU.spec
diff -u packages/kernel-xenU/kernel-xenU.spec:1.20 packages/kernel-xenU/kernel-xenU.spec:1.21
--- packages/kernel-xenU/kernel-xenU.spec:1.20	Mon Oct 19 08:42:21 2009
+++ packages/kernel-xenU/kernel-xenU.spec	Tue Nov 10 11:10:01 2009
@@ -7,7 +7,10 @@
 # Conditional build:
 %bcond_without	source		# don't build kernel-xenU-source package
 %bcond_with	verbose		# verbose build (V=1)
+%bcond_with	vserver		# enable vserver
+%bcond_with	ipv6		# enable vserver
 
+%{!?with_vserver:%define with_ipv6 1}
 %{?debug:%define with_verbose 1}
 
 %define		_basever		2.6.31
@@ -16,7 +19,7 @@
 
 %define		_enable_debug_packages			0
 
-%define		alt_kernel	xenU
+%define		alt_kernel	xenU%{?with_vserver:vserver}
 
 # kernel release (used in filesystem and eventually in uname -r)
 # modules will be looked from /lib/modules/%{kernel_release}
@@ -48,6 +51,8 @@
 
 Source10:	kernel-xenU-x86_64.config
 
+Patch1:		linux-2.6-vs2.3.patch
+
 URL:		http://www.kernel.org/
 BuildRequires:	/sbin/depmod
 BuildRequires:	binutils >= 3:2.18
@@ -276,6 +281,10 @@
 %{__bzip2} -dc %{SOURCE1} | patch -p1 -s
 %endif
 
+%if %{with vserver}
+%patch1 -p1
+%endif
+
 # Fix EXTRAVERSION in main Makefile
 sed -i 's#EXTRAVERSION =.*#EXTRAVERSION = %{_postver}-%{alt_kernel}#g' Makefile
 
@@ -339,6 +348,37 @@
 %{?debug:sed -i "s:# CONFIG_DEBUG_PREEMPT is not set:CONFIG_DEBUG_PREEMPT=y:" %{defconfig}}
 %{?debug:sed -i "s:# CONFIG_RT_DEADLOCK_DETECT is not set:CONFIG_RT_DEADLOCK_DETECT=y:" %{defconfig}}
 
+%if %{with vserver}
+cat >> %{defconfig} << EOF
+#
+# Linux VServer
+#
+CONFIG_VSERVER_AUTO_LBACK=y
+# CONFIG_VSERVER_AUTO_SINGLE is not set
+CONFIG_VSERVER_COWBL=y
+CONFIG_VSERVER_VTIME=y
+CONFIG_VSERVER_DEVICE=y
+CONFIG_VSERVER_PROC_SECURE=y
+CONFIG_VSERVER_HARDCPU=y
+CONFIG_VSERVER_IDLETIME=y
+CONFIG_VSERVER_IDLELIMIT=y
+# CONFIG_TAGGING_NONE is not set
+# CONFIG_TAGGING_UID16 is not set
+# CONFIG_TAGGING_GID16 is not set
+CONFIG_TAGGING_ID24=y
+# CONFIG_TAGGING_INTERN is not set
+# CONFIG_TAG_NFSD is not set
+CONFIG_VSERVER_PRIVACY=y
+CONFIG_VSERVER_CONTEXTS=768
+CONFIG_VSERVER_WARN=y
+# CONFIG_VSERVER_DEBUG is not set
+CONFIG_VSERVER=y
+CONFIG_VSERVER_SECURITY=y
+CONFIG_IPV6=%{?with_ipv6:y}%{!?with_ipv6:n}
+CONFIG_CFS_HARD_LIMITS=n
+CONFIG_BLK_DEV_VROOT=m
+EOF
+%endif
 }
 
 BuildKernel() {
@@ -651,6 +691,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.21  2009/11/10 10:10:01  pawelz
+- apply vserver patch (disabled by default)
+
 Revision 1.20  2009/10/19 06:42:21  pawelz
 - up to 2.6.31.4
 

================================================================
Index: packages/kernel-xenU/linux-2.6-vs2.3.patch
diff -u /dev/null packages/kernel-xenU/linux-2.6-vs2.3.patch:1.1
--- /dev/null	Tue Nov 10 11:10:06 2009
+++ packages/kernel-xenU/linux-2.6-vs2.3.patch	Tue Nov 10 11:10:01 2009
@@ -0,0 +1,28699 @@
+diff -NurpP --minimal linux-2.6.31.4/arch/alpha/Kconfig linux-2.6.31.4-vs2.3.0.36.19/arch/alpha/Kconfig
+--- linux-2.6.31.4/arch/alpha/Kconfig	2009-03-24 14:18:07.000000000 +0100
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/alpha/Kconfig	2009-09-10 16:11:43.000000000 +0200
+@@ -666,6 +666,8 @@ config DUMMY_CONSOLE
+ 	depends on VGA_HOSE
+ 	default y
+ 
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+ 
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-2.6.31.4/arch/alpha/kernel/entry.S linux-2.6.31.4-vs2.3.0.36.19/arch/alpha/kernel/entry.S
+--- linux-2.6.31.4/arch/alpha/kernel/entry.S	2009-06-11 17:11:46.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/alpha/kernel/entry.S	2009-09-10 16:11:43.000000000 +0200
+@@ -874,24 +874,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.31.4/arch/alpha/kernel/osf_sys.c linux-2.6.31.4-vs2.3.0.36.19/arch/alpha/kernel/osf_sys.c
+--- linux-2.6.31.4/arch/alpha/kernel/osf_sys.c	2009-09-10 15:25:14.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/alpha/kernel/osf_sys.c	2009-09-10 16:11:43.000000000 +0200
+@@ -872,7 +872,7 @@ SYSCALL_DEFINE2(osf_gettimeofday, struct
+ {
+ 	if (tv) {
+ 		struct timeval ktv;
+-		do_gettimeofday(&ktv);
++		vx_gettimeofday(&ktv);
+ 		if (put_tv32(tv, &ktv))
+ 			return -EFAULT;
+ 	}
+diff -NurpP --minimal linux-2.6.31.4/arch/alpha/kernel/ptrace.c linux-2.6.31.4-vs2.3.0.36.19/arch/alpha/kernel/ptrace.c
+--- linux-2.6.31.4/arch/alpha/kernel/ptrace.c	2009-09-10 15:25:14.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/alpha/kernel/ptrace.c	2009-09-10 16:11:43.000000000 +0200
+@@ -14,6 +14,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>
+diff -NurpP --minimal linux-2.6.31.4/arch/alpha/kernel/systbls.S linux-2.6.31.4-vs2.3.0.36.19/arch/alpha/kernel/systbls.S
+--- linux-2.6.31.4/arch/alpha/kernel/systbls.S	2009-03-24 14:18:08.000000000 +0100
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/alpha/kernel/systbls.S	2009-09-10 16:11:43.000000000 +0200
+@@ -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.31.4/arch/alpha/kernel/traps.c linux-2.6.31.4-vs2.3.0.36.19/arch/alpha/kernel/traps.c
+--- linux-2.6.31.4/arch/alpha/kernel/traps.c	2009-06-11 17:11:46.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/alpha/kernel/traps.c	2009-09-10 16:11:43.000000000 +0200
+@@ -183,7 +183,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, task_pid_nr(current), str, err);
++	printk("%s(%d[#%u]): %s %ld\n", current->comm,
++		task_pid_nr(current), current->xid, str, err);
+ 	dik_show_regs(regs, r9_15);
+ 	add_taint(TAINT_DIE);
+ 	dik_show_trace((unsigned long *)(regs+1));
+diff -NurpP --minimal linux-2.6.31.4/arch/alpha/mm/fault.c linux-2.6.31.4-vs2.3.0.36.19/arch/alpha/mm/fault.c
+--- linux-2.6.31.4/arch/alpha/mm/fault.c	2009-09-10 15:25:14.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/alpha/mm/fault.c	2009-09-10 16:11:43.000000000 +0200
+@@ -193,8 +193,8 @@ do_page_fault(unsigned long address, uns
+ 		down_read(&mm->mmap_sem);
+ 		goto survive;
+ 	}
+-	printk(KERN_ALERT "VM: killing process %s(%d)\n",
+-	       current->comm, task_pid_nr(current));
++	printk(KERN_ALERT "VM: killing process %s(%d:#%u)\n",
++	       current->comm, task_pid_nr(current), current->xid);
+ 	if (!user_mode(regs))
+ 		goto no_context;
+ 	do_group_exit(SIGKILL);
+diff -NurpP --minimal linux-2.6.31.4/arch/arm/Kconfig linux-2.6.31.4-vs2.3.0.36.19/arch/arm/Kconfig
+--- linux-2.6.31.4/arch/arm/Kconfig	2009-09-10 15:25:14.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/arm/Kconfig	2009-09-10 16:11:43.000000000 +0200
+@@ -1483,6 +1483,8 @@ source "fs/Kconfig"
+ 
+ source "arch/arm/Kconfig.debug"
+ 
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+ 
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-2.6.31.4/arch/arm/kernel/calls.S linux-2.6.31.4-vs2.3.0.36.19/arch/arm/kernel/calls.S
+--- linux-2.6.31.4/arch/arm/kernel/calls.S	2009-09-10 15:25:15.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/arm/kernel/calls.S	2009-09-10 16:11:43.000000000 +0200
+@@ -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.31.4/arch/arm/kernel/process.c linux-2.6.31.4-vs2.3.0.36.19/arch/arm/kernel/process.c
+--- linux-2.6.31.4/arch/arm/kernel/process.c	2009-09-10 15:25:15.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/arm/kernel/process.c	2009-09-10 16:11:43.000000000 +0200
+@@ -269,7 +269,8 @@ void __show_regs(struct pt_regs *regs)
+ void show_regs(struct pt_regs * regs)
+ {
+ 	printk("\n");
+-	printk("Pid: %d, comm: %20s\n", task_pid_nr(current), current->comm);
++	printk("Pid: %d[#%u], comm: %20s\n",
++		task_pid_nr(current), current->xid, current->comm);
+ 	__show_regs(regs);
+ 	__backtrace();
+ }
+diff -NurpP --minimal linux-2.6.31.4/arch/arm/kernel/traps.c linux-2.6.31.4-vs2.3.0.36.19/arch/arm/kernel/traps.c
+--- linux-2.6.31.4/arch/arm/kernel/traps.c	2009-06-11 17:11:49.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/arm/kernel/traps.c	2009-09-10 16:11:43.000000000 +0200
+@@ -228,8 +228,8 @@ static void __die(const char *str, int e
+ 	       str, err, ++die_counter);
+ 	print_modules();
+ 	__show_regs(regs);
+-	printk("Process %s (pid: %d, stack limit = 0x%p)\n",
+-		tsk->comm, task_pid_nr(tsk), thread + 1);
++	printk("Process %s (pid: %d:#%u, stack limit = 0x%p)\n",
++		tsk->comm, task_pid_nr(tsk), tsk->xid, thread + 1);
+ 
+ 	if (!user_mode(regs) || in_interrupt()) {
+ 		dump_mem("Stack: ", regs->ARM_sp,
+diff -NurpP --minimal linux-2.6.31.4/arch/arm/mm/fault.c linux-2.6.31.4-vs2.3.0.36.19/arch/arm/mm/fault.c
+--- linux-2.6.31.4/arch/arm/mm/fault.c	2009-09-10 15:25:18.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/arm/mm/fault.c	2009-09-10 16:11:43.000000000 +0200
+@@ -294,7 +294,8 @@ do_page_fault(unsigned long addr, unsign
+ 		 * happened to us that made us unable to handle
+ 		 * the page fault gracefully.
+ 		 */
+-		printk("VM: killing process %s\n", tsk->comm);
++		printk("VM: killing process %s(%d:#%u)\n",
++			tsk->comm, task_pid_nr(tsk), tsk->xid);
+ 		do_group_exit(SIGKILL);
+ 		return 0;
+ 	}
+diff -NurpP --minimal linux-2.6.31.4/arch/avr32/mm/fault.c linux-2.6.31.4-vs2.3.0.36.19/arch/avr32/mm/fault.c
+--- linux-2.6.31.4/arch/avr32/mm/fault.c	2009-09-10 15:25:20.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/avr32/mm/fault.c	2009-09-29 17:32:09.000000000 +0200
+@@ -216,7 +216,8 @@ out_of_memory:
+ 		down_read(&mm->mmap_sem);
+ 		goto survive;
+ 	}
+-	printk("VM: Killing process %s\n", tsk->comm);
++	printk("VM: Killing process %s(%d:#%u)\n",
++		tsk->comm, task_pid_nr(tsk), tsk->xid);
+ 	if (user_mode(regs))
+ 		do_group_exit(SIGKILL);
+ 	goto no_context;
+diff -NurpP --minimal linux-2.6.31.4/arch/cris/Kconfig linux-2.6.31.4-vs2.3.0.36.19/arch/cris/Kconfig
+--- linux-2.6.31.4/arch/cris/Kconfig	2009-06-11 17:11:56.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/cris/Kconfig	2009-09-10 16:11:43.000000000 +0200
+@@ -685,6 +685,8 @@ source "drivers/staging/Kconfig"
+ 
+ source "arch/cris/Kconfig.debug"
+ 
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+ 
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-2.6.31.4/arch/cris/mm/fault.c linux-2.6.31.4-vs2.3.0.36.19/arch/cris/mm/fault.c
+--- linux-2.6.31.4/arch/cris/mm/fault.c	2009-09-10 15:25:21.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/cris/mm/fault.c	2009-09-29 17:25:13.000000000 +0200
+@@ -245,7 +245,8 @@ do_page_fault(unsigned long address, str
+ 
+  out_of_memory:
+ 	up_read(&mm->mmap_sem);
+-	printk("VM: killing process %s\n", tsk->comm);
++	printk("VM: killing process %s(%d:#%u)\n",
++		tsk->comm, task_pid_nr(tsk), tsk->xid);
+ 	if (user_mode(regs))
+ 		do_exit(SIGKILL);
+ 	goto no_context;
+diff -NurpP --minimal linux-2.6.31.4/arch/frv/kernel/kernel_thread.S linux-2.6.31.4-vs2.3.0.36.19/arch/frv/kernel/kernel_thread.S
+--- linux-2.6.31.4/arch/frv/kernel/kernel_thread.S	2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/frv/kernel/kernel_thread.S	2009-09-10 16:11:43.000000000 +0200
+@@ -37,7 +37,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.31.4/arch/frv/mm/fault.c linux-2.6.31.4-vs2.3.0.36.19/arch/frv/mm/fault.c
+--- linux-2.6.31.4/arch/frv/mm/fault.c	2009-09-10 15:25:22.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/frv/mm/fault.c	2009-09-29 17:25:48.000000000 +0200
+@@ -257,7 +257,8 @@ asmlinkage void do_page_fault(int datamm
+  */
+  out_of_memory:
+ 	up_read(&mm->mmap_sem);
+-	printk("VM: killing process %s\n", current->comm);
++	printk("VM: killing process %s(%d:#%u)\n",
++		current->comm, task_pid_nr(current), current->xid);
+ 	if (user_mode(__frame))
+ 		do_group_exit(SIGKILL);
+ 	goto no_context;
+diff -NurpP --minimal linux-2.6.31.4/arch/h8300/Kconfig linux-2.6.31.4-vs2.3.0.36.19/arch/h8300/Kconfig
+--- linux-2.6.31.4/arch/h8300/Kconfig	2009-03-24 14:18:24.000000000 +0100
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/h8300/Kconfig	2009-09-10 16:11:43.000000000 +0200
+@@ -226,6 +226,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.31.4/arch/ia64/ia32/ia32_entry.S linux-2.6.31.4-vs2.3.0.36.19/arch/ia64/ia32/ia32_entry.S
+--- linux-2.6.31.4/arch/ia64/ia32/ia32_entry.S	2009-06-11 17:11:57.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/ia64/ia32/ia32_entry.S	2009-09-10 16:11:43.000000000 +0200
+@@ -451,7 +451,7 @@ ia32_syscall_table:
+  	data8 sys_tgkill	/* 270 */
+  	data8 compat_sys_utimes
+  	data8 sys32_fadvise64_64
+- 	data8 sys_ni_syscall
++	data8 sys32_vserver
+   	data8 sys_ni_syscall
+  	data8 sys_ni_syscall	/* 275 */
+   	data8 sys_ni_syscall
+diff -NurpP --minimal linux-2.6.31.4/arch/ia64/Kconfig linux-2.6.31.4-vs2.3.0.36.19/arch/ia64/Kconfig
+--- linux-2.6.31.4/arch/ia64/Kconfig	2009-09-10 15:25:22.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/ia64/Kconfig	2009-09-10 16:11:43.000000000 +0200
+@@ -676,6 +676,8 @@ source "fs/Kconfig"
+ 
+ source "arch/ia64/Kconfig.debug"
+ 
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+ 
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-2.6.31.4/arch/ia64/kernel/entry.S linux-2.6.31.4-vs2.3.0.36.19/arch/ia64/kernel/entry.S
+--- linux-2.6.31.4/arch/ia64/kernel/entry.S	2009-09-10 15:25:22.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/ia64/kernel/entry.S	2009-09-10 16:11:43.000000000 +0200
+@@ -1753,7 +1753,7 @@ sys_call_table:
+ 	data8 sys_mq_notify
+ 	data8 sys_mq_getsetattr
+ 	data8 sys_kexec_load
+-	data8 sys_ni_syscall			// reserved for vserver
++	data8 sys_vserver
+ 	data8 sys_waitid			// 1270
+ 	data8 sys_add_key
+ 	data8 sys_request_key
+diff -NurpP --minimal linux-2.6.31.4/arch/ia64/kernel/perfmon.c linux-2.6.31.4-vs2.3.0.36.19/arch/ia64/kernel/perfmon.c
+--- linux-2.6.31.4/arch/ia64/kernel/perfmon.c	2009-09-10 15:25:22.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/ia64/kernel/perfmon.c	2009-09-10 16:11:43.000000000 +0200
+@@ -41,6 +41,7 @@
+ #include <linux/rcupdate.h>
+ #include <linux/completion.h>
+ #include <linux/tracehook.h>
++#include <linux/vs_memory.h>
+ 
+ #include <asm/errno.h>
+ #include <asm/intrinsics.h>
+@@ -2372,7 +2373,7 @@ pfm_smpl_buffer_alloc(struct task_struct
+ 	 */
+ 	insert_vm_struct(mm, vma);
+ 
+-	mm->total_vm  += size >> PAGE_SHIFT;
++	vx_vmpages_add(mm, size >> PAGE_SHIFT);
+ 	vm_stat_account(vma->vm_mm, vma->vm_flags, vma->vm_file,
+ 							vma_pages(vma));
+ 	up_write(&task->mm->mmap_sem);
+diff -NurpP --minimal linux-2.6.31.4/arch/ia64/kernel/process.c linux-2.6.31.4-vs2.3.0.36.19/arch/ia64/kernel/process.c
+--- linux-2.6.31.4/arch/ia64/kernel/process.c	2009-06-11 17:11:57.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/ia64/kernel/process.c	2009-09-10 16:11:43.000000000 +0200
+@@ -110,8 +110,8 @@ show_regs (struct pt_regs *regs)
+ 	unsigned long ip = regs->cr_iip + ia64_psr(regs)->ri;
+ 
+ 	print_modules();
+-	printk("\nPid: %d, CPU %d, comm: %20s\n", task_pid_nr(current),
+-			smp_processor_id(), current->comm);
++	printk("\nPid: %d[#%u], CPU %d, comm: %20s\n", task_pid_nr(current),
++			current->xid, smp_processor_id(), current->comm);
+ 	printk("psr : %016lx ifs : %016lx ip  : [<%016lx>]    %s (%s)\n",
+ 	       regs->cr_ipsr, regs->cr_ifs, ip, print_tainted(),
+ 	       init_utsname()->release);
+diff -NurpP --minimal linux-2.6.31.4/arch/ia64/kernel/ptrace.c linux-2.6.31.4-vs2.3.0.36.19/arch/ia64/kernel/ptrace.c
+--- linux-2.6.31.4/arch/ia64/kernel/ptrace.c	2009-09-10 15:25:22.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/ia64/kernel/ptrace.c	2009-09-10 16:11:43.000000000 +0200
+@@ -22,6 +22,7 @@
+ #include <linux/regset.h>
+ #include <linux/elf.h>
+ #include <linux/tracehook.h>
++#include <linux/vs_base.h>
+ 
+ #include <asm/pgtable.h>
+ #include <asm/processor.h>
+diff -NurpP --minimal linux-2.6.31.4/arch/ia64/kernel/traps.c linux-2.6.31.4-vs2.3.0.36.19/arch/ia64/kernel/traps.c
+--- linux-2.6.31.4/arch/ia64/kernel/traps.c	2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/ia64/kernel/traps.c	2009-09-10 16:11:43.000000000 +0200
+@@ -60,8 +60,9 @@ die (const char *str, struct pt_regs *re
+ 	put_cpu();
+ 
+ 	if (++die.lock_owner_depth < 3) {
+-		printk("%s[%d]: %s %ld [%d]\n",
+-		current->comm, task_pid_nr(current), str, err, ++die_counter);
++		printk("%s[%d[#%u]]: %s %ld [%d]\n",
++			current->comm, task_pid_nr(current), current->xid,
++			str, err, ++die_counter);
+ 		if (notify_die(DIE_OOPS, str, regs, err, 255, SIGSEGV)
+ 	            != NOTIFY_STOP)
+ 			show_regs(regs);
+@@ -324,8 +325,9 @@ handle_fpu_swa (int fp_fault, struct pt_
+ 			if ((last.count & 15) < 5 && (ia64_fetchadd(1, &last.count, acq) & 15) < 5) {
+ 				last.time = current_jiffies + 5 * HZ;
+ 				printk(KERN_WARNING
+-		       			"%s(%d): floating-point assist fault at ip %016lx, isr %016lx\n",
+-		       			current->comm, task_pid_nr(current), regs->cr_iip + ia64_psr(regs)->ri, isr);
++					"%s(%d[#%u]): floating-point assist fault at ip %016lx, isr %016lx\n",
++					current->comm, task_pid_nr(current), current->xid,
++					regs->cr_iip + ia64_psr(regs)->ri, isr);
+ 			}
+ 		}
+ 	}
+diff -NurpP --minimal linux-2.6.31.4/arch/ia64/mm/fault.c linux-2.6.31.4-vs2.3.0.36.19/arch/ia64/mm/fault.c
+--- linux-2.6.31.4/arch/ia64/mm/fault.c	2009-09-10 15:25:23.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/ia64/mm/fault.c	2009-09-29 17:26:21.000000000 +0200
+@@ -10,6 +10,7 @@
+ #include <linux/interrupt.h>
+ #include <linux/kprobes.h>
+ #include <linux/kdebug.h>
++#include <linux/vs_memory.h>
+ 
+ #include <asm/pgtable.h>
+ #include <asm/processor.h>
+@@ -281,7 +282,8 @@ ia64_do_page_fault (unsigned long addres
+ 		down_read(&mm->mmap_sem);
+ 		goto survive;
+ 	}
+-	printk(KERN_CRIT "VM: killing process %s\n", current->comm);
++	printk(KERN_CRIT "VM: killing process %s(%d:#%u)\n",
++		current->comm, task_pid_nr(current), current->xid);
+ 	if (user_mode(regs))
+ 		do_group_exit(SIGKILL);
+ 	goto no_context;
+diff -NurpP --minimal linux-2.6.31.4/arch/m32r/kernel/traps.c linux-2.6.31.4-vs2.3.0.36.19/arch/m32r/kernel/traps.c
+--- linux-2.6.31.4/arch/m32r/kernel/traps.c	2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/m32r/kernel/traps.c	2009-09-10 16:11:43.000000000 +0200
+@@ -196,8 +196,9 @@ static void show_registers(struct pt_reg
+ 	} else {
+ 		printk("SPI: %08lx\n", sp);
+ 	}
+-	printk("Process %s (pid: %d, process nr: %d, stackpage=%08lx)",
+-		current->comm, task_pid_nr(current), 0xffff & i, 4096+(unsigned long)current);
++	printk("Process %s (pid: %d[#%u], process nr: %d, stackpage=%08lx)",
++		current->comm, task_pid_nr(current), current->xid,
++		0xffff & i, 4096+(unsigned long)current);
+ 
+ 	/*
+ 	 * When in-kernel, we also print out the stack and code at the
+diff -NurpP --minimal linux-2.6.31.4/arch/m32r/mm/fault.c linux-2.6.31.4-vs2.3.0.36.19/arch/m32r/mm/fault.c
+--- linux-2.6.31.4/arch/m32r/mm/fault.c	2009-09-10 15:25:23.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/m32r/mm/fault.c	2009-09-29 17:26:48.000000000 +0200
+@@ -276,7 +276,8 @@ out_of_memory:
+ 		down_read(&mm->mmap_sem);
+ 		goto survive;
+ 	}
+-	printk("VM: killing process %s\n", tsk->comm);
++	printk("VM: killing process %s(%d:#%u)\n",
++		tsk->comm, task_pid_nr(tsk), tsk->xid);
+ 	if (error_code & ACE_USERMODE)
+ 		do_group_exit(SIGKILL);
+ 	goto no_context;
+diff -NurpP --minimal linux-2.6.31.4/arch/m68k/Kconfig linux-2.6.31.4-vs2.3.0.36.19/arch/m68k/Kconfig
+--- linux-2.6.31.4/arch/m68k/Kconfig	2009-03-24 14:18:26.000000000 +0100
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/m68k/Kconfig	2009-09-10 16:11:43.000000000 +0200
+@@ -616,6 +616,8 @@ source "fs/Kconfig"
+ 
+ source "arch/m68k/Kconfig.debug"
+ 
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+ 
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-2.6.31.4/arch/m68k/kernel/ptrace.c linux-2.6.31.4-vs2.3.0.36.19/arch/m68k/kernel/ptrace.c
+--- linux-2.6.31.4/arch/m68k/kernel/ptrace.c	2008-12-25 00:26:37.000000000 +0100
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/m68k/kernel/ptrace.c	2009-09-10 16:11:43.000000000 +0200
+@@ -18,6 +18,7 @@
+ #include <linux/ptrace.h>
+ #include <linux/user.h>
+ #include <linux/signal.h>
++#include <linux/vs_base.h>
+ 
+ #include <asm/uaccess.h>
+ #include <asm/page.h>
+@@ -269,6 +270,8 @@ long arch_ptrace(struct task_struct *chi
+ 		ret = ptrace_request(child, request, addr, data);
+ 		break;
+ 	}
++	if (!vx_check(vx_task_xid(child), VS_WATCH_P | VS_IDENT))
++		goto out_tsk;
+ 
+ 	return ret;
+ out_eio:
+diff -NurpP --minimal linux-2.6.31.4/arch/m68k/kernel/traps.c linux-2.6.31.4-vs2.3.0.36.19/arch/m68k/kernel/traps.c
+--- linux-2.6.31.4/arch/m68k/kernel/traps.c	2009-09-10 15:25:23.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/m68k/kernel/traps.c	2009-09-10 16:11:43.000000000 +0200
+@@ -906,8 +906,8 @@ void show_registers(struct pt_regs *regs
+ 	printk("d4: %08lx    d5: %08lx    a0: %08lx    a1: %08lx\n",
+ 	       regs->d4, regs->d5, regs->a0, regs->a1);
+ 
+-	printk("Process %s (pid: %d, task=%p)\n",
+-		current->comm, task_pid_nr(current), current);
++	printk("Process %s (pid: %d[#%u], task=%p)\n",
++		current->comm, task_pid_nr(current), current->xid, current);
+ 	addr = (unsigned long)&fp->un;
+ 	printk("Frame format=%X ", regs->format);
+ 	switch (regs->format) {
+diff -NurpP --minimal linux-2.6.31.4/arch/m68k/mm/fault.c linux-2.6.31.4-vs2.3.0.36.19/arch/m68k/mm/fault.c
+--- linux-2.6.31.4/arch/m68k/mm/fault.c	2009-09-10 15:25:23.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/m68k/mm/fault.c	2009-09-29 17:27:45.000000000 +0200
+@@ -186,7 +186,8 @@ out_of_memory:
+ 		goto survive;
+ 	}
+ 
+-	printk("VM: killing process %s\n", current->comm);
++	printk("VM: killing process %s(%d:#%u)\n",
++		current->comm, task_pid_nr(current), current->xid);
+ 	if (user_mode(regs))
+ 		do_group_exit(SIGKILL);
+ 
+diff -NurpP --minimal linux-2.6.31.4/arch/m68knommu/Kconfig linux-2.6.31.4-vs2.3.0.36.19/arch/m68knommu/Kconfig
+--- linux-2.6.31.4/arch/m68knommu/Kconfig	2009-06-11 17:11:59.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/m68knommu/Kconfig	2009-09-10 16:11:43.000000000 +0200
+@@ -721,6 +721,8 @@ source "fs/Kconfig"
+ 
+ source "arch/m68knommu/Kconfig.debug"
+ 
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+ 
+ source "crypto/Kconfig"
+diff -NurpP --minimal linux-2.6.31.4/arch/m68knommu/kernel/traps.c linux-2.6.31.4-vs2.3.0.36.19/arch/m68knommu/kernel/traps.c
+--- linux-2.6.31.4/arch/m68knommu/kernel/traps.c	2009-09-10 15:25:23.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/m68knommu/kernel/traps.c	2009-09-10 16:11:43.000000000 +0200
+@@ -78,8 +78,9 @@ void die_if_kernel(char *str, struct pt_
+ 	printk(KERN_EMERG "d4: %08lx    d5: %08lx    a0: %08lx    a1: %08lx\n",
+ 	       fp->d4, fp->d5, fp->a0, fp->a1);
+ 
+-	printk(KERN_EMERG "Process %s (pid: %d, stackpage=%08lx)\n",
+-		current->comm, current->pid, PAGE_SIZE+(unsigned long)current);
++	printk(KERN_EMERG "Process %s (pid: %d[#%u], stackpage=%08lx)\n",
++		current->comm, task_pid_nr(current), current->xid,
++		PAGE_SIZE+(unsigned long)current);
+ 	show_stack(NULL, (unsigned long *)(fp + 1));
+ 	add_taint(TAINT_DIE);
+ 	do_exit(SIGSEGV);
+diff -NurpP --minimal linux-2.6.31.4/arch/microblaze/mm/fault.c linux-2.6.31.4-vs2.3.0.36.19/arch/microblaze/mm/fault.c
+--- linux-2.6.31.4/arch/microblaze/mm/fault.c	2009-09-10 15:25:24.000000000 +0200
++++ linux-2.6.31.4-vs2.3.0.36.19/arch/microblaze/mm/fault.c	2009-09-29 17:28:08.000000000 +0200
+@@ -279,7 +279,8 @@ out_of_memory:
+ 		goto survive;
+ 	}
+ 	up_read(&mm->mmap_sem);
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/kernel-xenU/kernel-xenU.spec?r1=1.20&r2=1.21&f=u



More information about the pld-cvs-commit mailing list