]> git.pld-linux.org Git - packages/kernel.git/blame - kernel-vserver-2.3.patch
- up to 2.6.35.5
[packages/kernel.git] / kernel-vserver-2.3.patch
CommitLineData
4744a4b1
AM
1diff -NurpP --minimal linux-2.6.35.4/arch/alpha/Kconfig linux-2.6.35.4-vs2.3.0.36.32/arch/alpha/Kconfig
2--- linux-2.6.35.4/arch/alpha/Kconfig 2010-08-02 16:51:53.000000000 +0200
3+++ linux-2.6.35.4-vs2.3.0.36.32/arch/alpha/Kconfig 2010-08-02 17:05:05.000000000 +0200
76514441 4@@ -681,6 +681,8 @@ config DUMMY_CONSOLE
2380c486
JR
5 depends on VGA_HOSE
6 default y
d337f35e
JR
7
8+source "kernel/vserver/Kconfig"
9+
10 source "security/Kconfig"
11
12 source "crypto/Kconfig"
4744a4b1
AM
13diff -NurpP --minimal linux-2.6.35.4/arch/alpha/kernel/entry.S linux-2.6.35.4-vs2.3.0.36.32/arch/alpha/kernel/entry.S
14--- linux-2.6.35.4/arch/alpha/kernel/entry.S 2009-06-11 17:11:46.000000000 +0200
15+++ linux-2.6.35.4-vs2.3.0.36.32/arch/alpha/kernel/entry.S 2010-08-02 17:05:05.000000000 +0200
ec22aa5c 16@@ -874,24 +874,15 @@ sys_getxgid:
d337f35e
JR
17 .globl sys_getxpid
18 .ent sys_getxpid
19 sys_getxpid:
20+ lda $sp, -16($sp)
21+ stq $26, 0($sp)
22 .prologue 0
23- ldq $2, TI_TASK($8)
24
25- /* See linux/kernel/timer.c sys_getppid for discussion
26- about this loop. */
27- ldq $3, TASK_GROUP_LEADER($2)
28- ldq $4, TASK_REAL_PARENT($3)
29- ldl $0, TASK_TGID($2)
30-1: ldl $1, TASK_TGID($4)
31-#ifdef CONFIG_SMP
32- mov $4, $5
33- mb
34- ldq $3, TASK_GROUP_LEADER($2)
35- ldq $4, TASK_REAL_PARENT($3)
36- cmpeq $4, $5, $5
37- beq $5, 1b
38-#endif
39- stq $1, 80($sp)
40+ lda $16, 96($sp)
41+ jsr $26, do_getxpid
42+ ldq $26, 0($sp)
43+
44+ lda $sp, 16($sp)
45 ret
46 .end sys_getxpid
47
4744a4b1
AM
48diff -NurpP --minimal linux-2.6.35.4/arch/alpha/kernel/osf_sys.c linux-2.6.35.4-vs2.3.0.36.32/arch/alpha/kernel/osf_sys.c
49--- linux-2.6.35.4/arch/alpha/kernel/osf_sys.c 2010-07-07 18:30:51.000000000 +0200
50+++ linux-2.6.35.4-vs2.3.0.36.32/arch/alpha/kernel/osf_sys.c 2010-08-02 17:05:05.000000000 +0200
78865d5b 51@@ -866,7 +866,7 @@ SYSCALL_DEFINE2(osf_gettimeofday, struct
d337f35e
JR
52 {
53 if (tv) {
54 struct timeval ktv;
55- do_gettimeofday(&ktv);
56+ vx_gettimeofday(&ktv);
57 if (put_tv32(tv, &ktv))
58 return -EFAULT;
59 }
4744a4b1
AM
60diff -NurpP --minimal linux-2.6.35.4/arch/alpha/kernel/ptrace.c linux-2.6.35.4-vs2.3.0.36.32/arch/alpha/kernel/ptrace.c
61--- linux-2.6.35.4/arch/alpha/kernel/ptrace.c 2010-07-07 18:30:51.000000000 +0200
62+++ linux-2.6.35.4-vs2.3.0.36.32/arch/alpha/kernel/ptrace.c 2010-08-02 17:05:05.000000000 +0200
78865d5b
AM
63@@ -13,6 +13,7 @@
64 #include <linux/user.h>
d337f35e
JR
65 #include <linux/security.h>
66 #include <linux/signal.h>
67+#include <linux/vs_base.h>
68
69 #include <asm/uaccess.h>
70 #include <asm/pgtable.h>
4744a4b1
AM
71diff -NurpP --minimal linux-2.6.35.4/arch/alpha/kernel/systbls.S linux-2.6.35.4-vs2.3.0.36.32/arch/alpha/kernel/systbls.S
72--- linux-2.6.35.4/arch/alpha/kernel/systbls.S 2010-02-25 11:51:19.000000000 +0100
73+++ linux-2.6.35.4-vs2.3.0.36.32/arch/alpha/kernel/systbls.S 2010-08-02 17:05:05.000000000 +0200
d337f35e
JR
74@@ -446,7 +446,7 @@ sys_call_table:
75 .quad sys_stat64 /* 425 */
76 .quad sys_lstat64
77 .quad sys_fstat64
78- .quad sys_ni_syscall /* sys_vserver */
79+ .quad sys_vserver /* sys_vserver */
80 .quad sys_ni_syscall /* sys_mbind */
81 .quad sys_ni_syscall /* sys_get_mempolicy */
82 .quad sys_ni_syscall /* sys_set_mempolicy */
4744a4b1
AM
83diff -NurpP --minimal linux-2.6.35.4/arch/alpha/kernel/traps.c linux-2.6.35.4-vs2.3.0.36.32/arch/alpha/kernel/traps.c
84--- linux-2.6.35.4/arch/alpha/kernel/traps.c 2010-07-07 18:30:51.000000000 +0200
85+++ linux-2.6.35.4-vs2.3.0.36.32/arch/alpha/kernel/traps.c 2010-08-02 17:05:05.000000000 +0200
78865d5b 86@@ -184,7 +184,8 @@ die_if_kernel(char * str, struct pt_regs
d337f35e
JR
87 #ifdef CONFIG_SMP
88 printk("CPU %d ", hard_smp_processor_id());
89 #endif
2380c486 90- printk("%s(%d): %s %ld\n", current->comm, task_pid_nr(current), str, err);
d337f35e 91+ printk("%s(%d[#%u]): %s %ld\n", current->comm,
2380c486 92+ task_pid_nr(current), current->xid, str, err);
d337f35e 93 dik_show_regs(regs, r9_15);
2380c486 94 add_taint(TAINT_DIE);
d337f35e 95 dik_show_trace((unsigned long *)(regs+1));
4744a4b1
AM
96diff -NurpP --minimal linux-2.6.35.4/arch/arm/include/asm/tlb.h linux-2.6.35.4-vs2.3.0.36.32/arch/arm/include/asm/tlb.h
97--- linux-2.6.35.4/arch/arm/include/asm/tlb.h 2009-09-10 15:25:15.000000000 +0200
98+++ linux-2.6.35.4-vs2.3.0.36.32/arch/arm/include/asm/tlb.h 2010-08-02 17:05:05.000000000 +0200
2bf5ad28
AM
99@@ -27,6 +27,7 @@
100
101 #else /* !CONFIG_MMU */
102
103+#include <linux/vs_memory.h>
104 #include <asm/pgalloc.h>
105
106 /*
4744a4b1
AM
107diff -NurpP --minimal linux-2.6.35.4/arch/arm/Kconfig linux-2.6.35.4-vs2.3.0.36.32/arch/arm/Kconfig
108--- linux-2.6.35.4/arch/arm/Kconfig 2010-09-05 01:41:56.000000000 +0200
109+++ linux-2.6.35.4-vs2.3.0.36.32/arch/arm/Kconfig 2010-08-14 18:19:32.000000000 +0200
c146dd73 110@@ -1685,6 +1685,8 @@ source "fs/Kconfig"
d337f35e
JR
111
112 source "arch/arm/Kconfig.debug"
113
114+source "kernel/vserver/Kconfig"
115+
116 source "security/Kconfig"
117
118 source "crypto/Kconfig"
4744a4b1
AM
119diff -NurpP --minimal linux-2.6.35.4/arch/arm/kernel/calls.S linux-2.6.35.4-vs2.3.0.36.32/arch/arm/kernel/calls.S
120--- linux-2.6.35.4/arch/arm/kernel/calls.S 2010-07-07 18:30:52.000000000 +0200
121+++ linux-2.6.35.4-vs2.3.0.36.32/arch/arm/kernel/calls.S 2010-08-02 17:05:05.000000000 +0200
d337f35e
JR
122@@ -322,7 +322,7 @@
123 /* 310 */ CALL(sys_request_key)
124 CALL(sys_keyctl)
125 CALL(ABI(sys_semtimedop, sys_oabi_semtimedop))
126-/* vserver */ CALL(sys_ni_syscall)
127+ CALL(sys_vserver)
128 CALL(sys_ioprio_set)
129 /* 315 */ CALL(sys_ioprio_get)
130 CALL(sys_inotify_init)
4744a4b1
AM
131diff -NurpP --minimal linux-2.6.35.4/arch/arm/kernel/process.c linux-2.6.35.4-vs2.3.0.36.32/arch/arm/kernel/process.c
132--- linux-2.6.35.4/arch/arm/kernel/process.c 2010-08-02 16:51:55.000000000 +0200
133+++ linux-2.6.35.4-vs2.3.0.36.32/arch/arm/kernel/process.c 2010-08-02 17:05:05.000000000 +0200
78865d5b 134@@ -269,7 +269,8 @@ void __show_regs(struct pt_regs *regs)
d337f35e
JR
135 void show_regs(struct pt_regs * regs)
136 {
137 printk("\n");
2380c486 138- printk("Pid: %d, comm: %20s\n", task_pid_nr(current), current->comm);
d337f35e 139+ printk("Pid: %d[#%u], comm: %20s\n",
2380c486 140+ task_pid_nr(current), current->xid, current->comm);
d337f35e
JR
141 __show_regs(regs);
142 __backtrace();
143 }
4744a4b1
AM
144diff -NurpP --minimal linux-2.6.35.4/arch/arm/kernel/traps.c linux-2.6.35.4-vs2.3.0.36.32/arch/arm/kernel/traps.c
145--- linux-2.6.35.4/arch/arm/kernel/traps.c 2010-07-07 18:30:52.000000000 +0200
146+++ linux-2.6.35.4-vs2.3.0.36.32/arch/arm/kernel/traps.c 2010-08-02 17:05:05.000000000 +0200
78865d5b
AM
147@@ -243,8 +243,8 @@ static int __die(const char *str, int er
148
d337f35e
JR
149 print_modules();
150 __show_regs(regs);
7e46296a
AM
151- printk(KERN_EMERG "Process %.*s (pid: %d, stack limit = 0x%p)\n",
152- TASK_COMM_LEN, tsk->comm, task_pid_nr(tsk), thread + 1);
153+ printk(KERN_EMERG "Process %.*s (pid: %d:#%u, stack limit = 0x%p)\n",
154+ TASK_COMM_LEN, tsk->comm, task_pid_nr(tsk), tsk->xid, thread + 1);
d337f35e
JR
155
156 if (!user_mode(regs) || in_interrupt()) {
7e46296a 157 dump_mem(KERN_EMERG, "Stack: ", regs->ARM_sp,
4744a4b1
AM
158diff -NurpP --minimal linux-2.6.35.4/arch/avr32/mm/fault.c linux-2.6.35.4-vs2.3.0.36.32/arch/avr32/mm/fault.c
159--- linux-2.6.35.4/arch/avr32/mm/fault.c 2009-09-10 15:25:20.000000000 +0200
160+++ linux-2.6.35.4-vs2.3.0.36.32/arch/avr32/mm/fault.c 2010-08-02 17:05:05.000000000 +0200
4a036bed
AM
161@@ -216,7 +216,8 @@ out_of_memory:
162 down_read(&mm->mmap_sem);
163 goto survive;
164 }
165- printk("VM: Killing process %s\n", tsk->comm);
166+ printk("VM: Killing process %s(%d:#%u)\n",
167+ tsk->comm, task_pid_nr(tsk), tsk->xid);
168 if (user_mode(regs))
169 do_group_exit(SIGKILL);
170 goto no_context;
4744a4b1
AM
171diff -NurpP --minimal linux-2.6.35.4/arch/cris/Kconfig linux-2.6.35.4-vs2.3.0.36.32/arch/cris/Kconfig
172--- linux-2.6.35.4/arch/cris/Kconfig 2010-08-02 16:52:03.000000000 +0200
173+++ linux-2.6.35.4-vs2.3.0.36.32/arch/cris/Kconfig 2010-08-02 17:05:05.000000000 +0200
76514441 174@@ -694,6 +694,8 @@ source "drivers/staging/Kconfig"
d337f35e
JR
175
176 source "arch/cris/Kconfig.debug"
177
178+source "kernel/vserver/Kconfig"
179+
180 source "security/Kconfig"
181
182 source "crypto/Kconfig"
4744a4b1
AM
183diff -NurpP --minimal linux-2.6.35.4/arch/cris/mm/fault.c linux-2.6.35.4-vs2.3.0.36.32/arch/cris/mm/fault.c
184--- linux-2.6.35.4/arch/cris/mm/fault.c 2010-02-25 11:51:26.000000000 +0100
185+++ linux-2.6.35.4-vs2.3.0.36.32/arch/cris/mm/fault.c 2010-08-02 17:05:05.000000000 +0200
4a036bed
AM
186@@ -245,7 +245,8 @@ do_page_fault(unsigned long address, str
187
188 out_of_memory:
189 up_read(&mm->mmap_sem);
190- printk("VM: killing process %s\n", tsk->comm);
191+ printk("VM: killing process %s(%d:#%u)\n",
192+ tsk->comm, task_pid_nr(tsk), tsk->xid);
193 if (user_mode(regs))
194 do_exit(SIGKILL);
195 goto no_context;
4744a4b1
AM
196diff -NurpP --minimal linux-2.6.35.4/arch/frv/kernel/kernel_thread.S linux-2.6.35.4-vs2.3.0.36.32/arch/frv/kernel/kernel_thread.S
197--- linux-2.6.35.4/arch/frv/kernel/kernel_thread.S 2008-12-25 00:26:37.000000000 +0100
198+++ linux-2.6.35.4-vs2.3.0.36.32/arch/frv/kernel/kernel_thread.S 2010-08-02 17:05:05.000000000 +0200
2380c486 199@@ -37,7 +37,7 @@ kernel_thread:
d337f35e
JR
200
201 # start by forking the current process, but with shared VM
202 setlos.p #__NR_clone,gr7 ; syscall number
203- ori gr10,#CLONE_VM,gr8 ; first syscall arg [clone_flags]
204+ ori gr10,#CLONE_KT,gr8 ; first syscall arg [clone_flags]
205 sethi.p #0xe4e4,gr9 ; second syscall arg [newsp]
206 setlo #0xe4e4,gr9
207 setlos.p #0,gr10 ; third syscall arg [parent_tidptr]
4744a4b1
AM
208diff -NurpP --minimal linux-2.6.35.4/arch/h8300/Kconfig linux-2.6.35.4-vs2.3.0.36.32/arch/h8300/Kconfig
209--- linux-2.6.35.4/arch/h8300/Kconfig 2010-02-25 11:51:26.000000000 +0100
210+++ linux-2.6.35.4-vs2.3.0.36.32/arch/h8300/Kconfig 2010-08-02 17:05:05.000000000 +0200
2bf5ad28 211@@ -230,6 +230,8 @@ source "fs/Kconfig"
d337f35e
JR
212
213 source "arch/h8300/Kconfig.debug"
214
215+source "kernel/vserver/Kconfig"
216+
217 source "security/Kconfig"
218
219 source "crypto/Kconfig"
4744a4b1
AM
220diff -NurpP --minimal linux-2.6.35.4/arch/ia64/include/asm/tlb.h linux-2.6.35.4-vs2.3.0.36.32/arch/ia64/include/asm/tlb.h
221--- linux-2.6.35.4/arch/ia64/include/asm/tlb.h 2010-02-25 11:51:26.000000000 +0100
222+++ linux-2.6.35.4-vs2.3.0.36.32/arch/ia64/include/asm/tlb.h 2010-08-02 17:05:05.000000000 +0200
0411181d
AM
223@@ -40,6 +40,7 @@
224 #include <linux/mm.h>
225 #include <linux/pagemap.h>
226 #include <linux/swap.h>
227+#include <linux/vs_memory.h>
228
229 #include <asm/pgalloc.h>
230 #include <asm/processor.h>
4744a4b1
AM
231diff -NurpP --minimal linux-2.6.35.4/arch/ia64/Kconfig linux-2.6.35.4-vs2.3.0.36.32/arch/ia64/Kconfig
232--- linux-2.6.35.4/arch/ia64/Kconfig 2010-08-02 16:52:03.000000000 +0200
233+++ linux-2.6.35.4-vs2.3.0.36.32/arch/ia64/Kconfig 2010-08-02 17:05:05.000000000 +0200
76514441 234@@ -676,6 +676,8 @@ source "fs/Kconfig"
2380c486
JR
235
236 source "arch/ia64/Kconfig.debug"
d337f35e
JR
237
238+source "kernel/vserver/Kconfig"
239+
240 source "security/Kconfig"
241
242 source "crypto/Kconfig"
4744a4b1
AM
243diff -NurpP --minimal linux-2.6.35.4/arch/ia64/kernel/entry.S linux-2.6.35.4-vs2.3.0.36.32/arch/ia64/kernel/entry.S
244--- linux-2.6.35.4/arch/ia64/kernel/entry.S 2010-07-07 18:31:01.000000000 +0200
245+++ linux-2.6.35.4-vs2.3.0.36.32/arch/ia64/kernel/entry.S 2010-08-02 17:05:05.000000000 +0200
78865d5b 246@@ -1714,7 +1714,7 @@ sys_call_table:
2380c486
JR
247 data8 sys_mq_notify
248 data8 sys_mq_getsetattr
249 data8 sys_kexec_load
250- data8 sys_ni_syscall // reserved for vserver
251+ data8 sys_vserver
252 data8 sys_waitid // 1270
253 data8 sys_add_key
254 data8 sys_request_key
4744a4b1
AM
255diff -NurpP --minimal linux-2.6.35.4/arch/ia64/kernel/perfmon.c linux-2.6.35.4-vs2.3.0.36.32/arch/ia64/kernel/perfmon.c
256--- linux-2.6.35.4/arch/ia64/kernel/perfmon.c 2010-07-07 18:31:01.000000000 +0200
257+++ linux-2.6.35.4-vs2.3.0.36.32/arch/ia64/kernel/perfmon.c 2010-08-02 17:05:05.000000000 +0200
78865d5b 258@@ -42,6 +42,7 @@
2380c486 259 #include <linux/completion.h>
ec22aa5c 260 #include <linux/tracehook.h>
78865d5b 261 #include <linux/slab.h>
2380c486 262+#include <linux/vs_memory.h>
d337f35e 263
2380c486
JR
264 #include <asm/errno.h>
265 #include <asm/intrinsics.h>
4744a4b1
AM
266diff -NurpP --minimal linux-2.6.35.4/arch/ia64/kernel/process.c linux-2.6.35.4-vs2.3.0.36.32/arch/ia64/kernel/process.c
267--- linux-2.6.35.4/arch/ia64/kernel/process.c 2010-07-07 18:31:01.000000000 +0200
268+++ linux-2.6.35.4-vs2.3.0.36.32/arch/ia64/kernel/process.c 2010-08-02 17:05:05.000000000 +0200
78865d5b 269@@ -113,8 +113,8 @@ show_regs (struct pt_regs *regs)
2380c486 270 unsigned long ip = regs->cr_iip + ia64_psr(regs)->ri;
d337f35e 271
2380c486
JR
272 print_modules();
273- printk("\nPid: %d, CPU %d, comm: %20s\n", task_pid_nr(current),
274- smp_processor_id(), current->comm);
275+ printk("\nPid: %d[#%u], CPU %d, comm: %20s\n", task_pid_nr(current),
276+ current->xid, smp_processor_id(), current->comm);
277 printk("psr : %016lx ifs : %016lx ip : [<%016lx>] %s (%s)\n",
278 regs->cr_ipsr, regs->cr_ifs, ip, print_tainted(),
279 init_utsname()->release);
4744a4b1
AM
280diff -NurpP --minimal linux-2.6.35.4/arch/ia64/kernel/ptrace.c linux-2.6.35.4-vs2.3.0.36.32/arch/ia64/kernel/ptrace.c
281--- linux-2.6.35.4/arch/ia64/kernel/ptrace.c 2010-08-02 16:52:04.000000000 +0200
282+++ linux-2.6.35.4-vs2.3.0.36.32/arch/ia64/kernel/ptrace.c 2010-08-02 17:05:05.000000000 +0200
78865d5b 283@@ -21,6 +21,7 @@
2380c486 284 #include <linux/regset.h>
d337f35e 285 #include <linux/elf.h>
ec22aa5c 286 #include <linux/tracehook.h>
d337f35e
JR
287+#include <linux/vs_base.h>
288
289 #include <asm/pgtable.h>
290 #include <asm/processor.h>
4744a4b1
AM
291diff -NurpP --minimal linux-2.6.35.4/arch/ia64/kernel/traps.c linux-2.6.35.4-vs2.3.0.36.32/arch/ia64/kernel/traps.c
292--- linux-2.6.35.4/arch/ia64/kernel/traps.c 2010-07-07 18:31:01.000000000 +0200
293+++ linux-2.6.35.4-vs2.3.0.36.32/arch/ia64/kernel/traps.c 2010-08-02 17:05:05.000000000 +0200
78865d5b 294@@ -59,8 +59,9 @@ die (const char *str, struct pt_regs *re
d337f35e
JR
295 put_cpu();
296
297 if (++die.lock_owner_depth < 3) {
298- printk("%s[%d]: %s %ld [%d]\n",
2380c486 299- current->comm, task_pid_nr(current), str, err, ++die_counter);
d337f35e 300+ printk("%s[%d[#%u]]: %s %ld [%d]\n",
2380c486 301+ current->comm, task_pid_nr(current), current->xid,
d337f35e 302+ str, err, ++die_counter);
2380c486
JR
303 if (notify_die(DIE_OOPS, str, regs, err, 255, SIGSEGV)
304 != NOTIFY_STOP)
305 show_regs(regs);
78865d5b 306@@ -323,8 +324,9 @@ handle_fpu_swa (int fp_fault, struct pt_
2380c486
JR
307 if ((last.count & 15) < 5 && (ia64_fetchadd(1, &last.count, acq) & 15) < 5) {
308 last.time = current_jiffies + 5 * HZ;
309 printk(KERN_WARNING
310- "%s(%d): floating-point assist fault at ip %016lx, isr %016lx\n",
311- current->comm, task_pid_nr(current), regs->cr_iip + ia64_psr(regs)->ri, isr);
312+ "%s(%d[#%u]): floating-point assist fault at ip %016lx, isr %016lx\n",
313+ current->comm, task_pid_nr(current), current->xid,
314+ regs->cr_iip + ia64_psr(regs)->ri, isr);
315 }
316 }
d337f35e 317 }
4744a4b1
AM
318diff -NurpP --minimal linux-2.6.35.4/arch/ia64/mm/fault.c linux-2.6.35.4-vs2.3.0.36.32/arch/ia64/mm/fault.c
319--- linux-2.6.35.4/arch/ia64/mm/fault.c 2010-08-02 16:52:04.000000000 +0200
320+++ linux-2.6.35.4-vs2.3.0.36.32/arch/ia64/mm/fault.c 2010-08-02 17:05:05.000000000 +0200
d337f35e 321@@ -10,6 +10,7 @@
d337f35e
JR
322 #include <linux/interrupt.h>
323 #include <linux/kprobes.h>
2380c486 324 #include <linux/kdebug.h>
d337f35e
JR
325+#include <linux/vs_memory.h>
326
327 #include <asm/pgtable.h>
328 #include <asm/processor.h>
4744a4b1
AM
329diff -NurpP --minimal linux-2.6.35.4/arch/m32r/kernel/traps.c linux-2.6.35.4-vs2.3.0.36.32/arch/m32r/kernel/traps.c
330--- linux-2.6.35.4/arch/m32r/kernel/traps.c 2009-12-03 20:01:57.000000000 +0100
331+++ linux-2.6.35.4-vs2.3.0.36.32/arch/m32r/kernel/traps.c 2010-08-02 17:05:05.000000000 +0200
2380c486 332@@ -196,8 +196,9 @@ static void show_registers(struct pt_reg
d337f35e
JR
333 } else {
334 printk("SPI: %08lx\n", sp);
335 }
336- printk("Process %s (pid: %d, process nr: %d, stackpage=%08lx)",
2380c486 337- current->comm, task_pid_nr(current), 0xffff & i, 4096+(unsigned long)current);
d337f35e 338+ printk("Process %s (pid: %d[#%u], process nr: %d, stackpage=%08lx)",
2380c486 339+ current->comm, task_pid_nr(current), current->xid,
d337f35e
JR
340+ 0xffff & i, 4096+(unsigned long)current);
341
342 /*
343 * When in-kernel, we also print out the stack and code at the
4744a4b1
AM
344diff -NurpP --minimal linux-2.6.35.4/arch/m68k/Kconfig linux-2.6.35.4-vs2.3.0.36.32/arch/m68k/Kconfig
345--- linux-2.6.35.4/arch/m68k/Kconfig 2010-08-02 16:52:04.000000000 +0200
346+++ linux-2.6.35.4-vs2.3.0.36.32/arch/m68k/Kconfig 2010-08-02 17:05:05.000000000 +0200
76514441 347@@ -619,6 +619,8 @@ source "fs/Kconfig"
d337f35e
JR
348
349 source "arch/m68k/Kconfig.debug"
350
351+source "kernel/vserver/Kconfig"
352+
353 source "security/Kconfig"
354
355 source "crypto/Kconfig"
4744a4b1
AM
356diff -NurpP --minimal linux-2.6.35.4/arch/m68k/kernel/ptrace.c linux-2.6.35.4-vs2.3.0.36.32/arch/m68k/kernel/ptrace.c
357--- linux-2.6.35.4/arch/m68k/kernel/ptrace.c 2010-07-07 18:31:02.000000000 +0200
358+++ linux-2.6.35.4-vs2.3.0.36.32/arch/m68k/kernel/ptrace.c 2010-08-02 17:05:05.000000000 +0200
2380c486 359@@ -18,6 +18,7 @@
d337f35e
JR
360 #include <linux/ptrace.h>
361 #include <linux/user.h>
362 #include <linux/signal.h>
363+#include <linux/vs_base.h>
364
365 #include <asm/uaccess.h>
366 #include <asm/page.h>
78865d5b 367@@ -254,6 +255,8 @@ long arch_ptrace(struct task_struct *chi
d337f35e
JR
368 ret = ptrace_request(child, request, addr, data);
369 break;
370 }
2380c486 371+ if (!vx_check(vx_task_xid(child), VS_WATCH_P | VS_IDENT))
d337f35e
JR
372+ goto out_tsk;
373
374 return ret;
375 out_eio:
4744a4b1
AM
376diff -NurpP --minimal linux-2.6.35.4/arch/m68k/kernel/traps.c linux-2.6.35.4-vs2.3.0.36.32/arch/m68k/kernel/traps.c
377--- linux-2.6.35.4/arch/m68k/kernel/traps.c 2010-08-02 16:52:04.000000000 +0200
378+++ linux-2.6.35.4-vs2.3.0.36.32/arch/m68k/kernel/traps.c 2010-08-02 17:05:05.000000000 +0200
ec22aa5c 379@@ -906,8 +906,8 @@ void show_registers(struct pt_regs *regs
d337f35e
JR
380 printk("d4: %08lx d5: %08lx a0: %08lx a1: %08lx\n",
381 regs->d4, regs->d5, regs->a0, regs->a1);
382
383- printk("Process %s (pid: %d, task=%p)\n",
2380c486 384- current->comm, task_pid_nr(current), current);
d337f35e 385+ printk("Process %s (pid: %d[#%u], task=%p)\n",
2380c486 386+ current->comm, task_pid_nr(current), current->xid, current);
d337f35e
JR
387 addr = (unsigned long)&fp->un;
388 printk("Frame format=%X ", regs->format);
389 switch (regs->format) {
4744a4b1
AM
390diff -NurpP --minimal linux-2.6.35.4/arch/m68knommu/Kconfig linux-2.6.35.4-vs2.3.0.36.32/arch/m68knommu/Kconfig
391--- linux-2.6.35.4/arch/m68knommu/Kconfig 2010-08-02 16:52:04.000000000 +0200
392+++ linux-2.6.35.4-vs2.3.0.36.32/arch/m68knommu/Kconfig 2010-08-02 17:05:05.000000000 +0200
2bf5ad28 393@@ -734,6 +734,8 @@ source "fs/Kconfig"
d337f35e
JR
394
395 source "arch/m68knommu/Kconfig.debug"
396
397+source "kernel/vserver/Kconfig"
398+
399 source "security/Kconfig"
400
401 source "crypto/Kconfig"
4744a4b1
AM
402diff -NurpP --minimal linux-2.6.35.4/arch/m68knommu/kernel/traps.c linux-2.6.35.4-vs2.3.0.36.32/arch/m68knommu/kernel/traps.c
403--- linux-2.6.35.4/arch/m68knommu/kernel/traps.c 2009-09-10 15:25:23.000000000 +0200
404+++ linux-2.6.35.4-vs2.3.0.36.32/arch/m68knommu/kernel/traps.c 2010-08-02 17:05:05.000000000 +0200
ec22aa5c 405@@ -78,8 +78,9 @@ void die_if_kernel(char *str, struct pt_
d337f35e
JR
406 printk(KERN_EMERG "d4: %08lx d5: %08lx a0: %08lx a1: %08lx\n",
407 fp->d4, fp->d5, fp->a0, fp->a1);
408
409- printk(KERN_EMERG "Process %s (pid: %d, stackpage=%08lx)\n",
410- current->comm, current->pid, PAGE_SIZE+(unsigned long)current);
411+ printk(KERN_EMERG "Process %s (pid: %d[#%u], stackpage=%08lx)\n",
2380c486 412+ current->comm, task_pid_nr(current), current->xid,
d337f35e 413+ PAGE_SIZE+(unsigned long)current);
2380c486
JR
414 show_stack(NULL, (unsigned long *)(fp + 1));
415 add_taint(TAINT_DIE);
d337f35e 416 do_exit(SIGSEGV);
4744a4b1
AM
417diff -NurpP --minimal linux-2.6.35.4/arch/mips/Kconfig linux-2.6.35.4-vs2.3.0.36.32/arch/mips/Kconfig
418--- linux-2.6.35.4/arch/mips/Kconfig 2010-08-02 16:52:05.000000000 +0200
419+++ linux-2.6.35.4-vs2.3.0.36.32/arch/mips/Kconfig 2010-08-02 17:05:05.000000000 +0200
76514441 420@@ -2253,6 +2253,8 @@ source "fs/Kconfig"
d337f35e
JR
421
422 source "arch/mips/Kconfig.debug"
423
424+source "kernel/vserver/Kconfig"
425+
426 source "security/Kconfig"
427
428 source "crypto/Kconfig"
4744a4b1
AM
429diff -NurpP --minimal linux-2.6.35.4/arch/mips/kernel/ptrace.c linux-2.6.35.4-vs2.3.0.36.32/arch/mips/kernel/ptrace.c
430--- linux-2.6.35.4/arch/mips/kernel/ptrace.c 2010-07-07 18:31:04.000000000 +0200
431+++ linux-2.6.35.4-vs2.3.0.36.32/arch/mips/kernel/ptrace.c 2010-08-02 17:05:05.000000000 +0200
2380c486 432@@ -25,6 +25,7 @@
d337f35e 433 #include <linux/security.h>
2380c486
JR
434 #include <linux/audit.h>
435 #include <linux/seccomp.h>
d337f35e
JR
436+#include <linux/vs_base.h>
437
438 #include <asm/byteorder.h>
439 #include <asm/cpu.h>
ec22aa5c 440@@ -259,6 +260,9 @@ long arch_ptrace(struct task_struct *chi
d337f35e
JR
441 {
442 int ret;
443
2380c486 444+ if (!vx_check(vx_task_xid(child), VS_WATCH_P | VS_IDENT))
d337f35e
JR
445+ goto out;
446+
447 switch (request) {
448 /* when I and D space are separate, these will need to be fixed. */
449 case PTRACE_PEEKTEXT: /* read word at location addr. */
4744a4b1
AM
450diff -NurpP --minimal linux-2.6.35.4/arch/mips/kernel/scall32-o32.S linux-2.6.35.4-vs2.3.0.36.32/arch/mips/kernel/scall32-o32.S
451--- linux-2.6.35.4/arch/mips/kernel/scall32-o32.S 2010-02-25 11:51:28.000000000 +0100
452+++ linux-2.6.35.4-vs2.3.0.36.32/arch/mips/kernel/scall32-o32.S 2010-08-02 17:05:05.000000000 +0200
7e46296a 453@@ -525,7 +525,7 @@ einval: li v0, -ENOSYS
d337f35e
JR
454 sys sys_mq_timedreceive 5
455 sys sys_mq_notify 2 /* 4275 */
456 sys sys_mq_getsetattr 3
457- sys sys_ni_syscall 0 /* sys_vserver */
458+ sys sys_vserver 3
459 sys sys_waitid 5
460 sys sys_ni_syscall 0 /* available, was setaltroot */
461 sys sys_add_key 5 /* 4280 */
4744a4b1
AM
462diff -NurpP --minimal linux-2.6.35.4/arch/mips/kernel/scall64-64.S linux-2.6.35.4-vs2.3.0.36.32/arch/mips/kernel/scall64-64.S
463--- linux-2.6.35.4/arch/mips/kernel/scall64-64.S 2010-02-25 11:51:28.000000000 +0100
464+++ linux-2.6.35.4-vs2.3.0.36.32/arch/mips/kernel/scall64-64.S 2010-08-02 17:05:05.000000000 +0200
7e46296a 465@@ -362,7 +362,7 @@ sys_call_table:
d337f35e
JR
466 PTR sys_mq_timedreceive
467 PTR sys_mq_notify
468 PTR sys_mq_getsetattr /* 5235 */
469- PTR sys_ni_syscall /* sys_vserver */
470+ PTR sys_vserver
471 PTR sys_waitid
472 PTR sys_ni_syscall /* available, was setaltroot */
473 PTR sys_add_key
4744a4b1
AM
474diff -NurpP --minimal linux-2.6.35.4/arch/mips/kernel/scall64-n32.S linux-2.6.35.4-vs2.3.0.36.32/arch/mips/kernel/scall64-n32.S
475--- linux-2.6.35.4/arch/mips/kernel/scall64-n32.S 2010-08-02 16:52:05.000000000 +0200
476+++ linux-2.6.35.4-vs2.3.0.36.32/arch/mips/kernel/scall64-n32.S 2010-08-02 17:05:05.000000000 +0200
d337f35e
JR
477@@ -360,7 +360,7 @@ EXPORT(sysn32_call_table)
478 PTR compat_sys_mq_timedreceive
479 PTR compat_sys_mq_notify
480 PTR compat_sys_mq_getsetattr
481- PTR sys_ni_syscall /* 6240, sys_vserver */
482+ PTR sys32_vserver /* 6240 */
2380c486 483 PTR compat_sys_waitid
d337f35e
JR
484 PTR sys_ni_syscall /* available, was setaltroot */
485 PTR sys_add_key
4744a4b1
AM
486diff -NurpP --minimal linux-2.6.35.4/arch/mips/kernel/scall64-o32.S linux-2.6.35.4-vs2.3.0.36.32/arch/mips/kernel/scall64-o32.S
487--- linux-2.6.35.4/arch/mips/kernel/scall64-o32.S 2010-07-07 18:31:04.000000000 +0200
488+++ linux-2.6.35.4-vs2.3.0.36.32/arch/mips/kernel/scall64-o32.S 2010-08-02 17:05:05.000000000 +0200
ec22aa5c 489@@ -480,7 +480,7 @@ sys_call_table:
d337f35e
JR
490 PTR compat_sys_mq_timedreceive
491 PTR compat_sys_mq_notify /* 4275 */
492 PTR compat_sys_mq_getsetattr
493- PTR sys_ni_syscall /* sys_vserver */
494+ PTR sys32_vserver
2380c486 495 PTR sys_32_waitid
d337f35e
JR
496 PTR sys_ni_syscall /* available, was setaltroot */
497 PTR sys_add_key /* 4280 */
4744a4b1
AM
498diff -NurpP --minimal linux-2.6.35.4/arch/mips/kernel/traps.c linux-2.6.35.4-vs2.3.0.36.32/arch/mips/kernel/traps.c
499--- linux-2.6.35.4/arch/mips/kernel/traps.c 2010-08-02 16:52:05.000000000 +0200
500+++ linux-2.6.35.4-vs2.3.0.36.32/arch/mips/kernel/traps.c 2010-08-02 17:05:05.000000000 +0200
76514441 501@@ -340,9 +340,10 @@ void show_registers(const struct pt_regs
2380c486
JR
502
503 __show_regs(regs);
d337f35e 504 print_modules();
2380c486
JR
505- printk("Process %s (pid: %d, threadinfo=%p, task=%p, tls=%0*lx)\n",
506- current->comm, current->pid, current_thread_info(), current,
507- field, current_thread_info()->tp_value);
508+ printk("Process %s (pid: %d:#%u, threadinfo=%p, task=%p, tls=%0*lx)\n",
509+ current->comm, task_pid_nr(current), current->xid,
510+ current_thread_info(), current,
511+ field, current_thread_info()->tp_value);
512 if (cpu_has_userlocal) {
513 unsigned long tls;
514
4744a4b1
AM
515diff -NurpP --minimal linux-2.6.35.4/arch/parisc/Kconfig linux-2.6.35.4-vs2.3.0.36.32/arch/parisc/Kconfig
516--- linux-2.6.35.4/arch/parisc/Kconfig 2010-08-02 16:52:06.000000000 +0200
517+++ linux-2.6.35.4-vs2.3.0.36.32/arch/parisc/Kconfig 2010-08-02 17:05:05.000000000 +0200
76514441 518@@ -299,6 +299,8 @@ source "fs/Kconfig"
d337f35e
JR
519
520 source "arch/parisc/Kconfig.debug"
521
522+source "kernel/vserver/Kconfig"
523+
524 source "security/Kconfig"
525
526 source "crypto/Kconfig"
4744a4b1
AM
527diff -NurpP --minimal linux-2.6.35.4/arch/parisc/kernel/syscall_table.S linux-2.6.35.4-vs2.3.0.36.32/arch/parisc/kernel/syscall_table.S
528--- linux-2.6.35.4/arch/parisc/kernel/syscall_table.S 2010-07-07 18:31:04.000000000 +0200
529+++ linux-2.6.35.4-vs2.3.0.36.32/arch/parisc/kernel/syscall_table.S 2010-08-02 17:05:05.000000000 +0200
2380c486 530@@ -361,7 +361,7 @@
d337f35e
JR
531 ENTRY_COMP(mbind) /* 260 */
532 ENTRY_COMP(get_mempolicy)
533 ENTRY_COMP(set_mempolicy)
534- ENTRY_SAME(ni_syscall) /* 263: reserved for vserver */
535+ ENTRY_DIFF(vserver)
536 ENTRY_SAME(add_key)
537 ENTRY_SAME(request_key) /* 265 */
538 ENTRY_SAME(keyctl)
4744a4b1
AM
539diff -NurpP --minimal linux-2.6.35.4/arch/parisc/kernel/traps.c linux-2.6.35.4-vs2.3.0.36.32/arch/parisc/kernel/traps.c
540--- linux-2.6.35.4/arch/parisc/kernel/traps.c 2009-09-10 15:25:40.000000000 +0200
541+++ linux-2.6.35.4-vs2.3.0.36.32/arch/parisc/kernel/traps.c 2010-08-02 17:05:05.000000000 +0200
2380c486 542@@ -236,8 +236,9 @@ void die_if_kernel(char *str, struct pt_
d337f35e
JR
543 if (err == 0)
544 return; /* STFU */
545
546- printk(KERN_CRIT "%s (pid %d): %s (code %ld) at " RFMT "\n",
2380c486 547- current->comm, task_pid_nr(current), str, err, regs->iaoq[0]);
d337f35e 548+ printk(KERN_CRIT "%s (pid %d:#%u): %s (code %ld) at " RFMT "\n",
2380c486 549+ current->comm, task_pid_nr(current), current->xid,
d337f35e
JR
550+ str, err, regs->iaoq[0]);
551 #ifdef PRINT_USER_FAULTS
552 /* XXX for debugging only */
553 show_regs(regs);
ec22aa5c 554@@ -270,8 +271,8 @@ void die_if_kernel(char *str, struct pt_
d337f35e
JR
555 pdc_console_restart();
556
2380c486
JR
557 if (err)
558- printk(KERN_CRIT "%s (pid %d): %s (code %ld)\n",
559- current->comm, task_pid_nr(current), str, err);
560+ printk(KERN_CRIT "%s (pid %d:#%u): %s (code %ld)\n",
561+ current->comm, task_pid_nr(current), current->xid, str, err);
562
563 /* Wot's wrong wif bein' racy? */
564 if (current->thread.flags & PARISC_KERNEL_DEATH) {
4744a4b1
AM
565diff -NurpP --minimal linux-2.6.35.4/arch/parisc/mm/fault.c linux-2.6.35.4-vs2.3.0.36.32/arch/parisc/mm/fault.c
566--- linux-2.6.35.4/arch/parisc/mm/fault.c 2010-08-02 16:52:06.000000000 +0200
567+++ linux-2.6.35.4-vs2.3.0.36.32/arch/parisc/mm/fault.c 2010-08-02 17:05:05.000000000 +0200
ec22aa5c 568@@ -237,8 +237,9 @@ bad_area:
d337f35e
JR
569
570 #ifdef PRINT_USER_FAULTS
571 printk(KERN_DEBUG "\n");
572- printk(KERN_DEBUG "do_page_fault() pid=%d command='%s' type=%lu address=0x%08lx\n",
2380c486 573- task_pid_nr(tsk), tsk->comm, code, address);
d337f35e
JR
574+ printk(KERN_DEBUG "do_page_fault() pid=%d:#%u "
575+ "command='%s' type=%lu address=0x%08lx\n",
2380c486 576+ task_pid_nr(tsk), tsk->xid, tsk->comm, code, address);
d337f35e
JR
577 if (vma) {
578 printk(KERN_DEBUG "vm_start = 0x%08lx, vm_end = 0x%08lx\n",
579 vma->vm_start, vma->vm_end);
4744a4b1
AM
580diff -NurpP --minimal linux-2.6.35.4/arch/powerpc/include/asm/unistd.h linux-2.6.35.4-vs2.3.0.36.32/arch/powerpc/include/asm/unistd.h
581--- linux-2.6.35.4/arch/powerpc/include/asm/unistd.h 2010-07-07 18:31:05.000000000 +0200
582+++ linux-2.6.35.4-vs2.3.0.36.32/arch/powerpc/include/asm/unistd.h 2010-08-02 17:05:05.000000000 +0200
4a036bed
AM
583@@ -275,7 +275,7 @@
584 #endif
585 #define __NR_rtas 255
586 #define __NR_sys_debug_setcontext 256
587-/* Number 257 is reserved for vserver */
06102837 588+#define __NR_vserver 257
4a036bed
AM
589 #define __NR_migrate_pages 258
590 #define __NR_mbind 259
591 #define __NR_get_mempolicy 260
4744a4b1
AM
592diff -NurpP --minimal linux-2.6.35.4/arch/powerpc/Kconfig linux-2.6.35.4-vs2.3.0.36.32/arch/powerpc/Kconfig
593--- linux-2.6.35.4/arch/powerpc/Kconfig 2010-08-02 16:52:06.000000000 +0200
594+++ linux-2.6.35.4-vs2.3.0.36.32/arch/powerpc/Kconfig 2010-08-02 17:05:05.000000000 +0200
76514441 595@@ -990,6 +990,8 @@ source "lib/Kconfig"
d337f35e
JR
596
597 source "arch/powerpc/Kconfig.debug"
598
599+source "kernel/vserver/Kconfig"
600+
601 source "security/Kconfig"
602
603 config KEYS_COMPAT
4744a4b1
AM
604diff -NurpP --minimal linux-2.6.35.4/arch/powerpc/kernel/process.c linux-2.6.35.4-vs2.3.0.36.32/arch/powerpc/kernel/process.c
605--- linux-2.6.35.4/arch/powerpc/kernel/process.c 2010-08-02 16:52:07.000000000 +0200
606+++ linux-2.6.35.4-vs2.3.0.36.32/arch/powerpc/kernel/process.c 2010-08-02 17:05:05.000000000 +0200
76514441 607@@ -605,8 +605,9 @@ void show_regs(struct pt_regs * regs)
2380c486 608 #else
d337f35e 609 printk("DAR: "REG", DSISR: "REG"\n", regs->dar, regs->dsisr);
2380c486 610 #endif
d337f35e 611- printk("TASK = %p[%d] '%s' THREAD: %p",
2380c486 612- current, task_pid_nr(current), current->comm, task_thread_info(current));
d337f35e 613+ printk("TASK = %p[%d,#%u] '%s' THREAD: %p",
2380c486 614+ current, task_pid_nr(current), current->xid,
d337f35e
JR
615+ current->comm, task_thread_info(current));
616
617 #ifdef CONFIG_SMP
2380c486 618 printk(" CPU: %d", raw_smp_processor_id());
4744a4b1
AM
619diff -NurpP --minimal linux-2.6.35.4/arch/powerpc/kernel/traps.c linux-2.6.35.4-vs2.3.0.36.32/arch/powerpc/kernel/traps.c
620--- linux-2.6.35.4/arch/powerpc/kernel/traps.c 2010-08-02 16:52:07.000000000 +0200
621+++ linux-2.6.35.4-vs2.3.0.36.32/arch/powerpc/kernel/traps.c 2010-08-02 17:05:05.000000000 +0200
76514441 622@@ -1053,8 +1053,9 @@ void nonrecoverable_exception(struct pt_
d337f35e
JR
623
624 void trace_syscall(struct pt_regs *regs)
625 {
626- printk("Task: %p(%d), PC: %08lX/%08lX, Syscall: %3ld, Result: %s%ld %s\n",
2380c486 627- current, task_pid_nr(current), regs->nip, regs->link, regs->gpr[0],
d337f35e 628+ printk("Task: %p(%d[#%u]), PC: %08lX/%08lX, Syscall: %3ld, Result: %s%ld %s\n",
2380c486 629+ current, task_pid_nr(current), current->xid,
d337f35e
JR
630+ regs->nip, regs->link, regs->gpr[0],
631 regs->ccr&0x10000000?"Error=":"", regs->gpr[3], print_tainted());
632 }
633
4744a4b1
AM
634diff -NurpP --minimal linux-2.6.35.4/arch/powerpc/kernel/vdso.c linux-2.6.35.4-vs2.3.0.36.32/arch/powerpc/kernel/vdso.c
635--- linux-2.6.35.4/arch/powerpc/kernel/vdso.c 2010-08-02 16:52:07.000000000 +0200
636+++ linux-2.6.35.4-vs2.3.0.36.32/arch/powerpc/kernel/vdso.c 2010-08-02 17:43:41.000000000 +0200
7e46296a 637@@ -23,6 +23,7 @@
d337f35e
JR
638 #include <linux/security.h>
639 #include <linux/bootmem.h>
76514441 640 #include <linux/memblock.h>
d337f35e
JR
641+#include <linux/vs_memory.h>
642
643 #include <asm/pgtable.h>
644 #include <asm/system.h>
4744a4b1
AM
645diff -NurpP --minimal linux-2.6.35.4/arch/s390/include/asm/tlb.h linux-2.6.35.4-vs2.3.0.36.32/arch/s390/include/asm/tlb.h
646--- linux-2.6.35.4/arch/s390/include/asm/tlb.h 2009-09-10 15:25:43.000000000 +0200
647+++ linux-2.6.35.4-vs2.3.0.36.32/arch/s390/include/asm/tlb.h 2010-08-02 17:05:05.000000000 +0200
0411181d
AM
648@@ -23,6 +23,8 @@
649
650 #include <linux/mm.h>
651 #include <linux/swap.h>
652+#include <linux/vs_memory.h>
653+
654 #include <asm/processor.h>
655 #include <asm/pgalloc.h>
656 #include <asm/smp.h>
4744a4b1
AM
657diff -NurpP --minimal linux-2.6.35.4/arch/s390/include/asm/unistd.h linux-2.6.35.4-vs2.3.0.36.32/arch/s390/include/asm/unistd.h
658--- linux-2.6.35.4/arch/s390/include/asm/unistd.h 2010-07-07 18:31:06.000000000 +0200
659+++ linux-2.6.35.4-vs2.3.0.36.32/arch/s390/include/asm/unistd.h 2010-08-02 17:05:05.000000000 +0200
0411181d
AM
660@@ -202,7 +202,7 @@
661 #define __NR_clock_gettime (__NR_timer_create+6)
662 #define __NR_clock_getres (__NR_timer_create+7)
663 #define __NR_clock_nanosleep (__NR_timer_create+8)
664-/* Number 263 is reserved for vserver */
665+#define __NR_vserver 263
666 #define __NR_statfs64 265
667 #define __NR_fstatfs64 266
668 #define __NR_remap_file_pages 267
4744a4b1
AM
669diff -NurpP --minimal linux-2.6.35.4/arch/s390/Kconfig linux-2.6.35.4-vs2.3.0.36.32/arch/s390/Kconfig
670--- linux-2.6.35.4/arch/s390/Kconfig 2010-08-02 16:52:08.000000000 +0200
671+++ linux-2.6.35.4-vs2.3.0.36.32/arch/s390/Kconfig 2010-08-02 17:05:05.000000000 +0200
76514441 672@@ -623,6 +623,8 @@ source "fs/Kconfig"
d337f35e
JR
673
674 source "arch/s390/Kconfig.debug"
675
676+source "kernel/vserver/Kconfig"
677+
678 source "security/Kconfig"
679
680 source "crypto/Kconfig"
4744a4b1
AM
681diff -NurpP --minimal linux-2.6.35.4/arch/s390/kernel/ptrace.c linux-2.6.35.4-vs2.3.0.36.32/arch/s390/kernel/ptrace.c
682--- linux-2.6.35.4/arch/s390/kernel/ptrace.c 2010-08-02 16:52:09.000000000 +0200
683+++ linux-2.6.35.4-vs2.3.0.36.32/arch/s390/kernel/ptrace.c 2010-08-02 17:05:05.000000000 +0200
ec22aa5c 684@@ -36,6 +36,7 @@
2380c486 685 #include <linux/regset.h>
ec22aa5c
AM
686 #include <linux/tracehook.h>
687 #include <linux/seccomp.h>
d337f35e 688+#include <linux/vs_base.h>
ec22aa5c
AM
689 #include <trace/syscall.h>
690 #include <asm/compat.h>
d337f35e 691 #include <asm/segment.h>
4744a4b1
AM
692diff -NurpP --minimal linux-2.6.35.4/arch/s390/kernel/syscalls.S linux-2.6.35.4-vs2.3.0.36.32/arch/s390/kernel/syscalls.S
693--- linux-2.6.35.4/arch/s390/kernel/syscalls.S 2010-07-07 18:31:07.000000000 +0200
694+++ linux-2.6.35.4-vs2.3.0.36.32/arch/s390/kernel/syscalls.S 2010-08-02 17:05:05.000000000 +0200
d337f35e
JR
695@@ -271,7 +271,7 @@ SYSCALL(sys_clock_settime,sys_clock_sett
696 SYSCALL(sys_clock_gettime,sys_clock_gettime,sys32_clock_gettime_wrapper) /* 260 */
697 SYSCALL(sys_clock_getres,sys_clock_getres,sys32_clock_getres_wrapper)
698 SYSCALL(sys_clock_nanosleep,sys_clock_nanosleep,sys32_clock_nanosleep_wrapper)
699-NI_SYSCALL /* reserved for vserver */
700+SYSCALL(sys_vserver,sys_vserver,sys32_vserver)
2380c486 701 SYSCALL(sys_s390_fadvise64_64,sys_ni_syscall,sys32_fadvise64_64_wrapper)
d337f35e
JR
702 SYSCALL(sys_statfs64,sys_statfs64,compat_sys_statfs64_wrapper)
703 SYSCALL(sys_fstatfs64,sys_fstatfs64,compat_sys_fstatfs64_wrapper)
4744a4b1
AM
704diff -NurpP --minimal linux-2.6.35.4/arch/sh/Kconfig linux-2.6.35.4-vs2.3.0.36.32/arch/sh/Kconfig
705--- linux-2.6.35.4/arch/sh/Kconfig 2010-08-02 16:52:09.000000000 +0200
706+++ linux-2.6.35.4-vs2.3.0.36.32/arch/sh/Kconfig 2010-08-02 17:05:05.000000000 +0200
76514441 707@@ -881,6 +881,8 @@ source "fs/Kconfig"
d337f35e
JR
708
709 source "arch/sh/Kconfig.debug"
710
711+source "kernel/vserver/Kconfig"
712+
713 source "security/Kconfig"
714
715 source "crypto/Kconfig"
4744a4b1
AM
716diff -NurpP --minimal linux-2.6.35.4/arch/sh/kernel/irq.c linux-2.6.35.4-vs2.3.0.36.32/arch/sh/kernel/irq.c
717--- linux-2.6.35.4/arch/sh/kernel/irq.c 2010-08-02 16:52:10.000000000 +0200
718+++ linux-2.6.35.4-vs2.3.0.36.32/arch/sh/kernel/irq.c 2010-08-02 17:41:50.000000000 +0200
76514441 719@@ -13,6 +13,7 @@
d337f35e 720 #include <linux/seq_file.h>
7e46296a 721 #include <linux/ftrace.h>
76514441 722 #include <linux/delay.h>
7e46296a 723+// #include <linux/vs_context.h>
d337f35e 724 #include <asm/processor.h>
2380c486 725 #include <asm/machvec.h>
d337f35e 726 #include <asm/uaccess.h>
4744a4b1
AM
727diff -NurpP --minimal linux-2.6.35.4/arch/sh/kernel/vsyscall/vsyscall.c linux-2.6.35.4-vs2.3.0.36.32/arch/sh/kernel/vsyscall/vsyscall.c
728--- linux-2.6.35.4/arch/sh/kernel/vsyscall/vsyscall.c 2010-07-07 18:31:10.000000000 +0200
729+++ linux-2.6.35.4-vs2.3.0.36.32/arch/sh/kernel/vsyscall/vsyscall.c 2010-08-02 17:05:05.000000000 +0200
78865d5b 730@@ -18,6 +18,7 @@
d337f35e 731 #include <linux/elf.h>
2380c486
JR
732 #include <linux/sched.h>
733 #include <linux/err.h>
d337f35e
JR
734+#include <linux/vs_memory.h>
735
736 /*
737 * Should the kernel map a VDSO page into processes and pass its
4744a4b1
AM
738diff -NurpP --minimal linux-2.6.35.4/arch/sparc/include/asm/tlb_64.h linux-2.6.35.4-vs2.3.0.36.32/arch/sparc/include/asm/tlb_64.h
739--- linux-2.6.35.4/arch/sparc/include/asm/tlb_64.h 2009-09-10 15:25:45.000000000 +0200
740+++ linux-2.6.35.4-vs2.3.0.36.32/arch/sparc/include/asm/tlb_64.h 2010-08-02 17:05:05.000000000 +0200
ec22aa5c
AM
741@@ -3,6 +3,7 @@
742
743 #include <linux/swap.h>
744 #include <linux/pagemap.h>
745+#include <linux/vs_memory.h>
746 #include <asm/pgalloc.h>
747 #include <asm/tlbflush.h>
748 #include <asm/mmu_context.h>
4744a4b1
AM
749diff -NurpP --minimal linux-2.6.35.4/arch/sparc/include/asm/unistd.h linux-2.6.35.4-vs2.3.0.36.32/arch/sparc/include/asm/unistd.h
750--- linux-2.6.35.4/arch/sparc/include/asm/unistd.h 2010-07-07 18:31:10.000000000 +0200
751+++ linux-2.6.35.4-vs2.3.0.36.32/arch/sparc/include/asm/unistd.h 2010-08-02 17:05:05.000000000 +0200
ec22aa5c
AM
752@@ -335,7 +335,7 @@
753 #define __NR_timer_getoverrun 264
754 #define __NR_timer_delete 265
755 #define __NR_timer_create 266
756-/* #define __NR_vserver 267 Reserved for VSERVER */
757+#define __NR_vserver 267
758 #define __NR_io_setup 268
759 #define __NR_io_destroy 269
760 #define __NR_io_submit 270
4744a4b1
AM
761diff -NurpP --minimal linux-2.6.35.4/arch/sparc/Kconfig linux-2.6.35.4-vs2.3.0.36.32/arch/sparc/Kconfig
762--- linux-2.6.35.4/arch/sparc/Kconfig 2010-08-02 16:52:10.000000000 +0200
763+++ linux-2.6.35.4-vs2.3.0.36.32/arch/sparc/Kconfig 2010-08-02 17:05:05.000000000 +0200
76514441 764@@ -570,6 +570,8 @@ source "fs/Kconfig"
d337f35e
JR
765
766 source "arch/sparc/Kconfig.debug"
767
768+source "kernel/vserver/Kconfig"
769+
770 source "security/Kconfig"
771
772 source "crypto/Kconfig"
4744a4b1
AM
773diff -NurpP --minimal linux-2.6.35.4/arch/sparc/kernel/systbls_32.S linux-2.6.35.4-vs2.3.0.36.32/arch/sparc/kernel/systbls_32.S
774--- linux-2.6.35.4/arch/sparc/kernel/systbls_32.S 2010-02-25 11:51:34.000000000 +0100
775+++ linux-2.6.35.4-vs2.3.0.36.32/arch/sparc/kernel/systbls_32.S 2010-08-02 17:05:05.000000000 +0200
50e68740 776@@ -70,7 +70,7 @@ sys_call_table:
9390b158 777 /*250*/ .long sys_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_nfsservctl
50e68740
JR
778 /*255*/ .long sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep
779 /*260*/ .long sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun
780-/*265*/ .long sys_timer_delete, sys_timer_create, sys_nis_syscall, sys_io_setup, sys_io_destroy
781+/*265*/ .long sys_timer_delete, sys_timer_create, sys_vserver, sys_io_setup, sys_io_destroy
782 /*270*/ .long sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink
783 /*275*/ .long sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid
784 /*280*/ .long sys_tee, sys_add_key, sys_request_key, sys_keyctl, sys_openat
4744a4b1
AM
785diff -NurpP --minimal linux-2.6.35.4/arch/sparc/kernel/systbls_64.S linux-2.6.35.4-vs2.3.0.36.32/arch/sparc/kernel/systbls_64.S
786--- linux-2.6.35.4/arch/sparc/kernel/systbls_64.S 2010-07-07 18:31:10.000000000 +0200
787+++ linux-2.6.35.4-vs2.3.0.36.32/arch/sparc/kernel/systbls_64.S 2010-08-02 17:05:05.000000000 +0200
50e68740 788@@ -71,7 +71,7 @@ sys_call_table32:
2bf5ad28 789 /*250*/ .word sys_mremap, compat_sys_sysctl, sys32_getsid, sys_fdatasync, sys32_nfsservctl
50e68740
JR
790 .word sys32_sync_file_range, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep
791 /*260*/ .word compat_sys_sched_getaffinity, compat_sys_sched_setaffinity, sys32_timer_settime, compat_sys_timer_gettime, sys_timer_getoverrun
792- .word sys_timer_delete, compat_sys_timer_create, sys_ni_syscall, compat_sys_io_setup, sys_io_destroy
793+ .word sys_timer_delete, compat_sys_timer_create, sys32_vserver, compat_sys_io_setup, sys_io_destroy
794 /*270*/ .word sys32_io_submit, sys_io_cancel, compat_sys_io_getevents, sys32_mq_open, sys_mq_unlink
795 .word compat_sys_mq_timedsend, compat_sys_mq_timedreceive, compat_sys_mq_notify, compat_sys_mq_getsetattr, compat_sys_waitid
796 /*280*/ .word sys32_tee, sys_add_key, sys_request_key, sys_keyctl, compat_sys_openat
ec22aa5c 797@@ -146,7 +146,7 @@ sys_call_table:
50e68740
JR
798 /*250*/ .word sys_64_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_nfsservctl
799 .word sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep
800 /*260*/ .word sys_sched_getaffinity, sys_sched_setaffinity, sys_timer_settime, sys_timer_gettime, sys_timer_getoverrun
801- .word sys_timer_delete, sys_timer_create, sys_ni_syscall, sys_io_setup, sys_io_destroy
802+ .word sys_timer_delete, sys_timer_create, sys_vserver, sys_io_setup, sys_io_destroy
803 /*270*/ .word sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink
804 .word sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid
805 /*280*/ .word sys_tee, sys_add_key, sys_request_key, sys_keyctl, sys_openat
4744a4b1
AM
806diff -NurpP --minimal linux-2.6.35.4/arch/um/include/asm/tlb.h linux-2.6.35.4-vs2.3.0.36.32/arch/um/include/asm/tlb.h
807--- linux-2.6.35.4/arch/um/include/asm/tlb.h 2009-09-10 15:25:46.000000000 +0200
808+++ linux-2.6.35.4-vs2.3.0.36.32/arch/um/include/asm/tlb.h 2010-08-02 17:05:05.000000000 +0200
e03b8c3c
AM
809@@ -3,6 +3,7 @@
810
811 #include <linux/pagemap.h>
812 #include <linux/swap.h>
813+#include <linux/vs_memory.h>
814 #include <asm/percpu.h>
815 #include <asm/pgalloc.h>
816 #include <asm/tlbflush.h>
4744a4b1
AM
817diff -NurpP --minimal linux-2.6.35.4/arch/um/include/shared/kern_constants.h linux-2.6.35.4-vs2.3.0.36.32/arch/um/include/shared/kern_constants.h
818--- linux-2.6.35.4/arch/um/include/shared/kern_constants.h 1970-01-01 01:00:00.000000000 +0100
819+++ linux-2.6.35.4-vs2.3.0.36.32/arch/um/include/shared/kern_constants.h 2010-08-02 17:05:05.000000000 +0200
e03b8c3c
AM
820@@ -0,0 +1 @@
821+#include "../../../../include/generated/asm-offsets.h"
4744a4b1
AM
822diff -NurpP --minimal linux-2.6.35.4/arch/um/include/shared/user_constants.h linux-2.6.35.4-vs2.3.0.36.32/arch/um/include/shared/user_constants.h
823--- linux-2.6.35.4/arch/um/include/shared/user_constants.h 1970-01-01 01:00:00.000000000 +0100
824+++ linux-2.6.35.4-vs2.3.0.36.32/arch/um/include/shared/user_constants.h 2010-08-02 17:05:05.000000000 +0200
e03b8c3c
AM
825@@ -0,0 +1,40 @@
826+/*
827+ * DO NOT MODIFY.
828+ *
829+ * This file was generated by arch/um/Makefile
830+ *
831+ */
832+
833+#define HOST_SC_CR2 176 /* offsetof(struct sigcontext, cr2) # */
834+#define HOST_SC_ERR 152 /* offsetof(struct sigcontext, err) # */
835+#define HOST_SC_TRAPNO 160 /* offsetof(struct sigcontext, trapno) # */
836+#define HOST_FP_SIZE 64 /* sizeof(struct _fpstate) / sizeof(unsigned long) # */
837+#define HOST_RBX 5 /* RBX # */
838+#define HOST_RCX 11 /* RCX # */
839+#define HOST_RDI 14 /* RDI # */
840+#define HOST_RSI 13 /* RSI # */
841+#define HOST_RDX 12 /* RDX # */
842+#define HOST_RBP 4 /* RBP # */
843+#define HOST_RAX 10 /* RAX # */
844+#define HOST_R8 9 /* R8 # */
845+#define HOST_R9 8 /* R9 # */
846+#define HOST_R10 7 /* R10 # */
847+#define HOST_R11 6 /* R11 # */
848+#define HOST_R12 3 /* R12 # */
849+#define HOST_R13 2 /* R13 # */
850+#define HOST_R14 1 /* R14 # */
851+#define HOST_R15 0 /* R15 # */
852+#define HOST_ORIG_RAX 15 /* ORIG_RAX # */
853+#define HOST_CS 17 /* CS # */
854+#define HOST_SS 20 /* SS # */
855+#define HOST_EFLAGS 18 /* EFLAGS # */
856+#define HOST_IP 16 /* RIP # */
857+#define HOST_SP 19 /* RSP # */
858+#define UM_FRAME_SIZE 216 /* sizeof(struct user_regs_struct) # */
859+#define UM_POLLIN 1 /* POLLIN # */
860+#define UM_POLLPRI 2 /* POLLPRI # */
861+#define UM_POLLOUT 4 /* POLLOUT # */
862+#define UM_PROT_READ 1 /* PROT_READ # */
863+#define UM_PROT_WRITE 2 /* PROT_WRITE # */
864+#define UM_PROT_EXEC 4 /* PROT_EXEC # */
865+
4744a4b1
AM
866diff -NurpP --minimal linux-2.6.35.4/arch/um/Kconfig.rest linux-2.6.35.4-vs2.3.0.36.32/arch/um/Kconfig.rest
867--- linux-2.6.35.4/arch/um/Kconfig.rest 2009-06-11 17:12:19.000000000 +0200
868+++ linux-2.6.35.4-vs2.3.0.36.32/arch/um/Kconfig.rest 2010-08-02 17:05:05.000000000 +0200
e03b8c3c
AM
869@@ -18,6 +18,8 @@ source "drivers/connector/Kconfig"
870
871 source "fs/Kconfig"
872
873+source "kernel/vserver/Kconfig"
874+
875 source "security/Kconfig"
876
877 source "crypto/Kconfig"
4744a4b1
AM
878diff -NurpP --minimal linux-2.6.35.4/arch/x86/ia32/ia32entry.S linux-2.6.35.4-vs2.3.0.36.32/arch/x86/ia32/ia32entry.S
879--- linux-2.6.35.4/arch/x86/ia32/ia32entry.S 2010-07-07 18:31:11.000000000 +0200
880+++ linux-2.6.35.4-vs2.3.0.36.32/arch/x86/ia32/ia32entry.S 2010-08-02 17:05:05.000000000 +0200
1d9ef1d9 881@@ -777,7 +777,7 @@ ia32_sys_call_table:
2380c486
JR
882 .quad sys_tgkill /* 270 */
883 .quad compat_sys_utimes
884 .quad sys32_fadvise64_64
885- .quad quiet_ni_syscall /* sys_vserver */
886+ .quad sys32_vserver
887 .quad sys_mbind
888 .quad compat_sys_get_mempolicy /* 275 */
889 .quad sys_set_mempolicy
4744a4b1
AM
890diff -NurpP --minimal linux-2.6.35.4/arch/x86/include/asm/unistd_64.h linux-2.6.35.4-vs2.3.0.36.32/arch/x86/include/asm/unistd_64.h
891--- linux-2.6.35.4/arch/x86/include/asm/unistd_64.h 2010-07-07 18:31:11.000000000 +0200
892+++ linux-2.6.35.4-vs2.3.0.36.32/arch/x86/include/asm/unistd_64.h 2010-08-02 17:05:05.000000000 +0200
ec22aa5c
AM
893@@ -535,7 +535,7 @@ __SYSCALL(__NR_tgkill, sys_tgkill)
894 #define __NR_utimes 235
895 __SYSCALL(__NR_utimes, sys_utimes)
896 #define __NR_vserver 236
897-__SYSCALL(__NR_vserver, sys_ni_syscall)
898+__SYSCALL(__NR_vserver, sys_vserver)
899 #define __NR_mbind 237
900 __SYSCALL(__NR_mbind, sys_mbind)
901 #define __NR_set_mempolicy 238
4744a4b1
AM
902diff -NurpP --minimal linux-2.6.35.4/arch/x86/Kconfig linux-2.6.35.4-vs2.3.0.36.32/arch/x86/Kconfig
903--- linux-2.6.35.4/arch/x86/Kconfig 2010-09-05 01:41:56.000000000 +0200
904+++ linux-2.6.35.4-vs2.3.0.36.32/arch/x86/Kconfig 2010-09-06 02:59:52.000000000 +0200
905@@ -2128,6 +2128,8 @@ source "fs/Kconfig"
d337f35e 906
2380c486 907 source "arch/x86/Kconfig.debug"
d337f35e
JR
908
909+source "kernel/vserver/Kconfig"
910+
911 source "security/Kconfig"
912
913 source "crypto/Kconfig"
4744a4b1
AM
914diff -NurpP --minimal linux-2.6.35.4/arch/x86/kernel/syscall_table_32.S linux-2.6.35.4-vs2.3.0.36.32/arch/x86/kernel/syscall_table_32.S
915--- linux-2.6.35.4/arch/x86/kernel/syscall_table_32.S 2010-07-07 18:31:12.000000000 +0200
916+++ linux-2.6.35.4-vs2.3.0.36.32/arch/x86/kernel/syscall_table_32.S 2010-08-02 17:05:05.000000000 +0200
2380c486
JR
917@@ -272,7 +272,7 @@ ENTRY(sys_call_table)
918 .long sys_tgkill /* 270 */
919 .long sys_utimes
920 .long sys_fadvise64_64
921- .long sys_ni_syscall /* sys_vserver */
922+ .long sys_vserver
923 .long sys_mbind
924 .long sys_get_mempolicy
925 .long sys_set_mempolicy
4744a4b1
AM
926diff -NurpP --minimal linux-2.6.35.4/Documentation/vserver/debug.txt linux-2.6.35.4-vs2.3.0.36.32/Documentation/vserver/debug.txt
927--- linux-2.6.35.4/Documentation/vserver/debug.txt 1970-01-01 01:00:00.000000000 +0100
928+++ linux-2.6.35.4-vs2.3.0.36.32/Documentation/vserver/debug.txt 2010-08-02 17:05:05.000000000 +0200
2380c486 929@@ -0,0 +1,154 @@
d337f35e 930+
2380c486 931+debug_cvirt:
d337f35e 932+
2380c486
JR
933+ 2 4 "vx_map_tgid: %p/%llx: %d -> %d"
934+ "vx_rmap_tgid: %p/%llx: %d -> %d"
d337f35e 935+
2380c486 936+debug_dlim:
d337f35e 937+
2380c486
JR
938+ 0 1 "ALLOC (%p,#%d)%c inode (%d)"
939+ "FREE (%p,#%d)%c inode"
940+ 1 2 "ALLOC (%p,#%d)%c %lld bytes (%d)"
941+ "FREE (%p,#%d)%c %lld bytes"
942+ 2 4 "ADJUST: %lld,%lld on %ld,%ld [mult=%d]"
943+ 3 8 "ext3_has_free_blocks(%p): %lu<%lu+1, %c, %u!=%u r=%d"
944+ "ext3_has_free_blocks(%p): free=%lu, root=%lu"
945+ "rcu_free_dl_info(%p)"
946+ 4 10 "alloc_dl_info(%p,%d) = %p"
947+ "dealloc_dl_info(%p)"
948+ "get_dl_info(%p[#%d.%d])"
949+ "put_dl_info(%p[#%d.%d])"
950+ 5 20 "alloc_dl_info(%p,%d)*"
951+ 6 40 "__hash_dl_info: %p[#%d]"
952+ "__unhash_dl_info: %p[#%d]"
953+ 7 80 "locate_dl_info(%p,#%d) = %p"
954+
955+debug_misc:
956+
957+ 0 1 "destroy_dqhash: %p [#0x%08x] c=%d"
958+ "new_dqhash: %p [#0x%08x]"
959+ "vroot[%d]_clr_dev: dev=%p[%lu,%d:%d]"
960+ "vroot[%d]_get_real_bdev: dev=%p[%lu,%d:%d]"
961+ "vroot[%d]_set_dev: dev=%p[%lu,%d:%d]"
962+ "vroot_get_real_bdev not set"
963