-diff -NurpP --minimal linux-2.6.22.10/Documentation/vserver/debug.txt linux-2.6.22.10-vs2.3.0.29/Documentation/vserver/debug.txt
---- linux-2.6.22.10/Documentation/vserver/debug.txt 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/Documentation/vserver/debug.txt 2007-08-05 20:53:12 +0200
-@@ -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.22.10/Makefile linux-2.6.22.10-vs2.3.0.29/Makefile
---- linux-2.6.22.10/Makefile 2007-10-30 01:57:11 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/Makefile 2007-10-30 02:41:27 +0100
-@@ -1,7 +1,7 @@
- VERSION = 2
- PATCHLEVEL = 6
- SUBLEVEL = 22
--EXTRAVERSION = .14
-+EXTRAVERSION = .14-vs2.3.0.29
- NAME = Holy Dancing Manatees, Batman!
-
- # *DOCUMENTATION*
-diff -NurpP --minimal linux-2.6.22.10/arch/alpha/Kconfig linux-2.6.22.10-vs2.3.0.29/arch/alpha/Kconfig
---- linux-2.6.22.10/arch/alpha/Kconfig 2007-07-09 13:17:31 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/alpha/Kconfig 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/alpha/Kconfig linux-2.6.22.18-vs2.3.0.32/arch/alpha/Kconfig
+--- linux-2.6.22.18/arch/alpha/Kconfig 2007-07-21 23:59:44.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/alpha/Kconfig 2008-02-11 12:35:31.000000000 +0100
@@ -662,6 +662,8 @@ config DUMMY_CONSOLE
depends on VGA_HOSE
default y
source "security/Kconfig"
source "crypto/Kconfig"
-diff -NurpP --minimal linux-2.6.22.10/arch/alpha/kernel/asm-offsets.c linux-2.6.22.10-vs2.3.0.29/arch/alpha/kernel/asm-offsets.c
---- linux-2.6.22.10/arch/alpha/kernel/asm-offsets.c 2006-02-15 13:54:10 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/arch/alpha/kernel/asm-offsets.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/alpha/kernel/asm-offsets.c linux-2.6.22.18-vs2.3.0.32/arch/alpha/kernel/asm-offsets.c
+--- linux-2.6.22.18/arch/alpha/kernel/asm-offsets.c 2006-06-18 03:49:35.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/alpha/kernel/asm-offsets.c 2008-02-11 12:35:31.000000000 +0100
@@ -36,6 +36,7 @@ void foo(void)
DEFINE(PT_PTRACED, PT_PTRACED);
DEFINE(CLONE_VM, CLONE_VM);
DEFINE(SIGCHLD, SIGCHLD);
BLANK();
-diff -NurpP --minimal linux-2.6.22.10/arch/alpha/kernel/entry.S linux-2.6.22.10-vs2.3.0.29/arch/alpha/kernel/entry.S
---- linux-2.6.22.10/arch/alpha/kernel/entry.S 2007-07-09 13:17:31 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/alpha/kernel/entry.S 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/alpha/kernel/entry.S linux-2.6.22.18-vs2.3.0.32/arch/alpha/kernel/entry.S
+--- linux-2.6.22.18/arch/alpha/kernel/entry.S 2007-07-21 23:59:44.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/alpha/kernel/entry.S 2008-02-11 12:35:31.000000000 +0100
@@ -643,7 +643,7 @@ kernel_thread:
stq $2, 152($sp) /* HAE */
ret
.end sys_getxpid
-diff -NurpP --minimal linux-2.6.22.10/arch/alpha/kernel/osf_sys.c linux-2.6.22.10-vs2.3.0.29/arch/alpha/kernel/osf_sys.c
---- linux-2.6.22.10/arch/alpha/kernel/osf_sys.c 2007-07-09 13:17:31 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/alpha/kernel/osf_sys.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/alpha/kernel/osf_sys.c linux-2.6.22.18-vs2.3.0.32/arch/alpha/kernel/osf_sys.c
+--- linux-2.6.22.18/arch/alpha/kernel/osf_sys.c 2007-07-21 23:59:44.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/alpha/kernel/osf_sys.c 2008-02-11 12:35:31.000000000 +0100
@@ -883,7 +883,7 @@ osf_gettimeofday(struct timeval32 __user
{
if (tv) {
if (put_tv32(tv, &ktv))
return -EFAULT;
}
-diff -NurpP --minimal linux-2.6.22.10/arch/alpha/kernel/ptrace.c linux-2.6.22.10-vs2.3.0.29/arch/alpha/kernel/ptrace.c
---- linux-2.6.22.10/arch/alpha/kernel/ptrace.c 2006-04-09 13:49:39 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/alpha/kernel/ptrace.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/alpha/kernel/ptrace.c linux-2.6.22.18-vs2.3.0.32/arch/alpha/kernel/ptrace.c
+--- linux-2.6.22.18/arch/alpha/kernel/ptrace.c 2006-06-18 03:49:35.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/alpha/kernel/ptrace.c 2008-02-11 12:35:31.000000000 +0100
@@ -15,6 +15,7 @@
#include <linux/slab.h>
#include <linux/security.h>
if (request == PTRACE_ATTACH) {
ret = ptrace_attach(child);
goto out;
-diff -NurpP --minimal linux-2.6.22.10/arch/alpha/kernel/semaphore.c linux-2.6.22.10-vs2.3.0.29/arch/alpha/kernel/semaphore.c
---- linux-2.6.22.10/arch/alpha/kernel/semaphore.c 2004-08-14 12:55:32 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/alpha/kernel/semaphore.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/alpha/kernel/semaphore.c linux-2.6.22.18-vs2.3.0.32/arch/alpha/kernel/semaphore.c
+--- linux-2.6.22.18/arch/alpha/kernel/semaphore.c 2006-06-18 03:49:35.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/alpha/kernel/semaphore.c 2008-02-11 12:35:31.000000000 +0100
@@ -68,8 +68,8 @@ __down_failed(struct semaphore *sem)
DECLARE_WAITQUEUE(wait, tsk);
#endif
tsk->state = TASK_INTERRUPTIBLE;
-diff -NurpP --minimal linux-2.6.22.10/arch/alpha/kernel/systbls.S linux-2.6.22.10-vs2.3.0.29/arch/alpha/kernel/systbls.S
---- linux-2.6.22.10/arch/alpha/kernel/systbls.S 2007-07-09 13:17:31 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/alpha/kernel/systbls.S 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/alpha/kernel/systbls.S linux-2.6.22.18-vs2.3.0.32/arch/alpha/kernel/systbls.S
+--- linux-2.6.22.18/arch/alpha/kernel/systbls.S 2007-07-21 23:59:44.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/alpha/kernel/systbls.S 2008-02-11 12:35:31.000000000 +0100
@@ -446,7 +446,7 @@ sys_call_table:
.quad sys_stat64 /* 425 */
.quad sys_lstat64
.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.22.10/arch/alpha/kernel/traps.c linux-2.6.22.10-vs2.3.0.29/arch/alpha/kernel/traps.c
---- linux-2.6.22.10/arch/alpha/kernel/traps.c 2006-09-20 16:57:57 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/alpha/kernel/traps.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/alpha/kernel/traps.c linux-2.6.22.18-vs2.3.0.32/arch/alpha/kernel/traps.c
+--- linux-2.6.22.18/arch/alpha/kernel/traps.c 2007-05-04 15:55:03.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/alpha/kernel/traps.c 2008-02-11 12:35:31.000000000 +0100
@@ -182,7 +182,8 @@ die_if_kernel(char * str, struct pt_regs
#ifdef CONFIG_SMP
printk("CPU %d ", hard_smp_processor_id());
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.22.10/arch/alpha/mm/fault.c linux-2.6.22.10-vs2.3.0.29/arch/alpha/mm/fault.c
---- linux-2.6.22.10/arch/alpha/mm/fault.c 2007-07-09 13:17:32 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/alpha/mm/fault.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/alpha/mm/fault.c linux-2.6.22.18-vs2.3.0.32/arch/alpha/mm/fault.c
+--- linux-2.6.22.18/arch/alpha/mm/fault.c 2007-07-21 23:59:44.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/alpha/mm/fault.c 2008-02-11 12:35:31.000000000 +0100
@@ -197,8 +197,8 @@ do_page_fault(unsigned long address, uns
down_read(&mm->mmap_sem);
goto survive;
if (!user_mode(regs))
goto no_context;
do_exit(SIGKILL);
-diff -NurpP --minimal linux-2.6.22.10/arch/arm/Kconfig linux-2.6.22.10-vs2.3.0.29/arch/arm/Kconfig
---- linux-2.6.22.10/arch/arm/Kconfig 2007-07-09 13:17:32 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/arm/Kconfig 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/arm/Kconfig linux-2.6.22.18-vs2.3.0.32/arch/arm/Kconfig
+--- linux-2.6.22.18/arch/arm/Kconfig 2007-07-21 23:59:44.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/arm/Kconfig 2008-02-11 12:35:31.000000000 +0100
@@ -1042,6 +1042,8 @@ source "arch/arm/oprofile/Kconfig"
source "arch/arm/Kconfig.debug"
source "security/Kconfig"
source "crypto/Kconfig"
-diff -NurpP --minimal linux-2.6.22.10/arch/arm/kernel/calls.S linux-2.6.22.10-vs2.3.0.29/arch/arm/kernel/calls.S
---- linux-2.6.22.10/arch/arm/kernel/calls.S 2007-07-09 13:17:32 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/arm/kernel/calls.S 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/arm/kernel/calls.S linux-2.6.22.18-vs2.3.0.32/arch/arm/kernel/calls.S
+--- linux-2.6.22.18/arch/arm/kernel/calls.S 2007-07-21 23:59:44.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/arm/kernel/calls.S 2008-02-11 12:35:31.000000000 +0100
@@ -322,7 +322,7 @@
/* 310 */ CALL(sys_request_key)
CALL(sys_keyctl)
CALL(sys_ioprio_set)
/* 315 */ CALL(sys_ioprio_get)
CALL(sys_inotify_init)
-diff -NurpP --minimal linux-2.6.22.10/arch/arm/kernel/process.c linux-2.6.22.10-vs2.3.0.29/arch/arm/kernel/process.c
---- linux-2.6.22.10/arch/arm/kernel/process.c 2007-07-09 13:17:32 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/arm/kernel/process.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/arm/kernel/process.c linux-2.6.22.18-vs2.3.0.32/arch/arm/kernel/process.c
+--- linux-2.6.22.18/arch/arm/kernel/process.c 2007-07-21 23:59:44.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/arm/kernel/process.c 2008-02-11 12:35:31.000000000 +0100
@@ -261,7 +261,8 @@ void __show_regs(struct pt_regs *regs)
void show_regs(struct pt_regs * regs)
{
}
EXPORT_SYMBOL(kernel_thread);
-diff -NurpP --minimal linux-2.6.22.10/arch/arm/kernel/traps.c linux-2.6.22.10-vs2.3.0.29/arch/arm/kernel/traps.c
---- linux-2.6.22.10/arch/arm/kernel/traps.c 2007-07-09 13:17:32 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/arm/kernel/traps.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/arm/kernel/traps.c linux-2.6.22.18-vs2.3.0.32/arch/arm/kernel/traps.c
+--- linux-2.6.22.18/arch/arm/kernel/traps.c 2007-07-21 23:59:44.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/arm/kernel/traps.c 2008-02-11 12:35:31.000000000 +0100
@@ -222,8 +222,8 @@ static void __die(const char *str, int e
str, err, ++die_counter);
print_modules();
if (!user_mode(regs) || in_interrupt()) {
dump_mem("Stack: ", regs->ARM_sp,
-diff -NurpP --minimal linux-2.6.22.10/arch/arm/mm/fault.c linux-2.6.22.10-vs2.3.0.29/arch/arm/mm/fault.c
---- linux-2.6.22.10/arch/arm/mm/fault.c 2007-07-09 13:17:39 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/arm/mm/fault.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/arm/mm/fault.c linux-2.6.22.18-vs2.3.0.32/arch/arm/mm/fault.c
+--- linux-2.6.22.18/arch/arm/mm/fault.c 2007-07-21 23:59:44.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/arm/mm/fault.c 2008-02-11 12:35:31.000000000 +0100
@@ -266,7 +266,8 @@ do_page_fault(unsigned long addr, unsign
* happened to us that made us unable to handle
* the page fault gracefully.
do_exit(SIGKILL);
return 0;
-diff -NurpP --minimal linux-2.6.22.10/arch/arm26/Kconfig linux-2.6.22.10-vs2.3.0.29/arch/arm26/Kconfig
---- linux-2.6.22.10/arch/arm26/Kconfig 2007-07-09 13:17:40 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/arm26/Kconfig 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/arm26/Kconfig linux-2.6.22.18-vs2.3.0.32/arch/arm26/Kconfig
+--- linux-2.6.22.18/arch/arm26/Kconfig 2007-07-21 23:59:44.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/arm26/Kconfig 2008-02-11 12:35:31.000000000 +0100
@@ -243,6 +243,8 @@ source "drivers/usb/Kconfig"
source "arch/arm26/Kconfig.debug"
source "security/Kconfig"
source "crypto/Kconfig"
-diff -NurpP --minimal linux-2.6.22.10/arch/arm26/kernel/calls.S linux-2.6.22.10-vs2.3.0.29/arch/arm26/kernel/calls.S
---- linux-2.6.22.10/arch/arm26/kernel/calls.S 2005-03-02 12:38:19 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/arch/arm26/kernel/calls.S 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/arm26/kernel/calls.S linux-2.6.22.18-vs2.3.0.32/arch/arm26/kernel/calls.S
+--- linux-2.6.22.18/arch/arm26/kernel/calls.S 2006-06-18 03:49:35.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/arm26/kernel/calls.S 2008-02-11 12:35:31.000000000 +0100
@@ -257,6 +257,11 @@ __syscall_start:
.long sys_lremovexattr
.long sys_fremovexattr
__syscall_end:
.rept NR_syscalls - (__syscall_end - __syscall_start) / 4
-diff -NurpP --minimal linux-2.6.22.10/arch/arm26/kernel/process.c linux-2.6.22.10-vs2.3.0.29/arch/arm26/kernel/process.c
---- linux-2.6.22.10/arch/arm26/kernel/process.c 2006-09-20 16:57:57 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/arm26/kernel/process.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/arm26/kernel/process.c linux-2.6.22.18-vs2.3.0.32/arch/arm26/kernel/process.c
+--- linux-2.6.22.18/arch/arm26/kernel/process.c 2007-05-04 15:55:07.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/arm26/kernel/process.c 2008-02-11 12:35:31.000000000 +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;
}
EXPORT_SYMBOL(kernel_thread);
-diff -NurpP --minimal linux-2.6.22.10/arch/arm26/kernel/traps.c linux-2.6.22.10-vs2.3.0.29/arch/arm26/kernel/traps.c
---- linux-2.6.22.10/arch/arm26/kernel/traps.c 2006-09-20 16:57:57 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/arm26/kernel/traps.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/arm26/kernel/traps.c linux-2.6.22.18-vs2.3.0.32/arch/arm26/kernel/traps.c
+--- linux-2.6.22.18/arch/arm26/kernel/traps.c 2007-05-04 15:55:07.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/arm26/kernel/traps.c 2008-02-11 12:35:31.000000000 +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());
if (!user_mode(regs) || in_interrupt()) {
__dump_stack(tsk, (unsigned long)(regs + 1));
-diff -NurpP --minimal linux-2.6.22.10/arch/cris/Kconfig linux-2.6.22.10-vs2.3.0.29/arch/cris/Kconfig
---- linux-2.6.22.10/arch/cris/Kconfig 2007-05-02 19:24:19 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/cris/Kconfig 2007-08-05 20:53:12 +0200
-@@ -200,6 +200,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.22.10/arch/cris/arch-v10/kernel/process.c linux-2.6.22.10-vs2.3.0.29/arch/cris/arch-v10/kernel/process.c
---- linux-2.6.22.10/arch/cris/arch-v10/kernel/process.c 2006-09-20 16:57:57 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/cris/arch-v10/kernel/process.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/cris/arch-v10/kernel/process.c linux-2.6.22.18-vs2.3.0.32/arch/cris/arch-v10/kernel/process.c
+--- linux-2.6.22.18/arch/cris/arch-v10/kernel/process.c 2007-05-04 15:55:07.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/cris/arch-v10/kernel/process.c 2008-02-11 12:35:31.000000000 +0100
@@ -103,7 +103,8 @@ int kernel_thread(int (*fn)(void *), voi
regs.dccr = 1 << I_DCCR_BITNR;
}
/* setup the child's kernel stack with a pt_regs and switch_stack on it.
-diff -NurpP --minimal linux-2.6.22.10/arch/cris/arch-v32/kernel/process.c linux-2.6.22.10-vs2.3.0.29/arch/cris/arch-v32/kernel/process.c
---- linux-2.6.22.10/arch/cris/arch-v32/kernel/process.c 2006-09-20 16:57:57 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/cris/arch-v32/kernel/process.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/cris/arch-v32/kernel/process.c linux-2.6.22.18-vs2.3.0.32/arch/cris/arch-v32/kernel/process.c
+--- linux-2.6.22.18/arch/cris/arch-v32/kernel/process.c 2007-05-04 15:55:07.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/cris/arch-v32/kernel/process.c 2008-02-11 12:35:31.000000000 +0100
@@ -120,7 +120,8 @@ kernel_thread(int (*fn)(void *), void *
regs.ccs = 1 << (I_CCS_BITNR + CCS_SHIFT);
}
/*
-diff -NurpP --minimal linux-2.6.22.10/arch/frv/kernel/kernel_thread.S linux-2.6.22.10-vs2.3.0.29/arch/frv/kernel/kernel_thread.S
---- linux-2.6.22.10/arch/frv/kernel/kernel_thread.S 2005-03-02 12:38:20 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/arch/frv/kernel/kernel_thread.S 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/cris/Kconfig linux-2.6.22.18-vs2.3.0.32/arch/cris/Kconfig
+--- linux-2.6.22.18/arch/cris/Kconfig 2007-07-21 23:58:14.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/cris/Kconfig 2008-02-11 12:35:31.000000000 +0100
+@@ -200,6 +200,8 @@ source "drivers/usb/Kconfig"
+
+ source "arch/cris/Kconfig.debug"
+
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+
+ source "crypto/Kconfig"
+diff -Nurp linux-2.6.22.18/arch/frv/kernel/kernel_thread.S linux-2.6.22.18-vs2.3.0.32/arch/frv/kernel/kernel_thread.S
+--- linux-2.6.22.18/arch/frv/kernel/kernel_thread.S 2006-06-18 03:49:35.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/frv/kernel/kernel_thread.S 2008-02-11 12:35:31.000000000 +0100
@@ -13,6 +13,8 @@
#include <asm/unistd.h>
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.22.10/arch/h8300/Kconfig linux-2.6.22.10-vs2.3.0.29/arch/h8300/Kconfig
---- linux-2.6.22.10/arch/h8300/Kconfig 2007-07-09 13:17:41 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/h8300/Kconfig 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/h8300/Kconfig linux-2.6.22.18-vs2.3.0.32/arch/h8300/Kconfig
+--- linux-2.6.22.18/arch/h8300/Kconfig 2007-07-21 23:59:44.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/h8300/Kconfig 2008-02-11 12:35:32.000000000 +0100
@@ -222,6 +222,8 @@ source "fs/Kconfig"
source "arch/h8300/Kconfig.debug"
source "security/Kconfig"
source "crypto/Kconfig"
-diff -NurpP --minimal linux-2.6.22.10/arch/h8300/kernel/process.c linux-2.6.22.10-vs2.3.0.29/arch/h8300/kernel/process.c
---- linux-2.6.22.10/arch/h8300/kernel/process.c 2006-09-20 16:57:58 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/h8300/kernel/process.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/h8300/kernel/process.c linux-2.6.22.18-vs2.3.0.32/arch/h8300/kernel/process.c
+--- linux-2.6.22.18/arch/h8300/kernel/process.c 2007-05-04 15:55:07.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/h8300/kernel/process.c 2008-02-11 12:35:32.000000000 +0100
@@ -134,7 +134,7 @@ int kernel_thread(int (*fn)(void *), voi
fs = get_fs();
__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.22.10/arch/i386/Kconfig linux-2.6.22.10-vs2.3.0.29/arch/i386/Kconfig
---- linux-2.6.22.10/arch/i386/Kconfig 2007-07-09 13:17:41 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/i386/Kconfig 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/i386/Kconfig linux-2.6.22.18-vs2.3.0.32/arch/i386/Kconfig
+--- linux-2.6.22.18/arch/i386/Kconfig 2007-07-21 23:59:44.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/i386/Kconfig 2008-02-11 12:35:32.000000000 +0100
@@ -1230,6 +1230,8 @@ endmenu
source "arch/i386/Kconfig.debug"
source "security/Kconfig"
source "crypto/Kconfig"
-diff -NurpP --minimal linux-2.6.22.10/arch/i386/kernel/process.c linux-2.6.22.10-vs2.3.0.29/arch/i386/kernel/process.c
---- linux-2.6.22.10/arch/i386/kernel/process.c 2007-07-09 13:17:42 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/i386/kernel/process.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/i386/kernel/process.c linux-2.6.22.18-vs2.3.0.32/arch/i386/kernel/process.c
+--- linux-2.6.22.18/arch/i386/kernel/process.c 2007-07-21 23:59:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/i386/kernel/process.c 2008-02-11 12:35:32.000000000 +0100
@@ -302,8 +302,10 @@ void show_regs(struct pt_regs * regs)
unsigned long cr0 = 0L, cr2 = 0L, cr3 = 0L, cr4 = 0L;
}
EXPORT_SYMBOL(kernel_thread);
-diff -NurpP --minimal linux-2.6.22.10/arch/i386/kernel/syscall_table.S linux-2.6.22.10-vs2.3.0.29/arch/i386/kernel/syscall_table.S
---- linux-2.6.22.10/arch/i386/kernel/syscall_table.S 2007-07-09 13:17:42 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/i386/kernel/syscall_table.S 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/i386/kernel/syscall_table.S linux-2.6.22.18-vs2.3.0.32/arch/i386/kernel/syscall_table.S
+--- linux-2.6.22.18/arch/i386/kernel/syscall_table.S 2007-07-21 23:59:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/i386/kernel/syscall_table.S 2008-02-11 12:35:32.000000000 +0100
@@ -272,7 +272,7 @@ ENTRY(sys_call_table)
.long sys_tgkill /* 270 */
.long sys_utimes
.long sys_mbind
.long sys_get_mempolicy
.long sys_set_mempolicy
-diff -NurpP --minimal linux-2.6.22.10/arch/i386/kernel/sysenter.c linux-2.6.22.10-vs2.3.0.29/arch/i386/kernel/sysenter.c
---- linux-2.6.22.10/arch/i386/kernel/sysenter.c 2007-10-30 01:57:12 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/arch/i386/kernel/sysenter.c 2007-09-05 03:06:10 +0200
+diff -Nurp linux-2.6.22.18/arch/i386/kernel/sysenter.c linux-2.6.22.18-vs2.3.0.32/arch/i386/kernel/sysenter.c
+--- linux-2.6.22.18/arch/i386/kernel/sysenter.c 2007-08-26 03:38:36.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/i386/kernel/sysenter.c 2008-02-11 12:35:32.000000000 +0100
@@ -17,6 +17,7 @@
#include <linux/elf.h>
#include <linux/mm.h>
#include <asm/cpufeature.h>
#include <asm/msr.h>
-diff -NurpP --minimal linux-2.6.22.10/arch/i386/kernel/traps.c linux-2.6.22.10-vs2.3.0.29/arch/i386/kernel/traps.c
---- linux-2.6.22.10/arch/i386/kernel/traps.c 2007-07-09 13:17:42 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/i386/kernel/traps.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/i386/kernel/traps.c linux-2.6.22.18-vs2.3.0.32/arch/i386/kernel/traps.c
+--- linux-2.6.22.18/arch/i386/kernel/traps.c 2007-07-21 23:59:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/i386/kernel/traps.c 2008-02-11 12:35:32.000000000 +0100
@@ -56,6 +56,8 @@
#include <asm/stacktrace.h>
/* Executive summary in case the oops scrolled away */
esp = (unsigned long) (®s->esp);
savesegment(ss, ss);
-diff -NurpP --minimal linux-2.6.22.10/arch/i386/mm/fault.c linux-2.6.22.10-vs2.3.0.29/arch/i386/mm/fault.c
---- linux-2.6.22.10/arch/i386/mm/fault.c 2007-10-30 01:57:12 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/arch/i386/mm/fault.c 2007-09-05 03:06:10 +0200
+diff -Nurp linux-2.6.22.18/arch/i386/mm/fault.c linux-2.6.22.18-vs2.3.0.32/arch/i386/mm/fault.c
+--- linux-2.6.22.18/arch/i386/mm/fault.c 2007-09-05 07:07:59.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/i386/mm/fault.c 2008-02-11 12:35:32.000000000 +0100
@@ -587,7 +587,8 @@ out_of_memory:
down_read(&mm->mmap_sem);
goto survive;
if (error_code & 4)
do_exit(SIGKILL);
goto no_context;
-diff -NurpP --minimal linux-2.6.22.10/arch/ia64/Kconfig linux-2.6.22.10-vs2.3.0.29/arch/ia64/Kconfig
---- linux-2.6.22.10/arch/ia64/Kconfig 2007-07-09 13:17:43 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/ia64/Kconfig 2007-08-05 20:53:12 +0200
-@@ -592,6 +592,8 @@ endmenu
-
- source "arch/ia64/Kconfig.debug"
-
-+source "kernel/vserver/Kconfig"
-+
- source "security/Kconfig"
-
- source "crypto/Kconfig"
-diff -NurpP --minimal linux-2.6.22.10/arch/ia64/ia32/binfmt_elf32.c linux-2.6.22.10-vs2.3.0.29/arch/ia64/ia32/binfmt_elf32.c
---- linux-2.6.22.10/arch/ia64/ia32/binfmt_elf32.c 2007-05-02 19:24:20 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/ia64/ia32/binfmt_elf32.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/ia64/ia32/binfmt_elf32.c linux-2.6.22.18-vs2.3.0.32/arch/ia64/ia32/binfmt_elf32.c
+--- linux-2.6.22.18/arch/ia64/ia32/binfmt_elf32.c 2007-07-21 23:58:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/ia64/ia32/binfmt_elf32.c 2008-02-11 12:35:32.000000000 +0100
@@ -233,7 +233,8 @@ ia32_setup_arg_pages (struct linux_binpr
kmem_cache_free(vm_area_cachep, mpnt);
return ret;
}
for (i = 0 ; i < MAX_ARG_PAGES ; i++) {
-diff -NurpP --minimal linux-2.6.22.10/arch/ia64/ia32/ia32_entry.S linux-2.6.22.10-vs2.3.0.29/arch/ia64/ia32/ia32_entry.S
---- linux-2.6.22.10/arch/ia64/ia32/ia32_entry.S 2007-07-09 13:17:43 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/ia64/ia32/ia32_entry.S 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/ia64/ia32/ia32_entry.S linux-2.6.22.18-vs2.3.0.32/arch/ia64/ia32/ia32_entry.S
+--- linux-2.6.22.18/arch/ia64/ia32/ia32_entry.S 2007-07-21 23:59:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/ia64/ia32/ia32_entry.S 2008-02-11 12:35:32.000000000 +0100
@@ -446,7 +446,7 @@ ia32_syscall_table:
data8 sys_tgkill /* 270 */
data8 compat_sys_utimes
data8 sys_ni_syscall
data8 sys_ni_syscall /* 275 */
data8 sys_ni_syscall
-diff -NurpP --minimal linux-2.6.22.10/arch/ia64/ia32/sys_ia32.c linux-2.6.22.10-vs2.3.0.29/arch/ia64/ia32/sys_ia32.c
---- linux-2.6.22.10/arch/ia64/ia32/sys_ia32.c 2007-05-02 19:24:20 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/ia64/ia32/sys_ia32.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/ia64/ia32/sys_ia32.c linux-2.6.22.18-vs2.3.0.32/arch/ia64/ia32/sys_ia32.c
+--- linux-2.6.22.18/arch/ia64/ia32/sys_ia32.c 2007-07-21 23:58:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/ia64/ia32/sys_ia32.c 2008-02-11 12:35:32.000000000 +0100
@@ -1182,7 +1182,7 @@ sys32_gettimeofday (struct compat_timeva
{
if (tv) {
if (put_tv32(tv, &ktv))
return -EFAULT;
}
-diff -NurpP --minimal linux-2.6.22.10/arch/ia64/kernel/asm-offsets.c linux-2.6.22.10-vs2.3.0.29/arch/ia64/kernel/asm-offsets.c
---- linux-2.6.22.10/arch/ia64/kernel/asm-offsets.c 2007-05-02 19:24:20 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/ia64/kernel/asm-offsets.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/ia64/Kconfig linux-2.6.22.18-vs2.3.0.32/arch/ia64/Kconfig
+--- linux-2.6.22.18/arch/ia64/Kconfig 2007-07-21 23:59:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/ia64/Kconfig 2008-02-11 12:35:32.000000000 +0100
+@@ -592,6 +592,8 @@ endmenu
+
+ source "arch/ia64/Kconfig.debug"
+
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+
+ source "crypto/Kconfig"
+diff -Nurp linux-2.6.22.18/arch/ia64/kernel/asm-offsets.c linux-2.6.22.18-vs2.3.0.32/arch/ia64/kernel/asm-offsets.c
+--- linux-2.6.22.18/arch/ia64/kernel/asm-offsets.c 2007-07-21 23:58:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/ia64/kernel/asm-offsets.c 2008-02-11 12:35:32.000000000 +0100
@@ -192,6 +192,7 @@ void foo(void)
/* for assembly files which can't include sched.h: */
DEFINE(IA64_CLONE_VFORK, CLONE_VFORK);
BLANK();
DEFINE(IA64_CPUINFO_NSEC_PER_CYC_OFFSET,
-diff -NurpP --minimal linux-2.6.22.10/arch/ia64/kernel/entry.S linux-2.6.22.10-vs2.3.0.29/arch/ia64/kernel/entry.S
---- linux-2.6.22.10/arch/ia64/kernel/entry.S 2007-07-09 13:17:43 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/ia64/kernel/entry.S 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/ia64/kernel/entry.S linux-2.6.22.18-vs2.3.0.32/arch/ia64/kernel/entry.S
+--- linux-2.6.22.18/arch/ia64/kernel/entry.S 2007-07-21 23:59:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/ia64/kernel/entry.S 2008-02-11 12:35:32.000000000 +0100
@@ -1547,7 +1547,7 @@ sys_call_table:
data8 sys_mq_notify
data8 sys_mq_getsetattr
data8 sys_waitid // 1270
data8 sys_add_key
data8 sys_request_key
-diff -NurpP --minimal linux-2.6.22.10/arch/ia64/kernel/perfmon.c linux-2.6.22.10-vs2.3.0.29/arch/ia64/kernel/perfmon.c
---- linux-2.6.22.10/arch/ia64/kernel/perfmon.c 2007-07-09 13:17:43 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/ia64/kernel/perfmon.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/ia64/kernel/perfmon.c linux-2.6.22.18-vs2.3.0.32/arch/ia64/kernel/perfmon.c
+--- linux-2.6.22.18/arch/ia64/kernel/perfmon.c 2007-07-21 23:59:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/ia64/kernel/perfmon.c 2008-02-11 12:35:32.000000000 +0100
@@ -40,6 +40,7 @@
#include <linux/capability.h>
#include <linux/rcupdate.h>
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.22.10/arch/ia64/kernel/process.c linux-2.6.22.10-vs2.3.0.29/arch/ia64/kernel/process.c
---- linux-2.6.22.10/arch/ia64/kernel/process.c 2007-07-09 13:17:43 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/ia64/kernel/process.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/ia64/kernel/process.c linux-2.6.22.18-vs2.3.0.32/arch/ia64/kernel/process.c
+--- linux-2.6.22.18/arch/ia64/kernel/process.c 2007-07-21 23:59:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/ia64/kernel/process.c 2008-02-11 12:35:32.000000000 +0100
@@ -105,7 +105,8 @@ show_regs (struct pt_regs *regs)
unsigned long ip = regs->cr_iip + ia64_psr(regs)->ri;
}
EXPORT_SYMBOL(kernel_thread);
-diff -NurpP --minimal linux-2.6.22.10/arch/ia64/kernel/ptrace.c linux-2.6.22.10-vs2.3.0.29/arch/ia64/kernel/ptrace.c
---- linux-2.6.22.10/arch/ia64/kernel/ptrace.c 2007-05-02 19:24:20 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/ia64/kernel/ptrace.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/ia64/kernel/ptrace.c linux-2.6.22.18-vs2.3.0.32/arch/ia64/kernel/ptrace.c
+--- linux-2.6.22.18/arch/ia64/kernel/ptrace.c 2007-07-21 23:58:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/ia64/kernel/ptrace.c 2008-02-11 12:35:32.000000000 +0100
@@ -17,6 +17,7 @@
#include <linux/security.h>
#include <linux/audit.h>
ret = -EPERM;
if (pid == 1) /* no messing around with init! */
goto out_tsk;
-diff -NurpP --minimal linux-2.6.22.10/arch/ia64/kernel/traps.c linux-2.6.22.10-vs2.3.0.29/arch/ia64/kernel/traps.c
---- linux-2.6.22.10/arch/ia64/kernel/traps.c 2007-07-09 13:17:43 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/ia64/kernel/traps.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/ia64/kernel/traps.c linux-2.6.22.18-vs2.3.0.32/arch/ia64/kernel/traps.c
+--- linux-2.6.22.18/arch/ia64/kernel/traps.c 2007-07-21 23:59:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/ia64/kernel/traps.c 2008-02-11 12:35:32.000000000 +0100
@@ -60,8 +60,9 @@ die (const char *str, struct pt_regs *re
put_cpu();
}
}
}
-diff -NurpP --minimal linux-2.6.22.10/arch/ia64/mm/fault.c linux-2.6.22.10-vs2.3.0.29/arch/ia64/mm/fault.c
---- linux-2.6.22.10/arch/ia64/mm/fault.c 2007-07-09 13:17:43 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/ia64/mm/fault.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/ia64/mm/fault.c linux-2.6.22.18-vs2.3.0.32/arch/ia64/mm/fault.c
+--- linux-2.6.22.18/arch/ia64/mm/fault.c 2007-07-21 23:59:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/ia64/mm/fault.c 2008-02-11 12:35:32.000000000 +0100
@@ -10,6 +10,7 @@
#include <linux/interrupt.h>
#include <linux/kprobes.h>
#include <asm/pgtable.h>
#include <asm/processor.h>
-diff -NurpP --minimal linux-2.6.22.10/arch/m32r/kernel/process.c linux-2.6.22.10-vs2.3.0.29/arch/m32r/kernel/process.c
---- linux-2.6.22.10/arch/m32r/kernel/process.c 2007-05-02 19:24:21 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/m32r/kernel/process.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/m32r/kernel/process.c linux-2.6.22.18-vs2.3.0.32/arch/m32r/kernel/process.c
+--- linux-2.6.22.18/arch/m32r/kernel/process.c 2007-07-21 23:58:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/m32r/kernel/process.c 2008-02-11 12:35:32.000000000 +0100
@@ -211,8 +211,8 @@ int kernel_thread(int (*fn)(void *), voi
regs.psw = M32R_PSW_BIE;
}
/*
-diff -NurpP --minimal linux-2.6.22.10/arch/m32r/kernel/traps.c linux-2.6.22.10-vs2.3.0.29/arch/m32r/kernel/traps.c
---- linux-2.6.22.10/arch/m32r/kernel/traps.c 2006-11-30 21:18:28 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/arch/m32r/kernel/traps.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/m32r/kernel/traps.c linux-2.6.22.18-vs2.3.0.32/arch/m32r/kernel/traps.c
+--- linux-2.6.22.18/arch/m32r/kernel/traps.c 2007-05-04 15:57:13.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/m32r/kernel/traps.c 2008-02-11 12:35:32.000000000 +0100
@@ -195,8 +195,9 @@ static void show_registers(struct pt_reg
} else {
printk("SPI: %08lx\n", sp);
/*
* When in-kernel, we also print out the stack and code at the
-diff -NurpP --minimal linux-2.6.22.10/arch/m68k/Kconfig linux-2.6.22.10-vs2.3.0.29/arch/m68k/Kconfig
---- linux-2.6.22.10/arch/m68k/Kconfig 2007-07-09 13:17:47 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/m68k/Kconfig 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/m68k/Kconfig linux-2.6.22.18-vs2.3.0.32/arch/m68k/Kconfig
+--- linux-2.6.22.18/arch/m68k/Kconfig 2007-07-21 23:59:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/m68k/Kconfig 2008-02-11 12:35:32.000000000 +0100
@@ -678,6 +678,8 @@ source "fs/Kconfig"
source "arch/m68k/Kconfig.debug"
source "security/Kconfig"
source "crypto/Kconfig"
-diff -NurpP --minimal linux-2.6.22.10/arch/m68k/kernel/process.c linux-2.6.22.10-vs2.3.0.29/arch/m68k/kernel/process.c
---- linux-2.6.22.10/arch/m68k/kernel/process.c 2006-11-30 21:18:28 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/arch/m68k/kernel/process.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/m68k/kernel/process.c linux-2.6.22.18-vs2.3.0.32/arch/m68k/kernel/process.c
+--- linux-2.6.22.18/arch/m68k/kernel/process.c 2007-05-04 15:57:14.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/m68k/kernel/process.c 2008-02-11 12:35:32.000000000 +0100
@@ -159,7 +159,8 @@ int kernel_thread(int (*fn)(void *), voi
{
retval = __NR_clone;
__asm__ __volatile__
-diff -NurpP --minimal linux-2.6.22.10/arch/m68k/kernel/ptrace.c linux-2.6.22.10-vs2.3.0.29/arch/m68k/kernel/ptrace.c
---- linux-2.6.22.10/arch/m68k/kernel/ptrace.c 2007-07-09 13:17:47 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/m68k/kernel/ptrace.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/m68k/kernel/ptrace.c linux-2.6.22.18-vs2.3.0.32/arch/m68k/kernel/ptrace.c
+--- linux-2.6.22.18/arch/m68k/kernel/ptrace.c 2007-07-21 23:59:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/m68k/kernel/ptrace.c 2008-02-11 12:35:32.000000000 +0100
@@ -18,6 +18,7 @@
#include <linux/ptrace.h>
#include <linux/user.h>
return ret;
out_eio:
-diff -NurpP --minimal linux-2.6.22.10/arch/m68k/kernel/traps.c linux-2.6.22.10-vs2.3.0.29/arch/m68k/kernel/traps.c
---- linux-2.6.22.10/arch/m68k/kernel/traps.c 2007-05-02 19:24:21 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/m68k/kernel/traps.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/m68k/kernel/traps.c linux-2.6.22.18-vs2.3.0.32/arch/m68k/kernel/traps.c
+--- linux-2.6.22.18/arch/m68k/kernel/traps.c 2007-07-21 23:58:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/m68k/kernel/traps.c 2008-02-11 12:35:32.000000000 +0100
@@ -899,8 +899,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);
addr = (unsigned long)&fp->un;
printk("Frame format=%X ", regs->format);
switch (regs->format) {
-diff -NurpP --minimal linux-2.6.22.10/arch/m68knommu/Kconfig linux-2.6.22.10-vs2.3.0.29/arch/m68knommu/Kconfig
---- linux-2.6.22.10/arch/m68knommu/Kconfig 2007-07-09 13:17:47 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/m68knommu/Kconfig 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/m68knommu/Kconfig linux-2.6.22.18-vs2.3.0.32/arch/m68knommu/Kconfig
+--- linux-2.6.22.18/arch/m68knommu/Kconfig 2007-07-21 23:59:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/m68knommu/Kconfig 2008-02-11 12:35:32.000000000 +0100
@@ -670,6 +670,8 @@ source "fs/Kconfig"
source "arch/m68knommu/Kconfig.debug"
source "security/Kconfig"
source "crypto/Kconfig"
-diff -NurpP --minimal linux-2.6.22.10/arch/m68knommu/kernel/process.c linux-2.6.22.10-vs2.3.0.29/arch/m68knommu/kernel/process.c
---- linux-2.6.22.10/arch/m68knommu/kernel/process.c 2007-02-06 03:00:08 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/arch/m68knommu/kernel/process.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/m68knommu/kernel/process.c linux-2.6.22.18-vs2.3.0.32/arch/m68knommu/kernel/process.c
+--- linux-2.6.22.18/arch/m68knommu/kernel/process.c 2007-05-04 15:58:04.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/m68knommu/kernel/process.c 2008-02-11 12:35:32.000000000 +0100
@@ -122,7 +122,7 @@ void show_regs(struct pt_regs * regs)
int kernel_thread(int (*fn)(void *), void * arg, unsigned long flags)
{
mm_segment_t fs;
fs = get_fs();
-diff -NurpP --minimal linux-2.6.22.10/arch/m68knommu/kernel/traps.c linux-2.6.22.10-vs2.3.0.29/arch/m68knommu/kernel/traps.c
---- linux-2.6.22.10/arch/m68knommu/kernel/traps.c 2007-05-02 19:24:21 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/m68knommu/kernel/traps.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/m68knommu/kernel/traps.c linux-2.6.22.18-vs2.3.0.32/arch/m68knommu/kernel/traps.c
+--- linux-2.6.22.18/arch/m68knommu/kernel/traps.c 2007-07-21 23:58:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/m68knommu/kernel/traps.c 2008-02-11 12:35:32.000000000 +0100
@@ -80,8 +80,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);
show_stack(NULL, (unsigned long *)fp);
do_exit(SIGSEGV);
}
-diff -NurpP --minimal linux-2.6.22.10/arch/mips/Kconfig linux-2.6.22.10-vs2.3.0.29/arch/mips/Kconfig
---- linux-2.6.22.10/arch/mips/Kconfig 2007-07-09 13:17:47 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/mips/Kconfig 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/mips/Kconfig linux-2.6.22.18-vs2.3.0.32/arch/mips/Kconfig
+--- linux-2.6.22.18/arch/mips/Kconfig 2007-07-21 23:59:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/mips/Kconfig 2008-02-11 12:35:32.000000000 +0100
@@ -1959,6 +1959,8 @@ source "arch/mips/oprofile/Kconfig"
source "arch/mips/Kconfig.debug"
source "security/Kconfig"
source "crypto/Kconfig"
-diff -NurpP --minimal linux-2.6.22.10/arch/mips/kernel/linux32.c linux-2.6.22.10-vs2.3.0.29/arch/mips/kernel/linux32.c
---- linux-2.6.22.10/arch/mips/kernel/linux32.c 2007-07-09 13:17:48 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/mips/kernel/linux32.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/mips/kernel/linux32.c linux-2.6.22.18-vs2.3.0.32/arch/mips/kernel/linux32.c
+--- linux-2.6.22.18/arch/mips/kernel/linux32.c 2007-07-21 23:59:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/mips/kernel/linux32.c 2008-02-11 12:35:32.000000000 +0100
@@ -229,7 +229,7 @@ sys32_gettimeofday(struct compat_timeval
{
if (tv) {
if (put_tv32(tv, &ktv))
return -EFAULT;
}
-diff -NurpP --minimal linux-2.6.22.10/arch/mips/kernel/process.c linux-2.6.22.10-vs2.3.0.29/arch/mips/kernel/process.c
---- linux-2.6.22.10/arch/mips/kernel/process.c 2007-05-02 19:24:23 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/mips/kernel/process.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/mips/kernel/process.c linux-2.6.22.18-vs2.3.0.32/arch/mips/kernel/process.c
+--- linux-2.6.22.18/arch/mips/kernel/process.c 2007-07-21 23:58:16.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/mips/kernel/process.c 2008-02-11 12:35:32.000000000 +0100
@@ -236,7 +236,8 @@ long kernel_thread(int (*fn)(void *), vo
#endif
}
/*
-diff -NurpP --minimal linux-2.6.22.10/arch/mips/kernel/ptrace.c linux-2.6.22.10-vs2.3.0.29/arch/mips/kernel/ptrace.c
---- linux-2.6.22.10/arch/mips/kernel/ptrace.c 2007-07-09 13:17:48 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/mips/kernel/ptrace.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/mips/kernel/ptrace.c linux-2.6.22.18-vs2.3.0.32/arch/mips/kernel/ptrace.c
+--- linux-2.6.22.18/arch/mips/kernel/ptrace.c 2007-07-21 23:59:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/mips/kernel/ptrace.c 2008-02-11 12:35:32.000000000 +0100
@@ -25,6 +25,7 @@
#include <linux/user.h>
#include <linux/security.h>
switch (request) {
/* when I and D space are separate, these will need to be fixed. */
case PTRACE_PEEKTEXT: /* read word at location addr. */
-diff -NurpP --minimal linux-2.6.22.10/arch/mips/kernel/scall32-o32.S linux-2.6.22.10-vs2.3.0.29/arch/mips/kernel/scall32-o32.S
---- linux-2.6.22.10/arch/mips/kernel/scall32-o32.S 2007-07-09 13:17:48 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/mips/kernel/scall32-o32.S 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/mips/kernel/scall32-o32.S linux-2.6.22.18-vs2.3.0.32/arch/mips/kernel/scall32-o32.S
+--- linux-2.6.22.18/arch/mips/kernel/scall32-o32.S 2007-07-21 23:59:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/mips/kernel/scall32-o32.S 2008-02-11 12:35:32.000000000 +0100
@@ -619,7 +619,7 @@ einval: li v0, -EINVAL
sys sys_mq_timedreceive 5
sys sys_mq_notify 2 /* 4275 */
sys sys_waitid 5
sys sys_ni_syscall 0 /* available, was setaltroot */
sys sys_add_key 5 /* 4280 */
-diff -NurpP --minimal linux-2.6.22.10/arch/mips/kernel/scall64-64.S linux-2.6.22.10-vs2.3.0.29/arch/mips/kernel/scall64-64.S
---- linux-2.6.22.10/arch/mips/kernel/scall64-64.S 2007-07-09 13:17:48 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/mips/kernel/scall64-64.S 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/mips/kernel/scall64-64.S linux-2.6.22.18-vs2.3.0.32/arch/mips/kernel/scall64-64.S
+--- linux-2.6.22.18/arch/mips/kernel/scall64-64.S 2007-07-21 23:59:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/mips/kernel/scall64-64.S 2008-02-11 12:35:32.000000000 +0100
@@ -434,7 +434,7 @@ sys_call_table:
PTR sys_mq_timedreceive
PTR sys_mq_notify
PTR sys_waitid
PTR sys_ni_syscall /* available, was setaltroot */
PTR sys_add_key
-diff -NurpP --minimal linux-2.6.22.10/arch/mips/kernel/scall64-n32.S linux-2.6.22.10-vs2.3.0.29/arch/mips/kernel/scall64-n32.S
---- linux-2.6.22.10/arch/mips/kernel/scall64-n32.S 2007-07-09 13:17:48 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/mips/kernel/scall64-n32.S 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/mips/kernel/scall64-n32.S linux-2.6.22.18-vs2.3.0.32/arch/mips/kernel/scall64-n32.S
+--- linux-2.6.22.18/arch/mips/kernel/scall64-n32.S 2007-07-21 23:59:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/mips/kernel/scall64-n32.S 2008-02-11 12:35:32.000000000 +0100
@@ -360,7 +360,7 @@ EXPORT(sysn32_call_table)
PTR compat_sys_mq_timedreceive
PTR compat_sys_mq_notify
PTR compat_sys_waitid
PTR sys_ni_syscall /* available, was setaltroot */
PTR sys_add_key
-diff -NurpP --minimal linux-2.6.22.10/arch/mips/kernel/scall64-o32.S linux-2.6.22.10-vs2.3.0.29/arch/mips/kernel/scall64-o32.S
---- linux-2.6.22.10/arch/mips/kernel/scall64-o32.S 2007-07-09 13:17:48 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/mips/kernel/scall64-o32.S 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/mips/kernel/scall64-o32.S linux-2.6.22.18-vs2.3.0.32/arch/mips/kernel/scall64-o32.S
+--- linux-2.6.22.18/arch/mips/kernel/scall64-o32.S 2007-07-21 23:59:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/mips/kernel/scall64-o32.S 2008-02-11 12:35:32.000000000 +0100
@@ -482,7 +482,7 @@ sys_call_table:
PTR compat_sys_mq_timedreceive
PTR compat_sys_mq_notify /* 4275 */
PTR sys32_waitid
PTR sys_ni_syscall /* available, was setaltroot */
PTR sys_add_key /* 4280 */
-diff -NurpP --minimal linux-2.6.22.10/arch/mips/kernel/traps.c linux-2.6.22.10-vs2.3.0.29/arch/mips/kernel/traps.c
---- linux-2.6.22.10/arch/mips/kernel/traps.c 2007-07-09 13:17:48 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/mips/kernel/traps.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/mips/kernel/traps.c linux-2.6.22.18-vs2.3.0.32/arch/mips/kernel/traps.c
+--- linux-2.6.22.18/arch/mips/kernel/traps.c 2007-07-21 23:59:48.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/mips/kernel/traps.c 2008-02-11 12:35:32.000000000 +0100
@@ -302,8 +302,9 @@ void show_registers(struct pt_regs *regs
{
show_regs(regs);
show_stacktrace(current, regs);
show_code((unsigned int *) regs->cp0_epc);
printk("\n");
-diff -NurpP --minimal linux-2.6.22.10/arch/mips/mm/fault.c linux-2.6.22.10-vs2.3.0.29/arch/mips/mm/fault.c
---- linux-2.6.22.10/arch/mips/mm/fault.c 2007-07-09 13:17:48 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/mips/mm/fault.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/mips/mm/fault.c linux-2.6.22.18-vs2.3.0.32/arch/mips/mm/fault.c
+--- linux-2.6.22.18/arch/mips/mm/fault.c 2007-07-21 23:59:48.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/mips/mm/fault.c 2008-02-11 12:35:32.000000000 +0100
@@ -179,7 +179,8 @@ out_of_memory:
down_read(&mm->mmap_sem);
goto survive;
if (user_mode(regs))
do_exit(SIGKILL);
goto no_context;
-diff -NurpP --minimal linux-2.6.22.10/arch/parisc/Kconfig linux-2.6.22.10-vs2.3.0.29/arch/parisc/Kconfig
---- linux-2.6.22.10/arch/parisc/Kconfig 2007-05-02 19:24:26 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/parisc/Kconfig 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/parisc/Kconfig linux-2.6.22.18-vs2.3.0.32/arch/parisc/Kconfig
+--- linux-2.6.22.18/arch/parisc/Kconfig 2007-07-21 23:58:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/parisc/Kconfig 2008-02-11 12:35:32.000000000 +0100
@@ -271,6 +271,8 @@ source "arch/parisc/oprofile/Kconfig"
source "arch/parisc/Kconfig.debug"
source "security/Kconfig"
source "crypto/Kconfig"
-diff -NurpP --minimal linux-2.6.22.10/arch/parisc/kernel/entry.S linux-2.6.22.10-vs2.3.0.29/arch/parisc/kernel/entry.S
---- linux-2.6.22.10/arch/parisc/kernel/entry.S 2007-07-09 13:17:50 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/parisc/kernel/entry.S 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/parisc/kernel/entry.S linux-2.6.22.18-vs2.3.0.32/arch/parisc/kernel/entry.S
+--- linux-2.6.22.18/arch/parisc/kernel/entry.S 2007-07-21 23:59:48.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/parisc/kernel/entry.S 2008-02-11 12:35:32.000000000 +0100
@@ -761,6 +761,7 @@ END(fault_vector_11)
#define CLONE_VM 0x100 /* Must agree with <linux/sched.h> */
.import do_fork
ENTRY(__kernel_thread)
-diff -NurpP --minimal linux-2.6.22.10/arch/parisc/kernel/process.c linux-2.6.22.10-vs2.3.0.29/arch/parisc/kernel/process.c
---- linux-2.6.22.10/arch/parisc/kernel/process.c 2007-07-09 13:17:50 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/parisc/kernel/process.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/parisc/kernel/process.c linux-2.6.22.18-vs2.3.0.32/arch/parisc/kernel/process.c
+--- linux-2.6.22.18/arch/parisc/kernel/process.c 2007-07-21 23:59:48.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/parisc/kernel/process.c 2008-02-11 12:35:32.000000000 +0100
@@ -173,7 +173,7 @@ pid_t kernel_thread(int (*fn)(void *), v
* kernel_thread can become a #define.
*/
}
EXPORT_SYMBOL(kernel_thread);
-diff -NurpP --minimal linux-2.6.22.10/arch/parisc/kernel/sys_parisc32.c linux-2.6.22.10-vs2.3.0.29/arch/parisc/kernel/sys_parisc32.c
---- linux-2.6.22.10/arch/parisc/kernel/sys_parisc32.c 2007-07-09 13:17:50 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/parisc/kernel/sys_parisc32.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/parisc/kernel/syscall_table.S linux-2.6.22.18-vs2.3.0.32/arch/parisc/kernel/syscall_table.S
+--- linux-2.6.22.18/arch/parisc/kernel/syscall_table.S 2007-07-21 23:59:48.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/parisc/kernel/syscall_table.S 2008-02-11 12:35:32.000000000 +0100
+@@ -363,7 +363,7 @@
+ ENTRY_COMP(mbind) /* 260 */
+ ENTRY_COMP(get_mempolicy)
+ ENTRY_COMP(set_mempolicy)
+- ENTRY_SAME(ni_syscall) /* 263: reserved for vserver */
++ ENTRY_DIFF(vserver)
+ ENTRY_SAME(add_key)
+ ENTRY_SAME(request_key) /* 265 */
+ ENTRY_SAME(keyctl)
+diff -Nurp linux-2.6.22.18/arch/parisc/kernel/sys_parisc32.c linux-2.6.22.18-vs2.3.0.32/arch/parisc/kernel/sys_parisc32.c
+--- linux-2.6.22.18/arch/parisc/kernel/sys_parisc32.c 2007-07-21 23:59:48.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/parisc/kernel/sys_parisc32.c 2008-02-11 12:35:32.000000000 +0100
@@ -204,11 +204,11 @@ static inline long get_ts32(struct times
asmlinkage int
sys32_gettimeofday(struct compat_timeval __user *tv, struct timezone __user *tz)
if (put_compat_timeval(tv, &ktv))
return -EFAULT;
}
-diff -NurpP --minimal linux-2.6.22.10/arch/parisc/kernel/syscall_table.S linux-2.6.22.10-vs2.3.0.29/arch/parisc/kernel/syscall_table.S
---- linux-2.6.22.10/arch/parisc/kernel/syscall_table.S 2007-07-09 13:17:50 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/parisc/kernel/syscall_table.S 2007-08-05 20:53:12 +0200
-@@ -363,7 +363,7 @@
- ENTRY_COMP(mbind) /* 260 */
- ENTRY_COMP(get_mempolicy)
- ENTRY_COMP(set_mempolicy)
-- ENTRY_SAME(ni_syscall) /* 263: reserved for vserver */
-+ ENTRY_DIFF(vserver)
- ENTRY_SAME(add_key)
- ENTRY_SAME(request_key) /* 265 */
- ENTRY_SAME(keyctl)
-diff -NurpP --minimal linux-2.6.22.10/arch/parisc/kernel/traps.c linux-2.6.22.10-vs2.3.0.29/arch/parisc/kernel/traps.c
---- linux-2.6.22.10/arch/parisc/kernel/traps.c 2007-07-09 13:17:50 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/parisc/kernel/traps.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/parisc/kernel/traps.c linux-2.6.22.18-vs2.3.0.32/arch/parisc/kernel/traps.c
+--- linux-2.6.22.18/arch/parisc/kernel/traps.c 2007-07-21 23:59:48.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/parisc/kernel/traps.c 2008-02-11 12:35:32.000000000 +0100
@@ -218,8 +218,9 @@ void die_if_kernel(char *str, struct pt_
if (err == 0)
return; /* STFU */
/* Wot's wrong wif bein' racy? */
if (current->thread.flags & PARISC_KERNEL_DEATH) {
-diff -NurpP --minimal linux-2.6.22.10/arch/parisc/mm/fault.c linux-2.6.22.10-vs2.3.0.29/arch/parisc/mm/fault.c
---- linux-2.6.22.10/arch/parisc/mm/fault.c 2007-05-02 19:24:26 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/parisc/mm/fault.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/parisc/mm/fault.c linux-2.6.22.18-vs2.3.0.32/arch/parisc/mm/fault.c
+--- linux-2.6.22.18/arch/parisc/mm/fault.c 2007-07-21 23:58:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/parisc/mm/fault.c 2008-02-11 12:35:32.000000000 +0100
@@ -209,8 +209,9 @@ bad_area:
#ifdef PRINT_USER_FAULTS
if (user_mode(regs))
do_exit(SIGKILL);
goto no_context;
-diff -NurpP --minimal linux-2.6.22.10/arch/powerpc/Kconfig linux-2.6.22.10-vs2.3.0.29/arch/powerpc/Kconfig
---- linux-2.6.22.10/arch/powerpc/Kconfig 2007-07-09 13:17:50 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/powerpc/Kconfig 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/powerpc/Kconfig linux-2.6.22.18-vs2.3.0.32/arch/powerpc/Kconfig
+--- linux-2.6.22.18/arch/powerpc/Kconfig 2007-07-21 23:59:48.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/powerpc/Kconfig 2008-02-11 12:35:32.000000000 +0100
@@ -906,6 +906,8 @@ endmenu
source "arch/powerpc/Kconfig.debug"
source "security/Kconfig"
config KEYS_COMPAT
-diff -NurpP --minimal linux-2.6.22.10/arch/powerpc/kernel/asm-offsets.c linux-2.6.22.10-vs2.3.0.29/arch/powerpc/kernel/asm-offsets.c
---- linux-2.6.22.10/arch/powerpc/kernel/asm-offsets.c 2007-07-09 13:17:51 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/powerpc/kernel/asm-offsets.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/powerpc/kernel/asm-offsets.c linux-2.6.22.18-vs2.3.0.32/arch/powerpc/kernel/asm-offsets.c
+--- linux-2.6.22.18/arch/powerpc/kernel/asm-offsets.c 2007-07-21 23:59:48.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/powerpc/kernel/asm-offsets.c 2008-02-11 12:35:32.000000000 +0100
@@ -250,6 +250,7 @@ int main(void)
DEFINE(CLONE_VM, CLONE_VM);
#ifndef CONFIG_PPC64
DEFINE(MM_PGD, offsetof(struct mm_struct, pgd));
-diff -NurpP --minimal linux-2.6.22.10/arch/powerpc/kernel/irq.c linux-2.6.22.10-vs2.3.0.29/arch/powerpc/kernel/irq.c
---- linux-2.6.22.10/arch/powerpc/kernel/irq.c 2007-07-09 13:17:51 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/powerpc/kernel/irq.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/powerpc/kernel/irq.c linux-2.6.22.18-vs2.3.0.32/arch/powerpc/kernel/irq.c
+--- linux-2.6.22.18/arch/powerpc/kernel/irq.c 2007-07-21 23:59:48.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/powerpc/kernel/irq.c 2008-02-11 12:35:32.000000000 +0100
@@ -53,6 +53,7 @@
#include <linux/mutex.h>
#include <linux/bootmem.h>
#include <asm/uaccess.h>
#include <asm/system.h>
-diff -NurpP --minimal linux-2.6.22.10/arch/powerpc/kernel/misc_32.S linux-2.6.22.10-vs2.3.0.29/arch/powerpc/kernel/misc_32.S
---- linux-2.6.22.10/arch/powerpc/kernel/misc_32.S 2007-07-09 13:17:51 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/powerpc/kernel/misc_32.S 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/powerpc/kernel/misc_32.S linux-2.6.22.18-vs2.3.0.32/arch/powerpc/kernel/misc_32.S
+--- linux-2.6.22.18/arch/powerpc/kernel/misc_32.S 2007-07-21 23:59:48.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/powerpc/kernel/misc_32.S 2008-02-11 12:35:32.000000000 +0100
@@ -745,7 +745,7 @@ _GLOBAL(kernel_thread)
mr r30,r3 /* function */
mr r31,r4 /* argument */
li r4,0 /* new sp (unused) */
li r0,__NR_clone
sc
-diff -NurpP --minimal linux-2.6.22.10/arch/powerpc/kernel/misc_64.S linux-2.6.22.10-vs2.3.0.29/arch/powerpc/kernel/misc_64.S
---- linux-2.6.22.10/arch/powerpc/kernel/misc_64.S 2007-05-02 19:24:27 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/powerpc/kernel/misc_64.S 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/powerpc/kernel/misc_64.S linux-2.6.22.18-vs2.3.0.32/arch/powerpc/kernel/misc_64.S
+--- linux-2.6.22.18/arch/powerpc/kernel/misc_64.S 2007-07-21 23:58:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/powerpc/kernel/misc_64.S 2008-02-11 12:35:32.000000000 +0100
@@ -434,7 +434,7 @@ _GLOBAL(kernel_thread)
mr r29,r3
mr r30,r4
li r4,0 /* new sp (unused) */
li r0,__NR_clone
sc
-diff -NurpP --minimal linux-2.6.22.10/arch/powerpc/kernel/process.c linux-2.6.22.10-vs2.3.0.29/arch/powerpc/kernel/process.c
---- linux-2.6.22.10/arch/powerpc/kernel/process.c 2007-10-30 01:57:12 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/arch/powerpc/kernel/process.c 2007-09-30 14:57:55 +0200
+diff -Nurp linux-2.6.22.18/arch/powerpc/kernel/process.c linux-2.6.22.18-vs2.3.0.32/arch/powerpc/kernel/process.c
+--- linux-2.6.22.18/arch/powerpc/kernel/process.c 2007-09-29 14:11:48.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/powerpc/kernel/process.c 2008-02-11 12:35:32.000000000 +0100
@@ -422,8 +422,9 @@ void show_regs(struct pt_regs * regs)
trap = TRAP(regs);
if (trap == 0x300 || trap == 0x600)
#ifdef CONFIG_SMP
printk(" CPU: %d", smp_processor_id());
-diff -NurpP --minimal linux-2.6.22.10/arch/powerpc/kernel/sys_ppc32.c linux-2.6.22.10-vs2.3.0.29/arch/powerpc/kernel/sys_ppc32.c
---- linux-2.6.22.10/arch/powerpc/kernel/sys_ppc32.c 2007-07-09 13:17:51 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/powerpc/kernel/sys_ppc32.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/powerpc/kernel/sys_ppc32.c linux-2.6.22.18-vs2.3.0.32/arch/powerpc/kernel/sys_ppc32.c
+--- linux-2.6.22.18/arch/powerpc/kernel/sys_ppc32.c 2007-07-21 23:59:48.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/powerpc/kernel/sys_ppc32.c 2008-02-11 12:35:32.000000000 +0100
@@ -205,7 +205,7 @@ asmlinkage long compat_sys_gettimeofday(
{
if (tv) {
if (put_tv32(tv, &ktv))
return -EFAULT;
}
-diff -NurpP --minimal linux-2.6.22.10/arch/powerpc/kernel/traps.c linux-2.6.22.10-vs2.3.0.29/arch/powerpc/kernel/traps.c
---- linux-2.6.22.10/arch/powerpc/kernel/traps.c 2007-07-09 13:17:51 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/powerpc/kernel/traps.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/powerpc/kernel/traps.c linux-2.6.22.18-vs2.3.0.32/arch/powerpc/kernel/traps.c
+--- linux-2.6.22.18/arch/powerpc/kernel/traps.c 2007-07-21 23:59:48.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/powerpc/kernel/traps.c 2008-02-11 12:35:32.000000000 +0100
@@ -878,8 +878,9 @@ void nonrecoverable_exception(struct pt_
void trace_syscall(struct pt_regs *regs)
regs->ccr&0x10000000?"Error=":"", regs->gpr[3], print_tainted());
}
-diff -NurpP --minimal linux-2.6.22.10/arch/powerpc/kernel/vdso.c linux-2.6.22.10-vs2.3.0.29/arch/powerpc/kernel/vdso.c
---- linux-2.6.22.10/arch/powerpc/kernel/vdso.c 2007-07-09 13:17:51 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/powerpc/kernel/vdso.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/powerpc/kernel/vdso.c linux-2.6.22.18-vs2.3.0.32/arch/powerpc/kernel/vdso.c
+--- linux-2.6.22.18/arch/powerpc/kernel/vdso.c 2007-07-21 23:59:48.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/powerpc/kernel/vdso.c 2008-02-11 12:35:32.000000000 +0100
@@ -21,6 +21,7 @@
#include <linux/elf.h>
#include <linux/security.h>
#include <asm/pgtable.h>
#include <asm/system.h>
-diff -NurpP --minimal linux-2.6.22.10/arch/powerpc/mm/fault.c linux-2.6.22.10-vs2.3.0.29/arch/powerpc/mm/fault.c
---- linux-2.6.22.10/arch/powerpc/mm/fault.c 2007-07-09 13:17:51 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/powerpc/mm/fault.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/powerpc/mm/fault.c linux-2.6.22.18-vs2.3.0.32/arch/powerpc/mm/fault.c
+--- linux-2.6.22.18/arch/powerpc/mm/fault.c 2007-07-21 23:59:48.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/powerpc/mm/fault.c 2008-02-11 12:35:32.000000000 +0100
@@ -378,7 +378,8 @@ out_of_memory:
down_read(&mm->mmap_sem);
goto survive;
if (user_mode(regs))
do_exit(SIGKILL);
return SIGKILL;
-diff -NurpP --minimal linux-2.6.22.10/arch/ppc/Kconfig linux-2.6.22.10-vs2.3.0.29/arch/ppc/Kconfig
---- linux-2.6.22.10/arch/ppc/Kconfig 2007-05-02 19:24:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/ppc/Kconfig 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/ppc/Kconfig linux-2.6.22.18-vs2.3.0.32/arch/ppc/Kconfig
+--- linux-2.6.22.18/arch/ppc/Kconfig 2007-07-21 23:58:19.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/ppc/Kconfig 2008-02-11 12:35:32.000000000 +0100
@@ -1455,6 +1455,8 @@ source "arch/powerpc/oprofile/Kconfig"
source "arch/ppc/Kconfig.debug"
source "security/Kconfig"
source "crypto/Kconfig"
-diff -NurpP --minimal linux-2.6.22.10/arch/ppc/kernel/asm-offsets.c linux-2.6.22.10-vs2.3.0.29/arch/ppc/kernel/asm-offsets.c
---- linux-2.6.22.10/arch/ppc/kernel/asm-offsets.c 2007-07-09 13:18:01 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/ppc/kernel/asm-offsets.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/ppc/kernel/asm-offsets.c linux-2.6.22.18-vs2.3.0.32/arch/ppc/kernel/asm-offsets.c
+--- linux-2.6.22.18/arch/ppc/kernel/asm-offsets.c 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/ppc/kernel/asm-offsets.c 2008-02-11 12:35:32.000000000 +0100
@@ -120,6 +120,7 @@ main(void)
DEFINE(TRAP, STACK_FRAME_OVERHEAD+offsetof(struct pt_regs, trap));
DEFINE(CLONE_VM, CLONE_VM);
DEFINE(MM_PGD, offsetof(struct mm_struct, pgd));
/* About the CPU features table */
-diff -NurpP --minimal linux-2.6.22.10/arch/ppc/kernel/misc.S linux-2.6.22.10-vs2.3.0.29/arch/ppc/kernel/misc.S
---- linux-2.6.22.10/arch/ppc/kernel/misc.S 2006-11-30 21:18:32 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/arch/ppc/kernel/misc.S 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/ppc/kernel/misc.S linux-2.6.22.18-vs2.3.0.32/arch/ppc/kernel/misc.S
+--- linux-2.6.22.18/arch/ppc/kernel/misc.S 2007-05-04 15:57:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/ppc/kernel/misc.S 2008-02-11 12:35:32.000000000 +0100
@@ -848,7 +848,7 @@ _GLOBAL(kernel_thread)
mr r30,r3 /* function */
mr r31,r4 /* argument */
li r4,0 /* new sp (unused) */
li r0,__NR_clone
sc
-diff -NurpP --minimal linux-2.6.22.10/arch/ppc/kernel/traps.c linux-2.6.22.10-vs2.3.0.29/arch/ppc/kernel/traps.c
---- linux-2.6.22.10/arch/ppc/kernel/traps.c 2007-07-09 13:18:01 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/ppc/kernel/traps.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/ppc/kernel/traps.c linux-2.6.22.18-vs2.3.0.32/arch/ppc/kernel/traps.c
+--- linux-2.6.22.18/arch/ppc/kernel/traps.c 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/ppc/kernel/traps.c 2008-02-11 12:35:32.000000000 +0100
@@ -696,8 +696,9 @@ void nonrecoverable_exception(struct pt_
void trace_syscall(struct pt_regs *regs)
regs->ccr&0x10000000?"Error=":"", regs->gpr[3], print_tainted());
}
-diff -NurpP --minimal linux-2.6.22.10/arch/ppc/mm/fault.c linux-2.6.22.10-vs2.3.0.29/arch/ppc/mm/fault.c
---- linux-2.6.22.10/arch/ppc/mm/fault.c 2006-11-30 21:18:32 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/arch/ppc/mm/fault.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/ppc/mm/fault.c linux-2.6.22.18-vs2.3.0.32/arch/ppc/mm/fault.c
+--- linux-2.6.22.18/arch/ppc/mm/fault.c 2007-05-04 15:57:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/ppc/mm/fault.c 2008-02-11 12:35:32.000000000 +0100
@@ -296,7 +296,8 @@ out_of_memory:
down_read(&mm->mmap_sem);
goto survive;
if (user_mode(regs))
do_exit(SIGKILL);
return SIGKILL;
-diff -NurpP --minimal linux-2.6.22.10/arch/s390/Kconfig linux-2.6.22.10-vs2.3.0.29/arch/s390/Kconfig
---- linux-2.6.22.10/arch/s390/Kconfig 2007-07-09 13:18:02 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/s390/Kconfig 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/s390/Kconfig linux-2.6.22.18-vs2.3.0.32/arch/s390/Kconfig
+--- linux-2.6.22.18/arch/s390/Kconfig 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/s390/Kconfig 2008-02-11 12:35:32.000000000 +0100
@@ -551,6 +551,8 @@ endmenu
source "arch/s390/Kconfig.debug"
source "security/Kconfig"
source "crypto/Kconfig"
-diff -NurpP --minimal linux-2.6.22.10/arch/s390/kernel/compat_linux.c linux-2.6.22.10-vs2.3.0.29/arch/s390/kernel/compat_linux.c
---- linux-2.6.22.10/arch/s390/kernel/compat_linux.c 2007-07-09 13:18:02 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/s390/kernel/compat_linux.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/s390/kernel/compat_linux.c linux-2.6.22.18-vs2.3.0.32/arch/s390/kernel/compat_linux.c
+--- linux-2.6.22.18/arch/s390/kernel/compat_linux.c 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/s390/kernel/compat_linux.c 2008-02-11 12:35:32.000000000 +0100
@@ -567,7 +567,7 @@ asmlinkage long sys32_gettimeofday(struc
{
if (tv) {
if (put_tv32(tv, &ktv))
return -EFAULT;
}
-diff -NurpP --minimal linux-2.6.22.10/arch/s390/kernel/process.c linux-2.6.22.10-vs2.3.0.29/arch/s390/kernel/process.c
---- linux-2.6.22.10/arch/s390/kernel/process.c 2007-07-09 13:18:02 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/s390/kernel/process.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/s390/kernel/process.c linux-2.6.22.18-vs2.3.0.32/arch/s390/kernel/process.c
+--- linux-2.6.22.18/arch/s390/kernel/process.c 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/s390/kernel/process.c 2008-02-11 12:35:32.000000000 +0100
@@ -164,9 +164,9 @@ void show_regs(struct pt_regs *regs)
struct task_struct *tsk = current;
0, ®s, 0, NULL, NULL);
}
-diff -NurpP --minimal linux-2.6.22.10/arch/s390/kernel/ptrace.c linux-2.6.22.10-vs2.3.0.29/arch/s390/kernel/ptrace.c
---- linux-2.6.22.10/arch/s390/kernel/ptrace.c 2007-05-02 19:24:29 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/s390/kernel/ptrace.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/s390/kernel/ptrace.c linux-2.6.22.18-vs2.3.0.32/arch/s390/kernel/ptrace.c
+--- linux-2.6.22.18/arch/s390/kernel/ptrace.c 2007-07-21 23:58:19.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/s390/kernel/ptrace.c 2008-02-11 12:35:32.000000000 +0100
@@ -33,6 +33,7 @@
#include <linux/security.h>
#include <linux/audit.h>
put_task_struct(child);
out:
unlock_kernel();
-diff -NurpP --minimal linux-2.6.22.10/arch/s390/kernel/syscalls.S linux-2.6.22.10-vs2.3.0.29/arch/s390/kernel/syscalls.S
---- linux-2.6.22.10/arch/s390/kernel/syscalls.S 2007-07-09 13:18:02 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/s390/kernel/syscalls.S 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/s390/kernel/syscalls.S linux-2.6.22.18-vs2.3.0.32/arch/s390/kernel/syscalls.S
+--- linux-2.6.22.18/arch/s390/kernel/syscalls.S 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/s390/kernel/syscalls.S 2008-02-11 12:35:32.000000000 +0100
@@ -271,7 +271,7 @@ SYSCALL(sys_clock_settime,sys_clock_sett
SYSCALL(sys_clock_gettime,sys_clock_gettime,sys32_clock_gettime_wrapper) /* 260 */
SYSCALL(sys_clock_getres,sys_clock_getres,sys32_clock_getres_wrapper)
SYSCALL(s390_fadvise64_64,sys_ni_syscall,sys32_fadvise64_64_wrapper)
SYSCALL(sys_statfs64,sys_statfs64,compat_sys_statfs64_wrapper)
SYSCALL(sys_fstatfs64,sys_fstatfs64,compat_sys_fstatfs64_wrapper)
-diff -NurpP --minimal linux-2.6.22.10/arch/s390/mm/fault.c linux-2.6.22.10-vs2.3.0.29/arch/s390/mm/fault.c
---- linux-2.6.22.10/arch/s390/mm/fault.c 2007-07-09 13:18:02 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/s390/mm/fault.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/s390/mm/fault.c linux-2.6.22.18-vs2.3.0.32/arch/s390/mm/fault.c
+--- linux-2.6.22.18/arch/s390/mm/fault.c 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/s390/mm/fault.c 2008-02-11 12:35:32.000000000 +0100
@@ -216,7 +216,8 @@ static int do_out_of_memory(struct pt_re
down_read(&mm->mmap_sem);
return 1;
if (regs->psw.mask & PSW_MASK_PSTATE)
do_exit(SIGKILL);
do_no_context(regs, error_code, address);
-diff -NurpP --minimal linux-2.6.22.10/arch/sh/Kconfig linux-2.6.22.10-vs2.3.0.29/arch/sh/Kconfig
---- linux-2.6.22.10/arch/sh/Kconfig 2007-07-09 13:18:02 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sh/Kconfig 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/sh/Kconfig linux-2.6.22.18-vs2.3.0.32/arch/sh/Kconfig
+--- linux-2.6.22.18/arch/sh/Kconfig 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sh/Kconfig 2008-02-11 12:35:32.000000000 +0100
@@ -723,6 +723,8 @@ source "arch/sh/oprofile/Kconfig"
source "arch/sh/Kconfig.debug"
source "security/Kconfig"
source "crypto/Kconfig"
-diff -NurpP --minimal linux-2.6.22.10/arch/sh/kernel/irq.c linux-2.6.22.10-vs2.3.0.29/arch/sh/kernel/irq.c
---- linux-2.6.22.10/arch/sh/kernel/irq.c 2007-07-09 13:18:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sh/kernel/irq.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/sh/kernel/irq.c linux-2.6.22.18-vs2.3.0.32/arch/sh/kernel/irq.c
+--- linux-2.6.22.18/arch/sh/kernel/irq.c 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sh/kernel/irq.c 2008-02-11 12:35:33.000000000 +0100
@@ -12,6 +12,7 @@
#include <linux/kernel_stat.h>
#include <linux/seq_file.h>
#include <asm/processor.h>
#include <asm/machvec.h>
#include <asm/uaccess.h>
-diff -NurpP --minimal linux-2.6.22.10/arch/sh/kernel/process.c linux-2.6.22.10-vs2.3.0.29/arch/sh/kernel/process.c
---- linux-2.6.22.10/arch/sh/kernel/process.c 2007-07-09 13:18:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sh/kernel/process.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/sh/kernel/process.c linux-2.6.22.18-vs2.3.0.32/arch/sh/kernel/process.c
+--- linux-2.6.22.18/arch/sh/kernel/process.c 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sh/kernel/process.c 2008-02-11 12:35:33.000000000 +0100
@@ -118,7 +118,8 @@ void machine_power_off(void)
void show_regs(struct pt_regs * regs)
{
®s, 0, NULL, NULL);
}
-diff -NurpP --minimal linux-2.6.22.10/arch/sh/kernel/vsyscall/vsyscall.c linux-2.6.22.10-vs2.3.0.29/arch/sh/kernel/vsyscall/vsyscall.c
---- linux-2.6.22.10/arch/sh/kernel/vsyscall/vsyscall.c 2007-07-09 13:18:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sh/kernel/vsyscall/vsyscall.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/sh/kernel/vsyscall/vsyscall.c linux-2.6.22.18-vs2.3.0.32/arch/sh/kernel/vsyscall/vsyscall.c
+--- linux-2.6.22.18/arch/sh/kernel/vsyscall/vsyscall.c 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sh/kernel/vsyscall/vsyscall.c 2008-02-11 12:35:33.000000000 +0100
@@ -18,6 +18,7 @@
#include <linux/module.h>
#include <linux/elf.h>
/*
* Should the kernel map a VDSO page into processes and pass its
-diff -NurpP --minimal linux-2.6.22.10/arch/sh/mm/fault.c linux-2.6.22.10-vs2.3.0.29/arch/sh/mm/fault.c
---- linux-2.6.22.10/arch/sh/mm/fault.c 2007-07-09 13:18:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sh/mm/fault.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/sh/mm/fault.c linux-2.6.22.18-vs2.3.0.32/arch/sh/mm/fault.c
+--- linux-2.6.22.18/arch/sh/mm/fault.c 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sh/mm/fault.c 2008-02-11 12:35:33.000000000 +0100
@@ -201,7 +201,8 @@ out_of_memory:
down_read(&mm->mmap_sem);
goto survive;
if (user_mode(regs))
do_exit(SIGKILL);
goto no_context;
-diff -NurpP --minimal linux-2.6.22.10/arch/sh64/kernel/process.c linux-2.6.22.10-vs2.3.0.29/arch/sh64/kernel/process.c
---- linux-2.6.22.10/arch/sh64/kernel/process.c 2007-07-09 13:18:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sh64/kernel/process.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/sh64/kernel/process.c linux-2.6.22.18-vs2.3.0.32/arch/sh64/kernel/process.c
+--- linux-2.6.22.18/arch/sh64/kernel/process.c 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sh64/kernel/process.c 2008-02-11 12:35:33.000000000 +0100
@@ -400,8 +400,8 @@ int kernel_thread(int (*fn)(void *), voi
regs.pc = (unsigned long)kernel_thread_helper;
regs.sr = (1 << 30);
}
/*
-diff -NurpP --minimal linux-2.6.22.10/arch/sh64/mm/fault.c linux-2.6.22.10-vs2.3.0.29/arch/sh64/mm/fault.c
---- linux-2.6.22.10/arch/sh64/mm/fault.c 2007-07-09 13:18:04 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sh64/mm/fault.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/sh64/mm/fault.c linux-2.6.22.18-vs2.3.0.32/arch/sh64/mm/fault.c
+--- linux-2.6.22.18/arch/sh64/mm/fault.c 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sh64/mm/fault.c 2008-02-11 12:35:33.000000000 +0100
@@ -81,7 +81,7 @@ static inline void print_vma(struct vm_a
static inline void print_task(struct task_struct *tsk)
if (user_mode(regs))
do_exit(SIGKILL);
goto no_context;
-diff -NurpP --minimal linux-2.6.22.10/arch/sparc/Kconfig linux-2.6.22.10-vs2.3.0.29/arch/sparc/Kconfig
---- linux-2.6.22.10/arch/sparc/Kconfig 2007-07-09 13:18:04 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sparc/Kconfig 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/sparc/Kconfig linux-2.6.22.18-vs2.3.0.32/arch/sparc/Kconfig
+--- linux-2.6.22.18/arch/sparc/Kconfig 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sparc/Kconfig 2008-02-11 12:35:33.000000000 +0100
@@ -317,6 +317,8 @@ endmenu
source "arch/sparc/Kconfig.debug"
source "security/Kconfig"
source "crypto/Kconfig"
-diff -NurpP --minimal linux-2.6.22.10/arch/sparc/kernel/process.c linux-2.6.22.10-vs2.3.0.29/arch/sparc/kernel/process.c
---- linux-2.6.22.10/arch/sparc/kernel/process.c 2007-07-09 13:18:04 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sparc/kernel/process.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/sparc/kernel/process.c linux-2.6.22.18-vs2.3.0.32/arch/sparc/kernel/process.c
+--- linux-2.6.22.18/arch/sparc/kernel/process.c 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sparc/kernel/process.c 2008-02-11 12:35:33.000000000 +0100
@@ -705,7 +705,8 @@ pid_t kernel_thread(int (*fn)(void *), v
/* Notreached by child. */
"1: mov %%o0, %0\n\t" :
"i" (__NR_exit), "r" (fn), "r" (arg) :
"g1", "g2", "g3", "o0", "o1", "memory", "cc");
return retval;
-diff -NurpP --minimal linux-2.6.22.10/arch/sparc/kernel/ptrace.c linux-2.6.22.10-vs2.3.0.29/arch/sparc/kernel/ptrace.c
---- linux-2.6.22.10/arch/sparc/kernel/ptrace.c 2007-02-06 03:00:18 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sparc/kernel/ptrace.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/sparc/kernel/ptrace.c linux-2.6.22.18-vs2.3.0.32/arch/sparc/kernel/ptrace.c
+--- linux-2.6.22.18/arch/sparc/kernel/ptrace.c 2007-05-04 15:58:05.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sparc/kernel/ptrace.c 2008-02-11 12:35:33.000000000 +0100
@@ -19,6 +19,7 @@
#include <linux/smp_lock.h>
#include <linux/security.h>
if ((current->personality == PER_SUNOS && request == PTRACE_SUNATTACH)
|| (current->personality != PER_SUNOS && request == PTRACE_ATTACH)) {
-diff -NurpP --minimal linux-2.6.22.10/arch/sparc/kernel/systbls.S linux-2.6.22.10-vs2.3.0.29/arch/sparc/kernel/systbls.S
---- linux-2.6.22.10/arch/sparc/kernel/systbls.S 2007-07-09 13:18:04 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sparc/kernel/systbls.S 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/sparc/kernel/systbls.S linux-2.6.22.18-vs2.3.0.32/arch/sparc/kernel/systbls.S
+--- linux-2.6.22.18/arch/sparc/kernel/systbls.S 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sparc/kernel/systbls.S 2008-02-11 12:35:33.000000000 +0100
@@ -71,7 +71,7 @@ sys_call_table:
/*250*/ .long sparc_mremap, sys_sysctl, sys_getsid, sys_fdatasync, sys_nfsservctl
/*255*/ .long sys_sync_file_range, sys_clock_settime, sys_clock_gettime, sys_clock_getres, sys_clock_nanosleep
/*270*/ .long sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink
/*275*/ .long sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid
/*280*/ .long sys_tee, sys_add_key, sys_request_key, sys_keyctl, sys_openat
-diff -NurpP --minimal linux-2.6.22.10/arch/sparc/kernel/traps.c linux-2.6.22.10-vs2.3.0.29/arch/sparc/kernel/traps.c
---- linux-2.6.22.10/arch/sparc/kernel/traps.c 2007-07-09 13:18:05 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sparc/kernel/traps.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/sparc/kernel/traps.c linux-2.6.22.18-vs2.3.0.32/arch/sparc/kernel/traps.c
+--- linux-2.6.22.18/arch/sparc/kernel/traps.c 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sparc/kernel/traps.c 2008-02-11 12:35:33.000000000 +0100
@@ -99,7 +99,8 @@ void die_if_kernel(char *str, struct pt_
" /_| \\__/ |_\\\n"
" \\__U_/\n");
show_regs(regs);
__SAVE; __SAVE; __SAVE; __SAVE;
-diff -NurpP --minimal linux-2.6.22.10/arch/sparc/mm/fault.c linux-2.6.22.10-vs2.3.0.29/arch/sparc/mm/fault.c
---- linux-2.6.22.10/arch/sparc/mm/fault.c 2007-07-09 13:18:05 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sparc/mm/fault.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/sparc/mm/fault.c linux-2.6.22.18-vs2.3.0.32/arch/sparc/mm/fault.c
+--- linux-2.6.22.18/arch/sparc/mm/fault.c 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sparc/mm/fault.c 2008-02-11 12:35:33.000000000 +0100
@@ -367,7 +367,8 @@ no_context:
*/
out_of_memory:
if (from_user)
do_exit(SIGKILL);
goto no_context;
-diff -NurpP --minimal linux-2.6.22.10/arch/sparc64/Kconfig linux-2.6.22.10-vs2.3.0.29/arch/sparc64/Kconfig
---- linux-2.6.22.10/arch/sparc64/Kconfig 2007-07-09 13:18:06 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sparc64/Kconfig 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/sparc64/Kconfig linux-2.6.22.18-vs2.3.0.32/arch/sparc64/Kconfig
+--- linux-2.6.22.18/arch/sparc64/Kconfig 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sparc64/Kconfig 2008-02-11 12:35:33.000000000 +0100
@@ -451,6 +451,8 @@ endmenu
source "arch/sparc64/Kconfig.debug"
source "security/Kconfig"
source "crypto/Kconfig"
-diff -NurpP --minimal linux-2.6.22.10/arch/sparc64/kernel/binfmt_aout32.c linux-2.6.22.10-vs2.3.0.29/arch/sparc64/kernel/binfmt_aout32.c
---- linux-2.6.22.10/arch/sparc64/kernel/binfmt_aout32.c 2007-02-06 03:00:18 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sparc64/kernel/binfmt_aout32.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/sparc64/kernel/binfmt_aout32.c linux-2.6.22.18-vs2.3.0.32/arch/sparc64/kernel/binfmt_aout32.c
+--- linux-2.6.22.18/arch/sparc64/kernel/binfmt_aout32.c 2007-05-04 15:58:05.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sparc64/kernel/binfmt_aout32.c 2008-02-11 12:35:33.000000000 +0100
@@ -27,6 +27,7 @@
#include <linux/binfmts.h>
#include <linux/personality.h>
#include <asm/system.h>
#include <asm/uaccess.h>
-diff -NurpP --minimal linux-2.6.22.10/arch/sparc64/kernel/process.c linux-2.6.22.10-vs2.3.0.29/arch/sparc64/kernel/process.c
---- linux-2.6.22.10/arch/sparc64/kernel/process.c 2007-07-09 13:18:06 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sparc64/kernel/process.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/sparc64/kernel/process.c linux-2.6.22.18-vs2.3.0.32/arch/sparc64/kernel/process.c
+--- linux-2.6.22.18/arch/sparc64/kernel/process.c 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sparc64/kernel/process.c 2008-02-11 12:35:33.000000000 +0100
@@ -707,7 +707,8 @@ pid_t kernel_thread(int (*fn)(void *), v
/* Notreached by child. */
"1:" :
"i" (__NR_exit), "r" (fn), "r" (arg) :
"g1", "g2", "g3", "o0", "o1", "memory", "cc");
return retval;
-diff -NurpP --minimal linux-2.6.22.10/arch/sparc64/kernel/ptrace.c linux-2.6.22.10-vs2.3.0.29/arch/sparc64/kernel/ptrace.c
---- linux-2.6.22.10/arch/sparc64/kernel/ptrace.c 2007-02-06 03:00:18 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sparc64/kernel/ptrace.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/sparc64/kernel/ptrace.c linux-2.6.22.18-vs2.3.0.32/arch/sparc64/kernel/ptrace.c
+--- linux-2.6.22.18/arch/sparc64/kernel/ptrace.c 2007-05-04 15:58:05.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sparc64/kernel/ptrace.c 2008-02-11 12:35:33.000000000 +0100
@@ -22,6 +22,7 @@
#include <linux/seccomp.h>
#include <linux/audit.h>
if ((current->personality == PER_SUNOS && request == PTRACE_SUNATTACH)
|| (current->personality != PER_SUNOS && request == PTRACE_ATTACH)) {
-diff -NurpP --minimal linux-2.6.22.10/arch/sparc64/kernel/sys_sparc32.c linux-2.6.22.10-vs2.3.0.29/arch/sparc64/kernel/sys_sparc32.c
---- linux-2.6.22.10/arch/sparc64/kernel/sys_sparc32.c 2007-07-09 13:18:06 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sparc64/kernel/sys_sparc32.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/sparc64/kernel/sys_sparc32.c linux-2.6.22.18-vs2.3.0.32/arch/sparc64/kernel/sys_sparc32.c
+--- linux-2.6.22.18/arch/sparc64/kernel/sys_sparc32.c 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sparc64/kernel/sys_sparc32.c 2008-02-11 12:35:33.000000000 +0100
@@ -729,7 +729,7 @@ asmlinkage long sys32_gettimeofday(struc
{
if (tv) {
if (put_tv32(tv, &ktv))
return -EFAULT;
}
-diff -NurpP --minimal linux-2.6.22.10/arch/sparc64/kernel/systbls.S linux-2.6.22.10-vs2.3.0.29/arch/sparc64/kernel/systbls.S
---- linux-2.6.22.10/arch/sparc64/kernel/systbls.S 2007-07-09 13:18:06 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sparc64/kernel/systbls.S 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/sparc64/kernel/systbls.S linux-2.6.22.18-vs2.3.0.32/arch/sparc64/kernel/systbls.S
+--- linux-2.6.22.18/arch/sparc64/kernel/systbls.S 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sparc64/kernel/systbls.S 2008-02-11 12:35:33.000000000 +0100
@@ -72,7 +72,7 @@ sys_call_table32:
/*250*/ .word sys32_mremap, sys32_sysctl, sys32_getsid, sys_fdatasync, sys32_nfsservctl
.word sys32_sync_file_range, compat_sys_clock_settime, compat_sys_clock_gettime, compat_sys_clock_getres, sys32_clock_nanosleep
/*270*/ .word sys_io_submit, sys_io_cancel, sys_io_getevents, sys_mq_open, sys_mq_unlink
.word sys_mq_timedsend, sys_mq_timedreceive, sys_mq_notify, sys_mq_getsetattr, sys_waitid
/*280*/ .word sys_tee, sys_add_key, sys_request_key, sys_keyctl, sys_openat
-diff -NurpP --minimal linux-2.6.22.10/arch/sparc64/kernel/traps.c linux-2.6.22.10-vs2.3.0.29/arch/sparc64/kernel/traps.c
---- linux-2.6.22.10/arch/sparc64/kernel/traps.c 2007-10-30 01:57:12 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sparc64/kernel/traps.c 2007-09-05 03:06:11 +0200
+diff -Nurp linux-2.6.22.18/arch/sparc64/kernel/traps.c linux-2.6.22.18-vs2.3.0.32/arch/sparc64/kernel/traps.c
+--- linux-2.6.22.18/arch/sparc64/kernel/traps.c 2007-09-05 07:07:59.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sparc64/kernel/traps.c 2008-02-11 12:35:33.000000000 +0100
@@ -2225,7 +2225,8 @@ void die_if_kernel(char *str, struct pt_
" /_| \\__/ |_\\\n"
" \\__U_/\n");
notify_die(DIE_OOPS, str, regs, 0, 255, SIGSEGV);
__asm__ __volatile__("flushw");
__show_regs(regs);
-diff -NurpP --minimal linux-2.6.22.10/arch/sparc64/mm/fault.c linux-2.6.22.10-vs2.3.0.29/arch/sparc64/mm/fault.c
---- linux-2.6.22.10/arch/sparc64/mm/fault.c 2007-10-30 01:57:12 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sparc64/mm/fault.c 2007-09-05 03:06:11 +0200
+diff -Nurp linux-2.6.22.18/arch/sparc64/mm/fault.c linux-2.6.22.18-vs2.3.0.32/arch/sparc64/mm/fault.c
+--- linux-2.6.22.18/arch/sparc64/mm/fault.c 2007-09-05 07:07:59.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sparc64/mm/fault.c 2008-02-11 12:35:33.000000000 +0100
@@ -463,7 +463,8 @@ handle_kernel_fault:
out_of_memory:
insn = get_fault_insn(regs, insn);
if (!(regs->tstate & TSTATE_PRIV))
do_exit(SIGKILL);
goto handle_kernel_fault;
-diff -NurpP --minimal linux-2.6.22.10/arch/sparc64/solaris/fs.c linux-2.6.22.10-vs2.3.0.29/arch/sparc64/solaris/fs.c
---- linux-2.6.22.10/arch/sparc64/solaris/fs.c 2007-02-06 03:00:21 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/arch/sparc64/solaris/fs.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/sparc64/solaris/fs.c linux-2.6.22.18-vs2.3.0.32/arch/sparc64/solaris/fs.c
+--- linux-2.6.22.18/arch/sparc64/solaris/fs.c 2007-05-04 15:58:05.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/sparc64/solaris/fs.c 2008-02-11 12:35:33.000000000 +0100
@@ -368,7 +368,7 @@ static int report_statvfs(struct vfsmoun
int j = strlen (p);
if (mnt->mnt_flags & MNT_NOSUID) i |= 2;
if (!sysv_valid_dev(inode->i_sb->s_dev))
return -EOVERFLOW;
-diff -NurpP --minimal linux-2.6.22.10/arch/um/Kconfig linux-2.6.22.10-vs2.3.0.29/arch/um/Kconfig
---- linux-2.6.22.10/arch/um/Kconfig 2007-07-09 13:18:07 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/um/Kconfig 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/um/Kconfig linux-2.6.22.18-vs2.3.0.32/arch/um/Kconfig
+--- linux-2.6.22.18/arch/um/Kconfig 2007-07-21 23:59:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/um/Kconfig 2008-02-11 12:35:33.000000000 +0100
@@ -316,6 +316,8 @@ source "drivers/connector/Kconfig"
source "fs/Kconfig"
source "security/Kconfig"
source "crypto/Kconfig"
-diff -NurpP --minimal linux-2.6.22.10/arch/um/kernel/trap.c linux-2.6.22.10-vs2.3.0.29/arch/um/kernel/trap.c
---- linux-2.6.22.10/arch/um/kernel/trap.c 2007-07-09 13:18:07 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/um/kernel/trap.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/um/kernel/trap.c linux-2.6.22.18-vs2.3.0.32/arch/um/kernel/trap.c
+--- linux-2.6.22.18/arch/um/kernel/trap.c 2007-07-21 23:59:50.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/um/kernel/trap.c 2008-02-11 12:35:33.000000000 +0100
@@ -210,7 +210,8 @@ unsigned long segv(struct faultinfo fi,
current->thread.arch.faultinfo = fi;
force_sig_info(SIGBUS, &si, current);
do_exit(SIGKILL);
} else {
BUG_ON(err != -EFAULT);
-diff -NurpP --minimal linux-2.6.22.10/arch/v850/Kconfig linux-2.6.22.10-vs2.3.0.29/arch/v850/Kconfig
---- linux-2.6.22.10/arch/v850/Kconfig 2007-07-09 13:18:08 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/v850/Kconfig 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/v850/Kconfig linux-2.6.22.18-vs2.3.0.32/arch/v850/Kconfig
+--- linux-2.6.22.18/arch/v850/Kconfig 2007-07-21 23:59:50.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/v850/Kconfig 2008-02-11 12:35:33.000000000 +0100
@@ -333,6 +333,8 @@ source "drivers/usb/Kconfig"
source "arch/v850/Kconfig.debug"
source "security/Kconfig"
source "crypto/Kconfig"
-diff -NurpP --minimal linux-2.6.22.10/arch/v850/kernel/process.c linux-2.6.22.10-vs2.3.0.29/arch/v850/kernel/process.c
---- linux-2.6.22.10/arch/v850/kernel/process.c 2007-07-09 13:18:08 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/v850/kernel/process.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/v850/kernel/process.c linux-2.6.22.18-vs2.3.0.32/arch/v850/kernel/process.c
+--- linux-2.6.22.18/arch/v850/kernel/process.c 2007-07-21 23:59:50.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/v850/kernel/process.c 2008-02-11 12:35:33.000000000 +0100
@@ -82,7 +82,7 @@ int kernel_thread (int (*fn)(void *), vo
/* Clone this thread. Note that we don't pass the clone syscall's
second argument -- it's ignored for calls from kernel mode (the
syscall = __NR_clone;
asm volatile ("trap " SYSCALL_SHORT_TRAP
: "=r" (ret), "=r" (syscall)
-diff -NurpP --minimal linux-2.6.22.10/arch/v850/kernel/ptrace.c linux-2.6.22.10-vs2.3.0.29/arch/v850/kernel/ptrace.c
---- linux-2.6.22.10/arch/v850/kernel/ptrace.c 2007-07-09 13:18:08 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/v850/kernel/ptrace.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/v850/kernel/ptrace.c linux-2.6.22.18-vs2.3.0.32/arch/v850/kernel/ptrace.c
+--- linux-2.6.22.18/arch/v850/kernel/ptrace.c 2007-07-21 23:59:50.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/v850/kernel/ptrace.c 2008-02-11 12:35:33.000000000 +0100
@@ -23,6 +23,7 @@
#include <linux/sched.h>
#include <linux/ptrace.h>
switch (request) {
unsigned long val, copied;
-diff -NurpP --minimal linux-2.6.22.10/arch/x86_64/Kconfig linux-2.6.22.10-vs2.3.0.29/arch/x86_64/Kconfig
---- linux-2.6.22.10/arch/x86_64/Kconfig 2007-07-09 13:18:08 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/x86_64/Kconfig 2007-08-05 20:53:12 +0200
-@@ -782,6 +782,8 @@ endmenu
-
- source "arch/x86_64/Kconfig.debug"
-
-+source "kernel/vserver/Kconfig"
-+
- source "security/Kconfig"
-
- source "crypto/Kconfig"
-diff -NurpP --minimal linux-2.6.22.10/arch/x86_64/ia32/ia32_aout.c linux-2.6.22.10-vs2.3.0.29/arch/x86_64/ia32/ia32_aout.c
---- linux-2.6.22.10/arch/x86_64/ia32/ia32_aout.c 2007-02-06 03:00:21 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/arch/x86_64/ia32/ia32_aout.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/x86_64/ia32/ia32_aout.c linux-2.6.22.18-vs2.3.0.32/arch/x86_64/ia32/ia32_aout.c
+--- linux-2.6.22.18/arch/x86_64/ia32/ia32_aout.c 2007-05-04 15:58:05.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/x86_64/ia32/ia32_aout.c 2008-02-11 12:35:33.000000000 +0100
@@ -25,6 +25,7 @@
#include <linux/binfmts.h>
#include <linux/personality.h>
#include <asm/system.h>
#include <asm/uaccess.h>
-diff -NurpP --minimal linux-2.6.22.10/arch/x86_64/ia32/ia32_binfmt.c linux-2.6.22.10-vs2.3.0.29/arch/x86_64/ia32/ia32_binfmt.c
---- linux-2.6.22.10/arch/x86_64/ia32/ia32_binfmt.c 2007-07-09 13:18:08 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/x86_64/ia32/ia32_binfmt.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/x86_64/ia32/ia32_binfmt.c linux-2.6.22.18-vs2.3.0.32/arch/x86_64/ia32/ia32_binfmt.c
+--- linux-2.6.22.18/arch/x86_64/ia32/ia32_binfmt.c 2007-07-21 23:59:50.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/x86_64/ia32/ia32_binfmt.c 2008-02-11 12:35:33.000000000 +0100
@@ -324,7 +324,8 @@ int ia32_setup_arg_pages(struct linux_bi
kmem_cache_free(vm_area_cachep, mpnt);
return ret;
}
for (i = 0 ; i < MAX_ARG_PAGES ; i++) {
-diff -NurpP --minimal linux-2.6.22.10/arch/x86_64/ia32/ia32entry.S linux-2.6.22.10-vs2.3.0.29/arch/x86_64/ia32/ia32entry.S
---- linux-2.6.22.10/arch/x86_64/ia32/ia32entry.S 2007-10-30 01:57:12 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/arch/x86_64/ia32/ia32entry.S 2007-09-30 14:57:59 +0200
+diff -Nurp linux-2.6.22.18/arch/x86_64/ia32/ia32entry.S linux-2.6.22.18-vs2.3.0.32/arch/x86_64/ia32/ia32entry.S
+--- linux-2.6.22.18/arch/x86_64/ia32/ia32entry.S 2007-09-29 14:11:36.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/x86_64/ia32/ia32entry.S 2008-02-11 12:35:33.000000000 +0100
@@ -680,7 +680,7 @@ ia32_sys_call_table:
.quad sys_tgkill /* 270 */
.quad compat_sys_utimes
.quad sys_mbind
.quad compat_sys_get_mempolicy /* 275 */
.quad sys_set_mempolicy
-diff -NurpP --minimal linux-2.6.22.10/arch/x86_64/ia32/sys_ia32.c linux-2.6.22.10-vs2.3.0.29/arch/x86_64/ia32/sys_ia32.c
---- linux-2.6.22.10/arch/x86_64/ia32/sys_ia32.c 2007-07-09 13:18:08 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/x86_64/ia32/sys_ia32.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/x86_64/ia32/syscall32.c linux-2.6.22.18-vs2.3.0.32/arch/x86_64/ia32/syscall32.c
+--- linux-2.6.22.18/arch/x86_64/ia32/syscall32.c 2007-07-21 23:59:50.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/x86_64/ia32/syscall32.c 2008-02-11 12:35:33.000000000 +0100
+@@ -10,6 +10,7 @@
+ #include <linux/init.h>
+ #include <linux/stringify.h>
+ #include <linux/security.h>
++#include <linux/vs_memory.h>
+ #include <asm/proto.h>
+ #include <asm/tlbflush.h>
+ #include <asm/ia32_unistd.h>
+diff -Nurp linux-2.6.22.18/arch/x86_64/ia32/sys_ia32.c linux-2.6.22.18-vs2.3.0.32/arch/x86_64/ia32/sys_ia32.c
+--- linux-2.6.22.18/arch/x86_64/ia32/sys_ia32.c 2007-07-21 23:59:50.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/x86_64/ia32/sys_ia32.c 2008-02-11 12:35:33.000000000 +0100
@@ -454,7 +454,7 @@ sys32_gettimeofday(struct compat_timeval
{
if (tv) {
if (put_tv32(tv, &ktv))
return -EFAULT;
}
-diff -NurpP --minimal linux-2.6.22.10/arch/x86_64/ia32/syscall32.c linux-2.6.22.10-vs2.3.0.29/arch/x86_64/ia32/syscall32.c
---- linux-2.6.22.10/arch/x86_64/ia32/syscall32.c 2007-07-09 13:18:08 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/x86_64/ia32/syscall32.c 2007-08-05 20:53:12 +0200
-@@ -10,6 +10,7 @@
- #include <linux/init.h>
- #include <linux/stringify.h>
- #include <linux/security.h>
-+#include <linux/vs_memory.h>
- #include <asm/proto.h>
- #include <asm/tlbflush.h>
- #include <asm/ia32_unistd.h>
-diff -NurpP --minimal linux-2.6.22.10/arch/x86_64/kernel/process.c linux-2.6.22.10-vs2.3.0.29/arch/x86_64/kernel/process.c
---- linux-2.6.22.10/arch/x86_64/kernel/process.c 2007-07-09 13:18:08 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/x86_64/kernel/process.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/x86_64/Kconfig linux-2.6.22.18-vs2.3.0.32/arch/x86_64/Kconfig
+--- linux-2.6.22.18/arch/x86_64/Kconfig 2007-07-21 23:59:50.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/x86_64/Kconfig 2008-02-11 12:35:33.000000000 +0100
+@@ -782,6 +782,8 @@ endmenu
+
+ source "arch/x86_64/Kconfig.debug"
+
++source "kernel/vserver/Kconfig"
++
+ source "security/Kconfig"
+
+ source "crypto/Kconfig"
+diff -Nurp linux-2.6.22.18/arch/x86_64/kernel/process.c linux-2.6.22.18-vs2.3.0.32/arch/x86_64/kernel/process.c
+--- linux-2.6.22.18/arch/x86_64/kernel/process.c 2007-07-21 23:59:50.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/x86_64/kernel/process.c 2008-02-11 12:35:33.000000000 +0100
@@ -54,7 +54,8 @@
asmlinkage extern void ret_from_fork(void);
init_utsname()->release,
(int)strcspn(init_utsname()->version, " "),
init_utsname()->version);
-diff -NurpP --minimal linux-2.6.22.10/arch/x86_64/kernel/traps.c linux-2.6.22.10-vs2.3.0.29/arch/x86_64/kernel/traps.c
---- linux-2.6.22.10/arch/x86_64/kernel/traps.c 2007-07-09 13:18:08 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/x86_64/kernel/traps.c 2007-09-30 17:11:18 +0200
+diff -Nurp linux-2.6.22.18/arch/x86_64/kernel/traps.c linux-2.6.22.18-vs2.3.0.32/arch/x86_64/kernel/traps.c
+--- linux-2.6.22.18/arch/x86_64/kernel/traps.c 2007-07-21 23:59:50.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/x86_64/kernel/traps.c 2008-02-11 12:35:33.000000000 +0100
@@ -33,6 +33,8 @@
#include <linux/uaccess.h>
#include <linux/bug.h>
regs->rip, regs->rsp, error_code);
force_sig(SIGSEGV, tsk);
-diff -NurpP --minimal linux-2.6.22.10/arch/x86_64/mm/fault.c linux-2.6.22.10-vs2.3.0.29/arch/x86_64/mm/fault.c
---- linux-2.6.22.10/arch/x86_64/mm/fault.c 2007-07-09 13:18:08 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/arch/x86_64/mm/fault.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/arch/x86_64/mm/fault.c linux-2.6.22.18-vs2.3.0.32/arch/x86_64/mm/fault.c
+--- linux-2.6.22.18/arch/x86_64/mm/fault.c 2007-07-21 23:59:50.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/arch/x86_64/mm/fault.c 2008-02-11 12:35:33.000000000 +0100
@@ -497,10 +497,10 @@ bad_area_nosemaphore:
if (exception_trace && unhandled_signal(tsk, SIGSEGV)) {
if (error_code & 4)
do_exit(SIGKILL);
goto no_context;
-Files linux-2.6.22.10/core and linux-2.6.22.10-vs2.3.0.29/core differ
-diff -NurpP --minimal linux-2.6.22.10/drivers/block/Kconfig linux-2.6.22.10-vs2.3.0.29/drivers/block/Kconfig
---- linux-2.6.22.10/drivers/block/Kconfig 2007-07-09 13:18:16 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/drivers/block/Kconfig 2007-08-05 20:53:12 +0200
-@@ -311,6 +311,13 @@ config BLK_DEV_CRYPTOLOOP
- instead, which can be configured to be on-disk compatible with the
- cryptoloop device.
-
-+config BLK_DEV_VROOT
-+ tristate "Virtual Root device support"
+diff -Nurp linux-2.6.22.18/Documentation/vserver/debug.txt linux-2.6.22.18-vs2.3.0.32/Documentation/vserver/debug.txt
+--- linux-2.6.22.18/Documentation/vserver/debug.txt 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/Documentation/vserver/debug.txt 2008-02-11 12:35:31.000000000 +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 -Nurp linux-2.6.22.18/drivers/block/Kconfig linux-2.6.22.18-vs2.3.0.32/drivers/block/Kconfig
+--- linux-2.6.22.18/drivers/block/Kconfig 2007-07-21 23:59:50.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/drivers/block/Kconfig 2008-02-11 12:35:33.000000000 +0100
+@@ -311,6 +311,13 @@ config BLK_DEV_CRYPTOLOOP
+ instead, which can be configured to be on-disk compatible with the
+ cryptoloop device.
+
++config BLK_DEV_VROOT
++ tristate "Virtual Root device support"
+ depends on QUOTACTL
+ ---help---
+ Saying Y here will allow you to use quota/fs ioctls on a shared
config BLK_DEV_NBD
tristate "Network block device support"
depends on NET
-diff -NurpP --minimal linux-2.6.22.10/drivers/block/Makefile linux-2.6.22.10-vs2.3.0.29/drivers/block/Makefile
---- linux-2.6.22.10/drivers/block/Makefile 2007-02-06 03:00:26 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/drivers/block/Makefile 2007-08-05 20:53:12 +0200
-@@ -28,4 +28,5 @@ obj-$(CONFIG_BLK_DEV_CRYPTOLOOP) += cryp
- obj-$(CONFIG_VIODASD) += viodasd.o
- obj-$(CONFIG_BLK_DEV_SX8) += sx8.o
- obj-$(CONFIG_BLK_DEV_UB) += ub.o
-+obj-$(CONFIG_BLK_DEV_VROOT) += vroot.o
-
-diff -NurpP --minimal linux-2.6.22.10/drivers/block/loop.c linux-2.6.22.10-vs2.3.0.29/drivers/block/loop.c
---- linux-2.6.22.10/drivers/block/loop.c 2007-07-09 13:18:16 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/drivers/block/loop.c 2007-08-16 04:06:51 +0200
+diff -Nurp linux-2.6.22.18/drivers/block/loop.c linux-2.6.22.18-vs2.3.0.32/drivers/block/loop.c
+--- linux-2.6.22.18/drivers/block/loop.c 2007-07-21 23:59:50.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/drivers/block/loop.c 2008-02-11 12:35:33.000000000 +0100
@@ -74,6 +74,7 @@
#include <linux/highmem.h>
#include <linux/gfp.h>
mutex_lock(&lo->lo_ctl_mutex);
lo->lo_refcnt++;
mutex_unlock(&lo->lo_ctl_mutex);
-diff -NurpP --minimal linux-2.6.22.10/drivers/block/vroot.c linux-2.6.22.10-vs2.3.0.29/drivers/block/vroot.c
---- linux-2.6.22.10/drivers/block/vroot.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/drivers/block/vroot.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/drivers/block/Makefile linux-2.6.22.18-vs2.3.0.32/drivers/block/Makefile
+--- linux-2.6.22.18/drivers/block/Makefile 2007-05-04 15:58:05.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/drivers/block/Makefile 2008-02-11 12:35:33.000000000 +0100
+@@ -28,4 +28,5 @@ obj-$(CONFIG_BLK_DEV_CRYPTOLOOP) += cryp
+ obj-$(CONFIG_VIODASD) += viodasd.o
+ obj-$(CONFIG_BLK_DEV_SX8) += sx8.o
+ obj-$(CONFIG_BLK_DEV_UB) += ub.o
++obj-$(CONFIG_BLK_DEV_VROOT) += vroot.o
+
+diff -Nurp linux-2.6.22.18/drivers/block/vroot.c linux-2.6.22.18-vs2.3.0.32/drivers/block/vroot.c
+--- linux-2.6.22.18/drivers/block/vroot.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/drivers/block/vroot.c 2008-02-11 12:35:33.000000000 +0100
@@ -0,0 +1,281 @@
+/*
+ * linux/drivers/block/vroot.c
+
+#endif
+
-diff -NurpP --minimal linux-2.6.22.10/drivers/char/sysrq.c linux-2.6.22.10-vs2.3.0.29/drivers/char/sysrq.c
---- linux-2.6.22.10/drivers/char/sysrq.c 2007-07-09 13:18:20 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/drivers/char/sysrq.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/drivers/char/sysrq.c linux-2.6.22.18-vs2.3.0.32/drivers/char/sysrq.c
+--- linux-2.6.22.18/drivers/char/sysrq.c 2007-07-21 23:59:53.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/drivers/char/sysrq.c 2008-02-11 12:35:33.000000000 +0100
@@ -36,6 +36,7 @@
#include <linux/kexec.h>
#include <linux/irq.h>
else
retval = -1;
return retval;
-diff -NurpP --minimal linux-2.6.22.10/drivers/char/tty_io.c linux-2.6.22.10-vs2.3.0.29/drivers/char/tty_io.c
---- linux-2.6.22.10/drivers/char/tty_io.c 2007-07-09 13:18:20 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/drivers/char/tty_io.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/drivers/char/tty_io.c linux-2.6.22.18-vs2.3.0.32/drivers/char/tty_io.c
+--- linux-2.6.22.18/drivers/char/tty_io.c 2007-07-21 23:59:53.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/drivers/char/tty_io.c 2008-02-11 12:35:33.000000000 +0100
@@ -103,6 +103,7 @@
#include <linux/selection.h>
if (pgrp_nr < 0)
return -EINVAL;
rcu_read_lock();
-diff -NurpP --minimal linux-2.6.22.10/drivers/infiniband/hw/ipath/ipath_user_pages.c linux-2.6.22.10-vs2.3.0.29/drivers/infiniband/hw/ipath/ipath_user_pages.c
---- linux-2.6.22.10/drivers/infiniband/hw/ipath/ipath_user_pages.c 2007-02-06 03:00:37 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/drivers/infiniband/hw/ipath/ipath_user_pages.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/drivers/infiniband/hw/ipath/ipath_user_pages.c linux-2.6.22.18-vs2.3.0.32/drivers/infiniband/hw/ipath/ipath_user_pages.c
+--- linux-2.6.22.18/drivers/infiniband/hw/ipath/ipath_user_pages.c 2007-05-04 15:58:07.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/drivers/infiniband/hw/ipath/ipath_user_pages.c 2008-02-11 12:35:33.000000000 +0100
@@ -33,6 +33,7 @@
#include <linux/mm.h>
up_write(&work->mm->mmap_sem);
mmput(work->mm);
kfree(work);
-diff -NurpP --minimal linux-2.6.22.10/drivers/md/dm-ioctl.c linux-2.6.22.10-vs2.3.0.29/drivers/md/dm-ioctl.c
---- linux-2.6.22.10/drivers/md/dm-ioctl.c 2007-05-02 19:24:50 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/drivers/md/dm-ioctl.c 2007-08-05 20:53:12 +0200
-@@ -15,6 +15,7 @@
- #include <linux/slab.h>
- #include <linux/dm-ioctl.h>
- #include <linux/hdreg.h>
-+#include <linux/vs_context.h>
-
- #include <asm/uaccess.h>
-
-@@ -100,7 +101,8 @@ static struct hash_cell *__get_name_cell
- unsigned int h = hash_str(str);
-
- list_for_each_entry (hc, _name_buckets + h, name_list)
-- if (!strcmp(hc->name, str)) {
-+ if (vx_check(dm_get_xid(hc->md), VS_WATCH_P | VS_IDENT) &&
-+ !strcmp(hc->name, str)) {
- dm_get(hc->md);
- return hc;
- }
-@@ -114,7 +116,8 @@ static struct hash_cell *__get_uuid_cell
- unsigned int h = hash_str(str);
-
- list_for_each_entry (hc, _uuid_buckets + h, uuid_list)
-- if (!strcmp(hc->uuid, str)) {
-+ if (vx_check(dm_get_xid(hc->md), VS_WATCH_P | VS_IDENT) &&
-+ !strcmp(hc->uuid, str)) {
- dm_get(hc->md);
- return hc;
- }
-@@ -349,6 +352,9 @@ typedef int (*ioctl_fn)(struct dm_ioctl
-
- static int remove_all(struct dm_ioctl *param, size_t param_size)
- {
-+ if (!vx_check(0, VS_ADMIN))
-+ return -EPERM;
-+
- dm_hash_remove_all(1);
- param->data_size = 0;
- return 0;
-@@ -396,6 +402,8 @@ static int list_devices(struct dm_ioctl
- */
- for (i = 0; i < NUM_BUCKETS; i++) {
- list_for_each_entry (hc, _name_buckets + i, name_list) {
-+ if (!vx_check(dm_get_xid(hc->md), VS_WATCH_P | VS_IDENT))
-+ continue;
- needed += sizeof(struct dm_name_list);
- needed += strlen(hc->name) + 1;
- needed += ALIGN_MASK;
-@@ -419,6 +427,8 @@ static int list_devices(struct dm_ioctl
- */
- for (i = 0; i < NUM_BUCKETS; i++) {
- list_for_each_entry (hc, _name_buckets + i, name_list) {
-+ if (!vx_check(dm_get_xid(hc->md), VS_WATCH_P | VS_IDENT))
-+ continue;
- if (old_nl)
- old_nl->next = (uint32_t) ((void *) nl -
- (void *) old_nl);
-@@ -609,10 +619,11 @@ static struct hash_cell *__find_device_h
- if (!md)
- goto out;
-
-- mdptr = dm_get_mdptr(md);
-+ if (vx_check(dm_get_xid(md), VS_WATCH_P | VS_IDENT))
-+ mdptr = dm_get_mdptr(md);
-+
- if (!mdptr)
- dm_put(md);
--
- out:
- return mdptr;
- }
-@@ -1409,8 +1420,8 @@ static int ctl_ioctl(struct inode *inode
- ioctl_fn fn = NULL;
- size_t param_size;
-
-- /* only root can play with this */
-- if (!capable(CAP_SYS_ADMIN))
-+ /* only root and certain contexts can play with this */
-+ if (!vx_capable(CAP_SYS_ADMIN, VXC_ADMIN_MAPPER))
- return -EACCES;
-
- if (_IOC_TYPE(command) != DM_IOCTL)
-diff -NurpP --minimal linux-2.6.22.10/drivers/md/dm.c linux-2.6.22.10-vs2.3.0.29/drivers/md/dm.c
---- linux-2.6.22.10/drivers/md/dm.c 2007-10-30 01:57:13 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/drivers/md/dm.c 2007-08-11 22:41:50 +0200
+diff -Nurp linux-2.6.22.18/drivers/md/dm.c linux-2.6.22.18-vs2.3.0.32/drivers/md/dm.c
+--- linux-2.6.22.18/drivers/md/dm.c 2007-08-12 03:54:36.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/drivers/md/dm.c 2008-02-11 12:35:33.000000000 +0100
@@ -21,6 +21,7 @@
#include <linux/hdreg.h>
#include <linux/blktrace_api.h>
md->queue = blk_alloc_queue(GFP_KERNEL);
if (!md->queue)
-diff -NurpP --minimal linux-2.6.22.10/drivers/md/dm.h linux-2.6.22.10-vs2.3.0.29/drivers/md/dm.h
---- linux-2.6.22.10/drivers/md/dm.h 2007-02-06 03:00:41 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/drivers/md/dm.h 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/drivers/md/dm.h linux-2.6.22.18-vs2.3.0.32/drivers/md/dm.h
+--- linux-2.6.22.18/drivers/md/dm.h 2007-05-04 15:58:08.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/drivers/md/dm.h 2008-02-11 12:35:33.000000000 +0100
@@ -91,6 +91,8 @@ void dm_put_target_type(struct target_ty
int dm_target_iterate(void (*iter_func)(struct target_type *tt,
void *param), void *param);
/*-----------------------------------------------------------------
* Useful inlines.
*---------------------------------------------------------------*/
-diff -NurpP --minimal linux-2.6.22.10/fs/attr.c linux-2.6.22.10-vs2.3.0.29/fs/attr.c
---- linux-2.6.22.10/fs/attr.c 2007-07-09 13:19:22 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/attr.c 2007-10-25 17:05:55 +0200
-@@ -14,6 +14,9 @@
- #include <linux/fcntl.h>
+diff -Nurp linux-2.6.22.18/drivers/md/dm-ioctl.c linux-2.6.22.18-vs2.3.0.32/drivers/md/dm-ioctl.c
+--- linux-2.6.22.18/drivers/md/dm-ioctl.c 2007-07-21 23:58:29.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/drivers/md/dm-ioctl.c 2008-02-11 12:35:33.000000000 +0100
+@@ -15,6 +15,7 @@
+ #include <linux/slab.h>
+ #include <linux/dm-ioctl.h>
+ #include <linux/hdreg.h>
++#include <linux/vs_context.h>
+
+ #include <asm/uaccess.h>
+
+@@ -100,7 +101,8 @@ static struct hash_cell *__get_name_cell
+ unsigned int h = hash_str(str);
+
+ list_for_each_entry (hc, _name_buckets + h, name_list)
+- if (!strcmp(hc->name, str)) {
++ if (vx_check(dm_get_xid(hc->md), VS_WATCH_P | VS_IDENT) &&
++ !strcmp(hc->name, str)) {
+ dm_get(hc->md);
+ return hc;
+ }
+@@ -114,7 +116,8 @@ static struct hash_cell *__get_uuid_cell
+ unsigned int h = hash_str(str);
+
+ list_for_each_entry (hc, _uuid_buckets + h, uuid_list)
+- if (!strcmp(hc->uuid, str)) {
++ if (vx_check(dm_get_xid(hc->md), VS_WATCH_P | VS_IDENT) &&
++ !strcmp(hc->uuid, str)) {
+ dm_get(hc->md);
+ return hc;
+ }
+@@ -349,6 +352,9 @@ typedef int (*ioctl_fn)(struct dm_ioctl
+
+ static int remove_all(struct dm_ioctl *param, size_t param_size)
+ {
++ if (!vx_check(0, VS_ADMIN))
++ return -EPERM;
++
+ dm_hash_remove_all(1);
+ param->data_size = 0;
+ return 0;
+@@ -396,6 +402,8 @@ static int list_devices(struct dm_ioctl
+ */
+ for (i = 0; i < NUM_BUCKETS; i++) {
+ list_for_each_entry (hc, _name_buckets + i, name_list) {
++ if (!vx_check(dm_get_xid(hc->md), VS_WATCH_P | VS_IDENT))
++ continue;
+ needed += sizeof(struct dm_name_list);
+ needed += strlen(hc->name) + 1;
+ needed += ALIGN_MASK;
+@@ -419,6 +427,8 @@ static int list_devices(struct dm_ioctl
+ */
+ for (i = 0; i < NUM_BUCKETS; i++) {
+ list_for_each_entry (hc, _name_buckets + i, name_list) {
++ if (!vx_check(dm_get_xid(hc->md), VS_WATCH_P | VS_IDENT))
++ continue;
+ if (old_nl)
+ old_nl->next = (uint32_t) ((void *) nl -
+ (void *) old_nl);
+@@ -609,10 +619,11 @@ static struct hash_cell *__find_device_h
+ if (!md)
+ goto out;
+
+- mdptr = dm_get_mdptr(md);
++ if (vx_check(dm_get_xid(md), VS_WATCH_P | VS_IDENT))
++ mdptr = dm_get_mdptr(md);
++
+ if (!mdptr)
+ dm_put(md);
+-
+ out:
+ return mdptr;
+ }
+@@ -1409,8 +1420,8 @@ static int ctl_ioctl(struct inode *inode
+ ioctl_fn fn = NULL;
+ size_t param_size;
+
+- /* only root can play with this */
+- if (!capable(CAP_SYS_ADMIN))
++ /* only root and certain contexts can play with this */
++ if (!vx_capable(CAP_SYS_ADMIN, VXC_ADMIN_MAPPER))
+ return -EACCES;
+
+ if (_IOC_TYPE(command) != DM_IOCTL)
+diff -Nurp linux-2.6.22.18/fs/attr.c linux-2.6.22.18-vs2.3.0.32/fs/attr.c
+--- linux-2.6.22.18/fs/attr.c 2007-07-22 00:00:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/attr.c 2008-02-11 12:35:33.000000000 +0100
+@@ -14,6 +14,9 @@
+ #include <linux/fcntl.h>
#include <linux/quotaops.h>
#include <linux/security.h>
+#include <linux/proc_fs.h>
error = DQUOT_TRANSFER(inode, attr) ? -EDQUOT : 0;
if (!error)
error = inode_setattr(inode, attr);
-diff -NurpP --minimal linux-2.6.22.10/fs/binfmt_aout.c linux-2.6.22.10-vs2.3.0.29/fs/binfmt_aout.c
---- linux-2.6.22.10/fs/binfmt_aout.c 2007-02-06 03:01:16 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/binfmt_aout.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/binfmt_aout.c linux-2.6.22.18-vs2.3.0.32/fs/binfmt_aout.c
+--- linux-2.6.22.18/fs/binfmt_aout.c 2007-05-04 15:58:21.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/binfmt_aout.c 2008-02-11 12:35:33.000000000 +0100
@@ -24,6 +24,7 @@
#include <linux/binfmts.h>
#include <linux/personality.h>
#include <asm/system.h>
#include <asm/uaccess.h>
-diff -NurpP --minimal linux-2.6.22.10/fs/binfmt_elf.c linux-2.6.22.10-vs2.3.0.29/fs/binfmt_elf.c
---- linux-2.6.22.10/fs/binfmt_elf.c 2007-07-09 13:19:22 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/binfmt_elf.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/binfmt_elf.c linux-2.6.22.18-vs2.3.0.32/fs/binfmt_elf.c
+--- linux-2.6.22.18/fs/binfmt_elf.c 2007-07-22 00:00:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/binfmt_elf.c 2008-02-11 12:35:33.000000000 +0100
@@ -39,6 +39,7 @@
#include <linux/random.h>
#include <linux/elf.h>
#include <asm/uaccess.h>
#include <asm/param.h>
#include <asm/page.h>
-diff -NurpP --minimal linux-2.6.22.10/fs/binfmt_flat.c linux-2.6.22.10-vs2.3.0.29/fs/binfmt_flat.c
---- linux-2.6.22.10/fs/binfmt_flat.c 2007-07-09 13:19:22 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/binfmt_flat.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/binfmt_flat.c linux-2.6.22.18-vs2.3.0.32/fs/binfmt_flat.c
+--- linux-2.6.22.18/fs/binfmt_flat.c 2007-07-22 00:00:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/binfmt_flat.c 2008-02-11 12:35:33.000000000 +0100
@@ -36,6 +36,7 @@
#include <linux/init.h>
#include <linux/flat.h>
#include <asm/byteorder.h>
#include <asm/system.h>
-diff -NurpP --minimal linux-2.6.22.10/fs/binfmt_som.c linux-2.6.22.10-vs2.3.0.29/fs/binfmt_som.c
---- linux-2.6.22.10/fs/binfmt_som.c 2006-11-30 21:19:19 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/binfmt_som.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/binfmt_som.c linux-2.6.22.18-vs2.3.0.32/fs/binfmt_som.c
+--- linux-2.6.22.18/fs/binfmt_som.c 2007-05-04 15:57:29.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/binfmt_som.c 2008-02-11 12:35:33.000000000 +0100
@@ -28,6 +28,7 @@
#include <linux/shm.h>
#include <linux/personality.h>
#include <asm/a.out.h>
#include <asm/uaccess.h>
-diff -NurpP --minimal linux-2.6.22.10/fs/block_dev.c linux-2.6.22.10-vs2.3.0.29/fs/block_dev.c
---- linux-2.6.22.10/fs/block_dev.c 2007-07-09 13:19:22 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/block_dev.c 2007-10-11 01:10:22 +0200
+diff -Nurp linux-2.6.22.18/fs/block_dev.c linux-2.6.22.18-vs2.3.0.32/fs/block_dev.c
+--- linux-2.6.22.18/fs/block_dev.c 2007-07-22 00:00:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/block_dev.c 2008-02-11 12:35:33.000000000 +0100
@@ -23,6 +23,7 @@
#include <linux/uio.h>
#include <linux/namei.h>
if (bdev) {
spin_lock(&bdev_lock);
if (!inode->i_bdev) {
-diff -NurpP --minimal linux-2.6.22.10/fs/char_dev.c linux-2.6.22.10-vs2.3.0.29/fs/char_dev.c
---- linux-2.6.22.10/fs/char_dev.c 2007-05-02 19:25:16 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/char_dev.c 2007-10-11 01:10:22 +0200
+diff -Nurp linux-2.6.22.18/fs/char_dev.c linux-2.6.22.18-vs2.3.0.32/fs/char_dev.c
+--- linux-2.6.22.18/fs/char_dev.c 2007-07-21 23:58:44.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/char_dev.c 2008-02-11 12:35:33.000000000 +0100
@@ -21,6 +21,7 @@
#include <linux/cdev.h>
#include <linux/mutex.h>
if (!kobj)
return -ENXIO;
new = container_of(kobj, struct cdev, kobj);
-diff -NurpP --minimal linux-2.6.22.10/fs/dcache.c linux-2.6.22.10-vs2.3.0.29/fs/dcache.c
---- linux-2.6.22.10/fs/dcache.c 2007-07-09 13:19:23 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/dcache.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/dcache.c linux-2.6.22.18-vs2.3.0.32/fs/dcache.c
+--- linux-2.6.22.18/fs/dcache.c 2007-07-22 00:00:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/dcache.c 2008-02-11 12:35:33.000000000 +0100
@@ -31,6 +31,7 @@
#include <linux/seqlock.h>
#include <linux/swap.h>
found = dentry;
}
spin_unlock(&dentry->d_lock);
-diff -NurpP --minimal linux-2.6.22.10/fs/devpts/inode.c linux-2.6.22.10-vs2.3.0.29/fs/devpts/inode.c
---- linux-2.6.22.10/fs/devpts/inode.c 2007-07-09 13:19:23 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/devpts/inode.c 2007-10-18 00:59:53 +0200
+diff -Nurp linux-2.6.22.18/fs/devpts/inode.c linux-2.6.22.18-vs2.3.0.32/fs/devpts/inode.c
+--- linux-2.6.22.18/fs/devpts/inode.c 2007-07-22 00:00:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/devpts/inode.c 2008-02-11 12:35:33.000000000 +0100
@@ -17,11 +17,26 @@
#include <linux/namei.h>
#include <linux/mount.h>
inode->i_private = tty;
dentry = get_node(number);
-diff -NurpP --minimal linux-2.6.22.10/fs/ecryptfs/inode.c linux-2.6.22.10-vs2.3.0.29/fs/ecryptfs/inode.c
---- linux-2.6.22.10/fs/ecryptfs/inode.c 2007-10-30 01:57:14 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ecryptfs/inode.c 2007-08-11 22:41:51 +0200
+diff -Nurp linux-2.6.22.18/fs/ecryptfs/inode.c linux-2.6.22.18-vs2.3.0.32/fs/ecryptfs/inode.c
+--- linux-2.6.22.18/fs/ecryptfs/inode.c 2007-08-12 03:54:36.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ecryptfs/inode.c 2008-02-11 12:35:33.000000000 +0100
@@ -423,7 +423,7 @@ static int ecryptfs_link(struct dentry *
dget(lower_new_dentry);
lower_dir_dentry = lock_parent(lower_new_dentry);
if (rc || !lower_dentry->d_inode)
goto out;
rc = ecryptfs_interpose(lower_dentry, dentry, dir->i_sb, 0);
-diff -NurpP --minimal linux-2.6.22.10/fs/exec.c linux-2.6.22.10-vs2.3.0.29/fs/exec.c
---- linux-2.6.22.10/fs/exec.c 2007-10-30 01:57:14 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/exec.c 2007-10-04 23:47:06 +0200
+diff -Nurp linux-2.6.22.18/fs/exec.c linux-2.6.22.18-vs2.3.0.32/fs/exec.c
+--- linux-2.6.22.18/fs/exec.c 2008-02-11 12:34:20.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/fs/exec.c 2008-02-11 12:35:33.000000000 +0100
@@ -51,6 +51,7 @@
#include <linux/cn_proc.h>
#include <linux/audit.h>
rc = snprintf(out_ptr, out_end - out_ptr,
"%lu", tv.tv_sec);
if (rc > out_end - out_ptr)
-diff -NurpP --minimal linux-2.6.22.10/fs/ext2/balloc.c linux-2.6.22.10-vs2.3.0.29/fs/ext2/balloc.c
---- linux-2.6.22.10/fs/ext2/balloc.c 2007-05-02 19:25:17 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext2/balloc.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ext2/balloc.c linux-2.6.22.18-vs2.3.0.32/fs/ext2/balloc.c
+--- linux-2.6.22.18/fs/ext2/balloc.c 2007-07-21 23:58:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext2/balloc.c 2008-02-11 12:35:33.000000000 +0100
@@ -16,6 +16,8 @@
#include <linux/sched.h>
#include <linux/buffer_head.h>
release_blocks(sb, es_alloc);
out_dquot:
DQUOT_FREE_BLOCK(inode, dq_alloc);
-diff -NurpP --minimal linux-2.6.22.10/fs/ext2/ext2.h linux-2.6.22.10-vs2.3.0.29/fs/ext2/ext2.h
---- linux-2.6.22.10/fs/ext2/ext2.h 2007-07-09 13:19:23 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext2/ext2.h 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ext2/ext2.h linux-2.6.22.18-vs2.3.0.32/fs/ext2/ext2.h
+--- linux-2.6.22.18/fs/ext2/ext2.h 2007-07-22 00:00:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext2/ext2.h 2008-02-11 12:35:33.000000000 +0100
@@ -167,6 +167,7 @@ extern const struct file_operations ext2
extern const struct address_space_operations ext2_aops;
extern const struct address_space_operations ext2_aops_xip;
/* namei.c */
extern const struct inode_operations ext2_dir_inode_operations;
-diff -NurpP --minimal linux-2.6.22.10/fs/ext2/file.c linux-2.6.22.10-vs2.3.0.29/fs/ext2/file.c
---- linux-2.6.22.10/fs/ext2/file.c 2007-05-02 19:25:17 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext2/file.c 2007-09-12 20:04:16 +0200
+diff -Nurp linux-2.6.22.18/fs/ext2/file.c linux-2.6.22.18-vs2.3.0.32/fs/ext2/file.c
+--- linux-2.6.22.18/fs/ext2/file.c 2007-07-21 23:58:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext2/file.c 2008-02-11 12:35:33.000000000 +0100
@@ -85,4 +85,5 @@ const struct inode_operations ext2_file_
#endif
.setattr = ext2_setattr,
.permission = ext2_permission,
+ .sync_flags = ext2_sync_flags,
};
-diff -NurpP --minimal linux-2.6.22.10/fs/ext2/ialloc.c linux-2.6.22.10-vs2.3.0.29/fs/ext2/ialloc.c
---- linux-2.6.22.10/fs/ext2/ialloc.c 2006-11-30 21:19:19 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext2/ialloc.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ext2/ialloc.c linux-2.6.22.18-vs2.3.0.32/fs/ext2/ialloc.c
+--- linux-2.6.22.18/fs/ext2/ialloc.c 2007-05-04 15:57:35.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext2/ialloc.c 2008-02-11 12:35:33.000000000 +0100
@@ -17,6 +17,8 @@
#include <linux/backing-dev.h>
#include <linux/buffer_head.h>
make_bad_inode(inode);
iput(inode);
return ERR_PTR(err);
-diff -NurpP --minimal linux-2.6.22.10/fs/ext2/inode.c linux-2.6.22.10-vs2.3.0.29/fs/ext2/inode.c
---- linux-2.6.22.10/fs/ext2/inode.c 2007-07-09 13:19:23 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext2/inode.c 2007-08-18 02:52:34 +0200
+diff -Nurp linux-2.6.22.18/fs/ext2/inode.c linux-2.6.22.18-vs2.3.0.32/fs/ext2/inode.c
+--- linux-2.6.22.18/fs/ext2/inode.c 2007-07-22 00:00:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext2/inode.c 2008-02-11 12:35:33.000000000 +0100
@@ -31,6 +31,7 @@
#include <linux/writeback.h>
#include <linux/buffer_head.h>
error = DQUOT_TRANSFER(inode, iattr) ? -EDQUOT : 0;
if (error)
return error;
-diff -NurpP --minimal linux-2.6.22.10/fs/ext2/ioctl.c linux-2.6.22.10-vs2.3.0.29/fs/ext2/ioctl.c
---- linux-2.6.22.10/fs/ext2/ioctl.c 2007-07-09 13:19:23 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext2/ioctl.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ext2/ioctl.c linux-2.6.22.18-vs2.3.0.32/fs/ext2/ioctl.c
+--- linux-2.6.22.18/fs/ext2/ioctl.c 2007-07-22 00:00:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext2/ioctl.c 2008-02-11 12:35:33.000000000 +0100
@@ -13,6 +13,7 @@
#include <linux/sched.h>
#include <linux/compat.h>
return -EROFS;
if (get_user(inode->i_generation, (int __user *) arg))
return -EFAULT;
-diff -NurpP --minimal linux-2.6.22.10/fs/ext2/namei.c linux-2.6.22.10-vs2.3.0.29/fs/ext2/namei.c
---- linux-2.6.22.10/fs/ext2/namei.c 2007-05-02 19:25:17 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext2/namei.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ext2/namei.c linux-2.6.22.18-vs2.3.0.32/fs/ext2/namei.c
+--- linux-2.6.22.18/fs/ext2/namei.c 2007-07-21 23:58:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext2/namei.c 2008-02-11 12:35:33.000000000 +0100
@@ -31,6 +31,7 @@
*/
.permission = ext2_permission,
+ .sync_flags = ext2_sync_flags,
};
-diff -NurpP --minimal linux-2.6.22.10/fs/ext2/super.c linux-2.6.22.10-vs2.3.0.29/fs/ext2/super.c
---- linux-2.6.22.10/fs/ext2/super.c 2007-07-09 13:19:23 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext2/super.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ext2/super.c linux-2.6.22.18-vs2.3.0.32/fs/ext2/super.c
+--- linux-2.6.22.18/fs/ext2/super.c 2007-07-22 00:00:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext2/super.c 2008-02-11 12:35:33.000000000 +0100
@@ -321,7 +321,7 @@ enum {
Opt_err_ro, Opt_nouid32, Opt_nocheck, Opt_debug,
Opt_oldalloc, Opt_orlov, Opt_nobh, Opt_user_xattr, Opt_nouser_xattr,
sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
((sbi->s_mount_opt & EXT2_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0);
-diff -NurpP --minimal linux-2.6.22.10/fs/ext2/symlink.c linux-2.6.22.10-vs2.3.0.29/fs/ext2/symlink.c
---- linux-2.6.22.10/fs/ext2/symlink.c 2007-05-02 19:25:17 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext2/symlink.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ext2/symlink.c linux-2.6.22.18-vs2.3.0.32/fs/ext2/symlink.c
+--- linux-2.6.22.18/fs/ext2/symlink.c 2007-07-21 23:58:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext2/symlink.c 2008-02-11 12:35:33.000000000 +0100
@@ -38,6 +38,7 @@ const struct inode_operations ext2_symli
.listxattr = ext2_listxattr,
.removexattr = generic_removexattr,
#endif
+ .sync_flags = ext2_sync_flags,
};
-diff -NurpP --minimal linux-2.6.22.10/fs/ext2/xattr.c linux-2.6.22.10-vs2.3.0.29/fs/ext2/xattr.c
---- linux-2.6.22.10/fs/ext2/xattr.c 2007-02-06 03:01:18 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext2/xattr.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ext2/xattr.c linux-2.6.22.18-vs2.3.0.32/fs/ext2/xattr.c
+--- linux-2.6.22.18/fs/ext2/xattr.c 2007-05-04 15:58:21.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext2/xattr.c 2008-02-11 12:35:33.000000000 +0100
@@ -60,6 +60,7 @@
#include <linux/mbcache.h>
#include <linux/quotaops.h>
DQUOT_FREE_BLOCK(inode, 1);
}
EXT2_I(inode)->i_file_acl = 0;
-diff -NurpP --minimal linux-2.6.22.10/fs/ext3/balloc.c linux-2.6.22.10-vs2.3.0.29/fs/ext3/balloc.c
---- linux-2.6.22.10/fs/ext3/balloc.c 2007-05-02 19:25:17 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext3/balloc.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ext3/balloc.c linux-2.6.22.18-vs2.3.0.32/fs/ext3/balloc.c
+--- linux-2.6.22.18/fs/ext3/balloc.c 2007-07-21 23:58:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext3/balloc.c 2008-02-11 12:35:33.000000000 +0100
@@ -19,6 +19,8 @@
#include <linux/ext3_jbd.h>
#include <linux/quotaops.h>
if (fatal) {
*errp = fatal;
ext3_std_error(sb, fatal);
-diff -NurpP --minimal linux-2.6.22.10/fs/ext3/file.c linux-2.6.22.10-vs2.3.0.29/fs/ext3/file.c
---- linux-2.6.22.10/fs/ext3/file.c 2007-05-02 19:25:17 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext3/file.c 2007-09-12 20:04:16 +0200
+diff -Nurp linux-2.6.22.18/fs/ext3/file.c linux-2.6.22.18-vs2.3.0.32/fs/ext3/file.c
+--- linux-2.6.22.18/fs/ext3/file.c 2007-07-21 23:58:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext3/file.c 2008-02-11 12:35:33.000000000 +0100
@@ -135,5 +135,6 @@ const struct inode_operations ext3_file_
.removexattr = generic_removexattr,
#endif
+ .sync_flags = ext3_sync_flags,
};
-diff -NurpP --minimal linux-2.6.22.10/fs/ext3/ialloc.c linux-2.6.22.10-vs2.3.0.29/fs/ext3/ialloc.c
---- linux-2.6.22.10/fs/ext3/ialloc.c 2006-11-30 21:19:19 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext3/ialloc.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ext3/ialloc.c linux-2.6.22.18-vs2.3.0.32/fs/ext3/ialloc.c
+--- linux-2.6.22.18/fs/ext3/ialloc.c 2007-05-04 15:57:35.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext3/ialloc.c 2008-02-11 12:35:33.000000000 +0100
@@ -23,6 +23,8 @@
#include <linux/buffer_head.h>
#include <linux/random.h>
inode->i_flags |= S_NOQUOTA;
inode->i_nlink = 0;
iput(inode);
-diff -NurpP --minimal linux-2.6.22.10/fs/ext3/inode.c linux-2.6.22.10-vs2.3.0.29/fs/ext3/inode.c
---- linux-2.6.22.10/fs/ext3/inode.c 2007-07-09 13:19:23 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext3/inode.c 2007-08-18 02:52:34 +0200
+diff -Nurp linux-2.6.22.18/fs/ext3/inode.c linux-2.6.22.18-vs2.3.0.32/fs/ext3/inode.c
+--- linux-2.6.22.18/fs/ext3/inode.c 2007-07-22 00:00:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext3/inode.c 2008-02-11 12:35:33.000000000 +0100
@@ -36,6 +36,7 @@
#include <linux/mpage.h>
#include <linux/uio.h>
error = ext3_mark_inode_dirty(handle, inode);
ext3_journal_stop(handle);
}
-diff -NurpP --minimal linux-2.6.22.10/fs/ext3/ioctl.c linux-2.6.22.10-vs2.3.0.29/fs/ext3/ioctl.c
---- linux-2.6.22.10/fs/ext3/ioctl.c 2007-07-09 13:19:23 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext3/ioctl.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ext3/ioctl.c linux-2.6.22.18-vs2.3.0.32/fs/ext3/ioctl.c
+--- linux-2.6.22.18/fs/ext3/ioctl.c 2007-07-22 00:00:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext3/ioctl.c 2008-02-11 12:35:34.000000000 +0100
@@ -8,6 +8,7 @@
*/
return -EROFS;
if (copy_from_user(&input, (struct ext3_new_group_input __user *)arg,
-diff -NurpP --minimal linux-2.6.22.10/fs/ext3/namei.c linux-2.6.22.10-vs2.3.0.29/fs/ext3/namei.c
---- linux-2.6.22.10/fs/ext3/namei.c 2007-10-30 01:57:14 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext3/namei.c 2007-09-30 14:58:01 +0200
+diff -Nurp linux-2.6.22.18/fs/ext3/namei.c linux-2.6.22.18-vs2.3.0.32/fs/ext3/namei.c
+--- linux-2.6.22.18/fs/ext3/namei.c 2007-09-29 14:11:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext3/namei.c 2008-02-11 12:35:34.000000000 +0100
@@ -36,6 +36,7 @@
#include <linux/quotaops.h>
#include <linux/buffer_head.h>
.permission = ext3_permission,
+ .sync_flags = ext3_sync_flags,
};
-diff -NurpP --minimal linux-2.6.22.10/fs/ext3/super.c linux-2.6.22.10-vs2.3.0.29/fs/ext3/super.c
---- linux-2.6.22.10/fs/ext3/super.c 2007-07-09 13:19:23 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext3/super.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ext3/super.c linux-2.6.22.18-vs2.3.0.32/fs/ext3/super.c
+--- linux-2.6.22.18/fs/ext3/super.c 2007-07-22 00:00:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext3/super.c 2008-02-11 12:35:34.000000000 +0100
@@ -674,7 +674,7 @@ enum {
Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota,
sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
((sbi->s_mount_opt & EXT3_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0);
-diff -NurpP --minimal linux-2.6.22.10/fs/ext3/symlink.c linux-2.6.22.10-vs2.3.0.29/fs/ext3/symlink.c
---- linux-2.6.22.10/fs/ext3/symlink.c 2007-05-02 19:25:17 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext3/symlink.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ext3/symlink.c linux-2.6.22.18-vs2.3.0.32/fs/ext3/symlink.c
+--- linux-2.6.22.18/fs/ext3/symlink.c 2007-07-21 23:58:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext3/symlink.c 2008-02-11 12:35:34.000000000 +0100
@@ -40,6 +40,7 @@ const struct inode_operations ext3_symli
.listxattr = ext3_listxattr,
.removexattr = generic_removexattr,
#endif
+ .sync_flags = ext3_sync_flags,
};
-diff -NurpP --minimal linux-2.6.22.10/fs/ext3/xattr.c linux-2.6.22.10-vs2.3.0.29/fs/ext3/xattr.c
---- linux-2.6.22.10/fs/ext3/xattr.c 2007-05-02 19:25:17 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext3/xattr.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ext3/xattr.c linux-2.6.22.18-vs2.3.0.32/fs/ext3/xattr.c
+--- linux-2.6.22.18/fs/ext3/xattr.c 2007-07-21 23:58:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext3/xattr.c 2008-02-11 12:35:34.000000000 +0100
@@ -58,6 +58,7 @@
#include <linux/mbcache.h>
#include <linux/quotaops.h>
goto cleanup;
bad_block:
-diff -NurpP --minimal linux-2.6.22.10/fs/ext4/balloc.c linux-2.6.22.10-vs2.3.0.29/fs/ext4/balloc.c
---- linux-2.6.22.10/fs/ext4/balloc.c 2007-07-09 13:19:23 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext4/balloc.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ext4/balloc.c linux-2.6.22.18-vs2.3.0.32/fs/ext4/balloc.c
+--- linux-2.6.22.18/fs/ext4/balloc.c 2007-07-22 00:00:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext4/balloc.c 2008-02-11 12:35:34.000000000 +0100
@@ -19,6 +19,8 @@
#include <linux/ext4_jbd2.h>
#include <linux/quotaops.h>
if (fatal) {
*errp = fatal;
ext4_std_error(sb, fatal);
-diff -NurpP --minimal linux-2.6.22.10/fs/ext4/file.c linux-2.6.22.10-vs2.3.0.29/fs/ext4/file.c
---- linux-2.6.22.10/fs/ext4/file.c 2007-05-02 19:25:17 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext4/file.c 2007-09-12 20:04:16 +0200
+diff -Nurp linux-2.6.22.18/fs/ext4/file.c linux-2.6.22.18-vs2.3.0.32/fs/ext4/file.c
+--- linux-2.6.22.18/fs/ext4/file.c 2007-07-21 23:58:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext4/file.c 2008-02-11 12:35:34.000000000 +0100
@@ -135,5 +135,6 @@ const struct inode_operations ext4_file_
.removexattr = generic_removexattr,
#endif
+ .sync_flags = ext4_sync_flags,
};
-diff -NurpP --minimal linux-2.6.22.10/fs/ext4/ialloc.c linux-2.6.22.10-vs2.3.0.29/fs/ext4/ialloc.c
---- linux-2.6.22.10/fs/ext4/ialloc.c 2006-11-30 21:19:20 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext4/ialloc.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ext4/ialloc.c linux-2.6.22.18-vs2.3.0.32/fs/ext4/ialloc.c
+--- linux-2.6.22.18/fs/ext4/ialloc.c 2007-05-04 15:57:35.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext4/ialloc.c 2008-02-11 12:35:34.000000000 +0100
@@ -24,6 +24,8 @@
#include <linux/random.h>
#include <linux/bitops.h>
inode->i_flags |= S_NOQUOTA;
inode->i_nlink = 0;
iput(inode);
-diff -NurpP --minimal linux-2.6.22.10/fs/ext4/inode.c linux-2.6.22.10-vs2.3.0.29/fs/ext4/inode.c
---- linux-2.6.22.10/fs/ext4/inode.c 2007-07-09 13:19:23 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext4/inode.c 2007-08-18 02:52:34 +0200
+diff -Nurp linux-2.6.22.18/fs/ext4/inode.c linux-2.6.22.18-vs2.3.0.32/fs/ext4/inode.c
+--- linux-2.6.22.18/fs/ext4/inode.c 2007-07-22 00:00:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext4/inode.c 2008-02-11 12:35:34.000000000 +0100
@@ -36,6 +36,7 @@
#include <linux/mpage.h>
#include <linux/uio.h>
error = ext4_mark_inode_dirty(handle, inode);
ext4_journal_stop(handle);
}
-diff -NurpP --minimal linux-2.6.22.10/fs/ext4/ioctl.c linux-2.6.22.10-vs2.3.0.29/fs/ext4/ioctl.c
---- linux-2.6.22.10/fs/ext4/ioctl.c 2007-02-06 03:01:18 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext4/ioctl.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ext4/ioctl.c linux-2.6.22.18-vs2.3.0.32/fs/ext4/ioctl.c
+--- linux-2.6.22.18/fs/ext4/ioctl.c 2007-05-04 15:58:21.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext4/ioctl.c 2008-02-11 12:35:34.000000000 +0100
@@ -8,6 +8,7 @@
*/
return -EROFS;
if (copy_from_user(&input, (struct ext4_new_group_input __user *)arg,
-diff -NurpP --minimal linux-2.6.22.10/fs/ext4/namei.c linux-2.6.22.10-vs2.3.0.29/fs/ext4/namei.c
---- linux-2.6.22.10/fs/ext4/namei.c 2007-10-30 01:57:14 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext4/namei.c 2007-09-30 14:58:01 +0200
+diff -Nurp linux-2.6.22.18/fs/ext4/namei.c linux-2.6.22.18-vs2.3.0.32/fs/ext4/namei.c
+--- linux-2.6.22.18/fs/ext4/namei.c 2007-09-29 14:11:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext4/namei.c 2008-02-11 12:35:34.000000000 +0100
@@ -36,6 +36,7 @@
#include <linux/quotaops.h>
#include <linux/buffer_head.h>
.permission = ext4_permission,
+ .sync_flags = ext4_sync_flags,
};
-diff -NurpP --minimal linux-2.6.22.10/fs/ext4/super.c linux-2.6.22.10-vs2.3.0.29/fs/ext4/super.c
---- linux-2.6.22.10/fs/ext4/super.c 2007-07-09 13:19:23 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext4/super.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ext4/super.c linux-2.6.22.18-vs2.3.0.32/fs/ext4/super.c
+--- linux-2.6.22.18/fs/ext4/super.c 2007-07-22 00:00:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext4/super.c 2008-02-11 12:35:34.000000000 +0100
@@ -725,7 +725,7 @@ enum {
Opt_usrjquota, Opt_grpjquota, Opt_offusrjquota, Opt_offgrpjquota,
Opt_jqfmt_vfsold, Opt_jqfmt_vfsv0, Opt_quota, Opt_noquota,
sb->s_flags = (sb->s_flags & ~MS_POSIXACL) |
((sbi->s_mount_opt & EXT4_MOUNT_POSIX_ACL) ? MS_POSIXACL : 0);
-diff -NurpP --minimal linux-2.6.22.10/fs/ext4/symlink.c linux-2.6.22.10-vs2.3.0.29/fs/ext4/symlink.c
---- linux-2.6.22.10/fs/ext4/symlink.c 2007-05-02 19:25:17 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext4/symlink.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ext4/symlink.c linux-2.6.22.18-vs2.3.0.32/fs/ext4/symlink.c
+--- linux-2.6.22.18/fs/ext4/symlink.c 2007-07-21 23:58:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext4/symlink.c 2008-02-11 12:35:34.000000000 +0100
@@ -40,6 +40,7 @@ const struct inode_operations ext4_symli
.listxattr = ext4_listxattr,
.removexattr = generic_removexattr,
#endif
+ .sync_flags = ext4_sync_flags,
};
-diff -NurpP --minimal linux-2.6.22.10/fs/ext4/xattr.c linux-2.6.22.10-vs2.3.0.29/fs/ext4/xattr.c
---- linux-2.6.22.10/fs/ext4/xattr.c 2007-05-02 19:25:17 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ext4/xattr.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ext4/xattr.c linux-2.6.22.18-vs2.3.0.32/fs/ext4/xattr.c
+--- linux-2.6.22.18/fs/ext4/xattr.c 2007-07-21 23:58:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ext4/xattr.c 2008-02-11 12:35:34.000000000 +0100
@@ -58,6 +58,7 @@
#include <linux/mbcache.h>
#include <linux/quotaops.h>
goto cleanup;
bad_block:
-diff -NurpP --minimal linux-2.6.22.10/fs/fcntl.c linux-2.6.22.10-vs2.3.0.29/fs/fcntl.c
---- linux-2.6.22.10/fs/fcntl.c 2007-02-06 03:01:18 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/fcntl.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/fcntl.c linux-2.6.22.18-vs2.3.0.32/fs/fcntl.c
+--- linux-2.6.22.18/fs/fcntl.c 2007-05-04 15:58:21.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/fcntl.c 2008-02-11 12:35:34.000000000 +0100
@@ -18,6 +18,7 @@
#include <linux/ptrace.h>
#include <linux/signal.h>
err = newfd;
out:
return err;
-diff -NurpP --minimal linux-2.6.22.10/fs/file_table.c linux-2.6.22.10-vs2.3.0.29/fs/file_table.c
---- linux-2.6.22.10/fs/file_table.c 2007-07-09 13:19:23 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/file_table.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/file_table.c linux-2.6.22.18-vs2.3.0.32/fs/file_table.c
+--- linux-2.6.22.18/fs/file_table.c 2007-07-22 00:00:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/file_table.c 2008-02-11 12:35:34.000000000 +0100
@@ -20,6 +20,8 @@
#include <linux/fsnotify.h>
#include <linux/sysctl.h>
file_kill(file);
file_free(file);
}
-diff -NurpP --minimal linux-2.6.22.10/fs/hfsplus/ioctl.c linux-2.6.22.10-vs2.3.0.29/fs/hfsplus/ioctl.c
---- linux-2.6.22.10/fs/hfsplus/ioctl.c 2006-11-30 21:19:25 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/hfsplus/ioctl.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/hfsplus/ioctl.c linux-2.6.22.18-vs2.3.0.32/fs/hfsplus/ioctl.c
+--- linux-2.6.22.18/fs/hfsplus/ioctl.c 2007-05-04 15:57:35.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/hfsplus/ioctl.c 2008-02-11 12:35:34.000000000 +0100
@@ -16,6 +16,7 @@
#include <linux/fs.h>
#include <linux/sched.h>
return -EROFS;
if ((current->fsuid != inode->i_uid) && !capable(CAP_FOWNER))
-diff -NurpP --minimal linux-2.6.22.10/fs/inode.c linux-2.6.22.10-vs2.3.0.29/fs/inode.c
---- linux-2.6.22.10/fs/inode.c 2007-07-09 13:19:24 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/inode.c 2007-10-11 01:10:22 +0200
+diff -Nurp linux-2.6.22.18/fs/inode.c linux-2.6.22.18-vs2.3.0.32/fs/inode.c
+--- linux-2.6.22.18/fs/inode.c 2007-07-22 00:00:16.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/inode.c 2008-02-11 12:35:34.000000000 +0100
@@ -115,6 +115,9 @@ static struct inode *alloc_inode(struct
struct address_space * const mapping = &inode->i_data;
} else if (S_ISFIFO(mode))
inode->i_fop = &def_fifo_fops;
else if (S_ISSOCK(mode))
-diff -NurpP --minimal linux-2.6.22.10/fs/ioctl.c linux-2.6.22.10-vs2.3.0.29/fs/ioctl.c
---- linux-2.6.22.10/fs/ioctl.c 2007-07-09 13:19:24 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ioctl.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ioctl.c linux-2.6.22.18-vs2.3.0.32/fs/ioctl.c
+--- linux-2.6.22.18/fs/ioctl.c 2007-07-22 00:00:16.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ioctl.c 2008-02-11 12:35:34.000000000 +0100
@@ -13,6 +13,9 @@
#include <linux/security.h>
#include <linux/module.h>
#include <asm/uaccess.h>
#include <asm/ioctls.h>
-diff -NurpP --minimal linux-2.6.22.10/fs/ioprio.c linux-2.6.22.10-vs2.3.0.29/fs/ioprio.c
---- linux-2.6.22.10/fs/ioprio.c 2007-05-02 19:25:18 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ioprio.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/ioprio.c linux-2.6.22.18-vs2.3.0.32/fs/ioprio.c
+--- linux-2.6.22.18/fs/ioprio.c 2007-07-21 23:58:45.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ioprio.c 2008-02-11 12:35:34.000000000 +0100
@@ -25,6 +25,7 @@
#include <linux/capability.h>
#include <linux/syscalls.h>
if (!user)
break;
-diff -NurpP --minimal linux-2.6.22.10/fs/jffs2/dir.c linux-2.6.22.10-vs2.3.0.29/fs/jffs2/dir.c
---- linux-2.6.22.10/fs/jffs2/dir.c 2007-07-09 13:19:26 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jffs2/dir.c 2007-10-05 15:07:22 +0200
+diff -Nurp linux-2.6.22.18/fs/jffs2/dir.c linux-2.6.22.18-vs2.3.0.32/fs/jffs2/dir.c
+--- linux-2.6.22.18/fs/jffs2/dir.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jffs2/dir.c 2008-02-11 12:35:34.000000000 +0100
@@ -32,7 +32,9 @@ static int jffs2_mkdir (struct inode *,s
static int jffs2_rmdir (struct inode *,struct dentry *);
static int jffs2_mknod (struct inode *,struct dentry *,int,dev_t);
.setxattr = jffs2_setxattr,
.getxattr = jffs2_getxattr,
.listxattr = jffs2_listxattr,
-diff -NurpP --minimal linux-2.6.22.10/fs/jffs2/file.c linux-2.6.22.10-vs2.3.0.29/fs/jffs2/file.c
---- linux-2.6.22.10/fs/jffs2/file.c 2007-07-09 13:19:26 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jffs2/file.c 2007-10-01 20:52:25 +0200
+diff -Nurp linux-2.6.22.18/fs/jffs2/file.c linux-2.6.22.18-vs2.3.0.32/fs/jffs2/file.c
+--- linux-2.6.22.18/fs/jffs2/file.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jffs2/file.c 2008-02-11 12:35:34.000000000 +0100
@@ -17,6 +17,7 @@
#include <linux/highmem.h>
#include <linux/crc32.h>
/* In 2.4, it was already kmapped by generic_file_write(). Doesn't
hurt to do it again. The alternative is ifdefs, which are ugly. */
-diff -NurpP --minimal linux-2.6.22.10/fs/jffs2/fs.c linux-2.6.22.10-vs2.3.0.29/fs/jffs2/fs.c
---- linux-2.6.22.10/fs/jffs2/fs.c 2007-10-30 01:57:14 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jffs2/fs.c 2007-09-30 14:58:01 +0200
+diff -Nurp linux-2.6.22.18/fs/jffs2/fs.c linux-2.6.22.18-vs2.3.0.32/fs/jffs2/fs.c
+--- linux-2.6.22.18/fs/jffs2/fs.c 2007-09-29 14:11:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jffs2/fs.c 2008-02-11 12:35:34.000000000 +0100
@@ -20,6 +20,7 @@
#include <linux/vmalloc.h>
#include <linux/vfs.h>
return inode;
}
-diff -NurpP --minimal linux-2.6.22.10/fs/jffs2/gc.c linux-2.6.22.10-vs2.3.0.29/fs/jffs2/gc.c
---- linux-2.6.22.10/fs/jffs2/gc.c 2007-07-09 13:19:26 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jffs2/gc.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/jffs2/gc.c linux-2.6.22.18-vs2.3.0.32/fs/jffs2/gc.c
+--- linux-2.6.22.18/fs/jffs2/gc.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jffs2/gc.c 2008-02-11 12:35:34.000000000 +0100
@@ -735,6 +735,7 @@ static int jffs2_garbage_collect_metadat
ri.mode = cpu_to_jemode(JFFS2_F_I_MODE(f));
ri.uid = cpu_to_je16(JFFS2_F_I_UID(f));
ri.isize = cpu_to_je32(JFFS2_F_I_SIZE(f));
ri.atime = cpu_to_je32(JFFS2_F_I_ATIME(f));
ri.ctime = cpu_to_je32(JFFS2_F_I_CTIME(f));
-diff -NurpP --minimal linux-2.6.22.10/fs/jffs2/ioctl.c linux-2.6.22.10-vs2.3.0.29/fs/jffs2/ioctl.c
---- linux-2.6.22.10/fs/jffs2/ioctl.c 2007-07-09 13:19:26 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jffs2/ioctl.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/jffs2/ioctl.c linux-2.6.22.18-vs2.3.0.32/fs/jffs2/ioctl.c
+--- linux-2.6.22.18/fs/jffs2/ioctl.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jffs2/ioctl.c 2008-02-11 12:35:34.000000000 +0100
@@ -10,12 +10,67 @@
*/
+ }
}
-diff -NurpP --minimal linux-2.6.22.10/fs/jffs2/jffs2_fs_sb.h linux-2.6.22.10-vs2.3.0.29/fs/jffs2/jffs2_fs_sb.h
---- linux-2.6.22.10/fs/jffs2/jffs2_fs_sb.h 2007-07-09 13:19:26 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jffs2/jffs2_fs_sb.h 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/jffs2/jffs2_fs_sb.h linux-2.6.22.18-vs2.3.0.32/fs/jffs2/jffs2_fs_sb.h
+--- linux-2.6.22.18/fs/jffs2/jffs2_fs_sb.h 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jffs2/jffs2_fs_sb.h 2008-02-11 12:35:34.000000000 +0100
@@ -39,6 +39,7 @@ struct jffs2_sb_info {
uint32_t checked_ino;
struct task_struct *gc_task; /* GC task struct */
struct completion gc_thread_start; /* GC thread start completion */
-diff -NurpP --minimal linux-2.6.22.10/fs/jffs2/nodelist.h linux-2.6.22.10-vs2.3.0.29/fs/jffs2/nodelist.h
---- linux-2.6.22.10/fs/jffs2/nodelist.h 2007-07-09 13:19:26 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jffs2/nodelist.h 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/jffs2/nodelist.h linux-2.6.22.18-vs2.3.0.32/fs/jffs2/nodelist.h
+--- linux-2.6.22.18/fs/jffs2/nodelist.h 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jffs2/nodelist.h 2008-02-11 12:35:34.000000000 +0100
@@ -47,25 +47,25 @@
#elif defined(JFFS2_BIG_ENDIAN)
#define cpu_to_je16(x) ((jint16_t){cpu_to_be16(x)})
#else
#error wibble
#endif
-diff -NurpP --minimal linux-2.6.22.10/fs/jffs2/os-linux.h linux-2.6.22.10-vs2.3.0.29/fs/jffs2/os-linux.h
---- linux-2.6.22.10/fs/jffs2/os-linux.h 2007-07-09 13:19:26 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jffs2/os-linux.h 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/jffs2/os-linux.h linux-2.6.22.18-vs2.3.0.32/fs/jffs2/os-linux.h
+--- linux-2.6.22.18/fs/jffs2/os-linux.h 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jffs2/os-linux.h 2008-02-11 12:35:34.000000000 +0100
@@ -29,6 +29,7 @@ struct kvec;
#define JFFS2_F_I_MODE(f) (OFNI_EDONI_2SFFJ(f)->i_mode)
#define JFFS2_F_I_UID(f) (OFNI_EDONI_2SFFJ(f)->i_uid)
#endif /* __JFFS2_OS_LINUX_H__ */
-diff -NurpP --minimal linux-2.6.22.10/fs/jffs2/readinode.c linux-2.6.22.10-vs2.3.0.29/fs/jffs2/readinode.c
---- linux-2.6.22.10/fs/jffs2/readinode.c 2007-07-09 13:19:26 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jffs2/readinode.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/jffs2/readinode.c linux-2.6.22.18-vs2.3.0.32/fs/jffs2/readinode.c
+--- linux-2.6.22.18/fs/jffs2/readinode.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jffs2/readinode.c 2008-02-11 12:35:34.000000000 +0100
@@ -1182,6 +1182,8 @@ static int jffs2_do_read_inode_internal(
latest_node->isize = cpu_to_je32(0);
latest_node->gid = cpu_to_je16(0);
if (f->inocache->state == INO_STATE_READING)
jffs2_set_inocache_state(c, f->inocache, INO_STATE_PRESENT);
return 0;
-diff -NurpP --minimal linux-2.6.22.10/fs/jffs2/super.c linux-2.6.22.10-vs2.3.0.29/fs/jffs2/super.c
---- linux-2.6.22.10/fs/jffs2/super.c 2007-07-09 13:19:26 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jffs2/super.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/jffs2/super.c linux-2.6.22.18-vs2.3.0.32/fs/jffs2/super.c
+--- linux-2.6.22.18/fs/jffs2/super.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jffs2/super.c 2008-02-11 12:35:34.000000000 +0100
@@ -22,6 +22,7 @@
#include <linux/mtd/super.h>
#include <linux/ctype.h>
return jffs2_do_fill_super(sb, data, silent);
}
-diff -NurpP --minimal linux-2.6.22.10/fs/jffs2/write.c linux-2.6.22.10-vs2.3.0.29/fs/jffs2/write.c
---- linux-2.6.22.10/fs/jffs2/write.c 2007-10-30 01:57:14 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jffs2/write.c 2007-09-05 03:06:11 +0200
+diff -Nurp linux-2.6.22.18/fs/jffs2/write.c linux-2.6.22.18-vs2.3.0.32/fs/jffs2/write.c
+--- linux-2.6.22.18/fs/jffs2/write.c 2007-08-26 03:38:36.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jffs2/write.c 2008-02-11 12:35:34.000000000 +0100
@@ -44,6 +44,7 @@ int jffs2_do_new_inode(struct jffs2_sb_i
ri->totlen = cpu_to_je32(PAD(sizeof(*ri)));
ri->hdr_crc = cpu_to_je32(crc32(0, ri, sizeof(struct jffs2_unknown_node)-4));
f->highest_version = 1;
ri->version = cpu_to_je32(f->highest_version);
-diff -NurpP --minimal linux-2.6.22.10/fs/jfs/acl.c linux-2.6.22.10-vs2.3.0.29/fs/jfs/acl.c
---- linux-2.6.22.10/fs/jfs/acl.c 2006-11-30 21:19:25 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jfs/acl.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/jfs/acl.c linux-2.6.22.18-vs2.3.0.32/fs/jfs/acl.c
+--- linux-2.6.22.18/fs/jfs/acl.c 2007-05-04 15:57:35.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jfs/acl.c 2008-02-11 12:35:34.000000000 +0100
@@ -232,7 +232,8 @@ int jfs_setattr(struct dentry *dentry, s
return rc;
if (DQUOT_TRANSFER(inode, iattr))
return -EDQUOT;
}
-diff -NurpP --minimal linux-2.6.22.10/fs/jfs/file.c linux-2.6.22.10-vs2.3.0.29/fs/jfs/file.c
---- linux-2.6.22.10/fs/jfs/file.c 2007-05-02 19:25:18 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jfs/file.c 2007-09-12 20:04:16 +0200
+diff -Nurp linux-2.6.22.18/fs/jfs/file.c linux-2.6.22.18-vs2.3.0.32/fs/jfs/file.c
+--- linux-2.6.22.18/fs/jfs/file.c 2007-07-21 23:58:46.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jfs/file.c 2008-02-11 12:35:34.000000000 +0100
@@ -98,6 +98,7 @@ const struct inode_operations jfs_file_i
.setattr = jfs_setattr,
.permission = jfs_permission,
};
const struct file_operations jfs_file_operations = {
-diff -NurpP --minimal linux-2.6.22.10/fs/jfs/inode.c linux-2.6.22.10-vs2.3.0.29/fs/jfs/inode.c
---- linux-2.6.22.10/fs/jfs/inode.c 2007-07-09 13:19:26 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jfs/inode.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/jfs/inode.c linux-2.6.22.18-vs2.3.0.32/fs/jfs/inode.c
+--- linux-2.6.22.18/fs/jfs/inode.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jfs/inode.c 2008-02-11 12:35:34.000000000 +0100
@@ -22,6 +22,7 @@
#include <linux/buffer_head.h>
#include <linux/pagemap.h>
}
clear_inode(inode);
-diff -NurpP --minimal linux-2.6.22.10/fs/jfs/ioctl.c linux-2.6.22.10-vs2.3.0.29/fs/jfs/ioctl.c
---- linux-2.6.22.10/fs/jfs/ioctl.c 2007-07-09 13:19:27 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jfs/ioctl.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/jfs/ioctl.c linux-2.6.22.18-vs2.3.0.32/fs/jfs/ioctl.c
+--- linux-2.6.22.18/fs/jfs/ioctl.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jfs/ioctl.c 2008-02-11 12:35:34.000000000 +0100
@@ -10,6 +10,7 @@
#include <linux/capability.h>
#include <linux/time.h>
if (!capable(CAP_LINUX_IMMUTABLE))
return -EPERM;
}
-diff -NurpP --minimal linux-2.6.22.10/fs/jfs/jfs_dinode.h linux-2.6.22.10-vs2.3.0.29/fs/jfs/jfs_dinode.h
---- linux-2.6.22.10/fs/jfs/jfs_dinode.h 2006-11-30 21:19:25 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jfs/jfs_dinode.h 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/jfs/jfs_dinode.h linux-2.6.22.18-vs2.3.0.32/fs/jfs/jfs_dinode.h
+--- linux-2.6.22.18/fs/jfs/jfs_dinode.h 2007-05-04 15:57:35.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jfs/jfs_dinode.h 2008-02-11 12:35:34.000000000 +0100
@@ -162,9 +162,12 @@ struct dinode {
#define JFS_APPEND_FL 0x01000000 /* writes to file may only append */
#define JFS_IMMUTABLE_FL 0x02000000 /* Immutable file */
/* These are identical to EXT[23]_IOC_GETFLAGS/SETFLAGS */
#define JFS_IOC_GETFLAGS _IOR('f', 1, long)
-diff -NurpP --minimal linux-2.6.22.10/fs/jfs/jfs_dtree.c linux-2.6.22.10-vs2.3.0.29/fs/jfs/jfs_dtree.c
---- linux-2.6.22.10/fs/jfs/jfs_dtree.c 2007-02-06 03:01:24 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jfs/jfs_dtree.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/jfs/jfs_dtree.c linux-2.6.22.18-vs2.3.0.32/fs/jfs/jfs_dtree.c
+--- linux-2.6.22.18/fs/jfs/jfs_dtree.c 2007-05-04 15:58:21.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jfs/jfs_dtree.c 2008-02-11 12:35:34.000000000 +0100
@@ -102,6 +102,7 @@
#include <linux/fs.h>
/* Free quota allocation */
DQUOT_FREE_BLOCK(ip, xlen);
-diff -NurpP --minimal linux-2.6.22.10/fs/jfs/jfs_extent.c linux-2.6.22.10-vs2.3.0.29/fs/jfs/jfs_extent.c
---- linux-2.6.22.10/fs/jfs/jfs_extent.c 2006-11-30 21:19:25 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jfs/jfs_extent.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/jfs/jfs_extent.c linux-2.6.22.18-vs2.3.0.32/fs/jfs/jfs_extent.c
+--- linux-2.6.22.18/fs/jfs/jfs_extent.c 2007-05-04 15:57:36.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jfs/jfs_extent.c 2008-02-11 12:35:34.000000000 +0100
@@ -18,6 +18,7 @@
#include <linux/fs.h>
DQUOT_FREE_BLOCK(ip, nxlen);
goto exit;
}
-diff -NurpP --minimal linux-2.6.22.10/fs/jfs/jfs_filsys.h linux-2.6.22.10-vs2.3.0.29/fs/jfs/jfs_filsys.h
---- linux-2.6.22.10/fs/jfs/jfs_filsys.h 2007-02-06 03:01:24 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jfs/jfs_filsys.h 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/jfs/jfs_filsys.h linux-2.6.22.18-vs2.3.0.32/fs/jfs/jfs_filsys.h
+--- linux-2.6.22.18/fs/jfs/jfs_filsys.h 2007-05-04 15:58:21.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jfs/jfs_filsys.h 2008-02-11 12:35:34.000000000 +0100
@@ -264,6 +264,7 @@
#define JFS_NAME_MAX 255
#define JFS_PATH_MAX BPSIZE
/*
* file system state (superblock state)
-diff -NurpP --minimal linux-2.6.22.10/fs/jfs/jfs_imap.c linux-2.6.22.10-vs2.3.0.29/fs/jfs/jfs_imap.c
---- linux-2.6.22.10/fs/jfs/jfs_imap.c 2007-07-09 13:19:27 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jfs/jfs_imap.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/jfs/jfs_imap.c linux-2.6.22.18-vs2.3.0.32/fs/jfs/jfs_imap.c
+--- linux-2.6.22.18/fs/jfs/jfs_imap.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jfs/jfs_imap.c 2008-02-11 12:35:34.000000000 +0100
@@ -45,6 +45,7 @@
#include <linux/buffer_head.h>
#include <linux/pagemap.h>
jfs_get_inode_flags(jfs_ip);
/*
* mode2 is only needed for storing the higher order bits.
-diff -NurpP --minimal linux-2.6.22.10/fs/jfs/jfs_inode.c linux-2.6.22.10-vs2.3.0.29/fs/jfs/jfs_inode.c
---- linux-2.6.22.10/fs/jfs/jfs_inode.c 2007-07-09 13:19:27 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jfs/jfs_inode.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/jfs/jfs_inode.c linux-2.6.22.18-vs2.3.0.32/fs/jfs/jfs_inode.c
+--- linux-2.6.22.18/fs/jfs/jfs_inode.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jfs/jfs_inode.c 2008-02-11 12:35:34.000000000 +0100
@@ -18,6 +18,8 @@
#include <linux/fs.h>
DQUOT_DROP(inode);
inode->i_flags |= S_NOQUOTA;
inode->i_nlink = 0;
-diff -NurpP --minimal linux-2.6.22.10/fs/jfs/jfs_inode.h linux-2.6.22.10-vs2.3.0.29/fs/jfs/jfs_inode.h
---- linux-2.6.22.10/fs/jfs/jfs_inode.h 2007-07-09 13:19:27 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jfs/jfs_inode.h 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/jfs/jfs_inode.h linux-2.6.22.18-vs2.3.0.32/fs/jfs/jfs_inode.h
+--- linux-2.6.22.18/fs/jfs/jfs_inode.h 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jfs/jfs_inode.h 2008-02-11 12:35:34.000000000 +0100
@@ -33,6 +33,7 @@ extern void jfs_free_zero_link(struct in
extern struct dentry *jfs_get_parent(struct dentry *dentry);
extern void jfs_get_inode_flags(struct jfs_inode_info *);
extern int jfs_get_block(struct inode *, sector_t, struct buffer_head *, int);
extern const struct address_space_operations jfs_aops;
-diff -NurpP --minimal linux-2.6.22.10/fs/jfs/jfs_xtree.c linux-2.6.22.10-vs2.3.0.29/fs/jfs/jfs_xtree.c
---- linux-2.6.22.10/fs/jfs/jfs_xtree.c 2007-05-02 19:25:18 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jfs/jfs_xtree.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/jfs/jfs_xtree.c linux-2.6.22.18-vs2.3.0.32/fs/jfs/jfs_xtree.c
+--- linux-2.6.22.18/fs/jfs/jfs_xtree.c 2007-07-21 23:58:46.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jfs/jfs_xtree.c 2008-02-11 12:35:34.000000000 +0100
@@ -21,6 +21,7 @@
#include <linux/fs.h>
/* update quota allocation to reflect freed blocks */
DQUOT_FREE_BLOCK(ip, nfreed);
-diff -NurpP --minimal linux-2.6.22.10/fs/jfs/namei.c linux-2.6.22.10-vs2.3.0.29/fs/jfs/namei.c
---- linux-2.6.22.10/fs/jfs/namei.c 2007-05-02 19:25:18 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jfs/namei.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/jfs/namei.c linux-2.6.22.18-vs2.3.0.32/fs/jfs/namei.c
+--- linux-2.6.22.18/fs/jfs/namei.c 2007-07-21 23:58:46.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jfs/namei.c 2008-02-11 12:35:34.000000000 +0100
@@ -20,6 +20,7 @@
#include <linux/fs.h>
#include <linux/ctype.h>
};
const struct file_operations jfs_dir_operations = {
-diff -NurpP --minimal linux-2.6.22.10/fs/jfs/super.c linux-2.6.22.10-vs2.3.0.29/fs/jfs/super.c
---- linux-2.6.22.10/fs/jfs/super.c 2007-07-09 13:19:27 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jfs/super.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/jfs/super.c linux-2.6.22.18-vs2.3.0.32/fs/jfs/super.c
+--- linux-2.6.22.18/fs/jfs/super.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jfs/super.c 2008-02-11 12:35:34.000000000 +0100
@@ -194,7 +194,8 @@ static void jfs_put_super(struct super_b
enum {
Opt_integrity, Opt_nointegrity, Opt_iocharset, Opt_resize,
if (newLVSize) {
printk(KERN_ERR "resize option for remount only\n");
-diff -NurpP --minimal linux-2.6.22.10/fs/jfs/xattr.c linux-2.6.22.10-vs2.3.0.29/fs/jfs/xattr.c
---- linux-2.6.22.10/fs/jfs/xattr.c 2006-11-30 21:19:26 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/jfs/xattr.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/jfs/xattr.c linux-2.6.22.18-vs2.3.0.32/fs/jfs/xattr.c
+--- linux-2.6.22.18/fs/jfs/xattr.c 2007-05-04 15:57:36.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/jfs/xattr.c 2008-02-11 12:35:34.000000000 +0100
@@ -23,6 +23,7 @@
#include <linux/posix_acl_xattr.h>
#include <linux/quotaops.h>
inode->i_ctime = CURRENT_TIME;
-diff -NurpP --minimal linux-2.6.22.10/fs/libfs.c linux-2.6.22.10-vs2.3.0.29/fs/libfs.c
---- linux-2.6.22.10/fs/libfs.c 2007-07-09 13:19:27 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/libfs.c 2007-08-05 20:53:12 +0200
+diff -Nurp linux-2.6.22.18/fs/Kconfig linux-2.6.22.18-vs2.3.0.32/fs/Kconfig
+--- linux-2.6.22.18/fs/Kconfig 2007-07-22 00:00:15.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/Kconfig 2008-02-11 12:35:33.000000000 +0100
+@@ -2026,7 +2026,7 @@ config CODA_FS_OLD_API
+
+ config AFS_FS
+ tristate "Andrew File System support (AFS) (EXPERIMENTAL)"
+- depends on INET && EXPERIMENTAL
++ depends on INET && EXPERIMENTAL && !VSERVER_SECURITY
+ select AF_RXRPC
+ help
+ If you say Y here, you will get an experimental Andrew File System
+diff -Nurp linux-2.6.22.18/fs/libfs.c linux-2.6.22.18-vs2.3.0.32/fs/libfs.c
+--- linux-2.6.22.18/fs/libfs.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/libfs.c 2008-02-11 12:35:34.000000000 +0100
@@ -124,7 +124,8 @@ static inline unsigned char dt_type(stru
* both impossible due to the lock on directory.
*/
EXPORT_SYMBOL(generic_read_dir);
EXPORT_SYMBOL(get_sb_pseudo);
EXPORT_SYMBOL(simple_commit_write);
-diff -NurpP --minimal linux-2.6.22.10/fs/locks.c linux-2.6.22.10-vs2.3.0.29/fs/locks.c
---- linux-2.6.22.10/fs/locks.c 2007-10-30 01:57:14 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/locks.c 2007-10-05 15:07:22 +0200
+diff -Nurp linux-2.6.22.18/fs/locks.c linux-2.6.22.18-vs2.3.0.32/fs/locks.c
+--- linux-2.6.22.18/fs/locks.c 2007-09-29 14:11:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/locks.c 2008-02-11 12:35:34.000000000 +0100
@@ -125,6 +125,8 @@
#include <linux/syscalls.h>
#include <linux/time.h>
lock_get_status(q, fl, ++i, "");
move_lock_status(&q, &pos, offset);
-diff -NurpP --minimal linux-2.6.22.10/fs/namei.c linux-2.6.22.10-vs2.3.0.29/fs/namei.c
---- linux-2.6.22.10/fs/namei.c 2007-07-09 13:19:27 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/namei.c 2007-10-29 23:41:56 +0100
+diff -Nurp linux-2.6.22.18/fs/namei.c linux-2.6.22.18-vs2.3.0.32/fs/namei.c
+--- linux-2.6.22.18/fs/namei.c 2008-01-15 16:00:53.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/fs/namei.c 2008-02-11 12:35:34.000000000 +0100
@@ -31,6 +31,13 @@
#include <linux/file.h>
#include <linux/fcntl.h>
if (isdir) {
if (!S_ISDIR(victim->d_inode->i_mode))
@@ -1546,6 +1608,14 @@ int may_open(struct nameidata *nd, int a
- if (S_ISDIR(inode->i_mode) && (flag & FMODE_WRITE))
+ if (S_ISDIR(inode->i_mode) && (acc_mode & MAY_WRITE))
return -EISDIR;
+#ifdef CONFIG_VSERVER_COWBL
-+ if (IS_COW(inode) && (flag & FMODE_WRITE)) {
++ if (IS_COW(inode) && (acc_mode & MAY_WRITE)) {
+ if (IS_COW_LINK(inode))
+ return -EMLINK;
+ inode->i_flags &= ~(S_IUNLINK|S_IMMUTABLE);
return -EACCES;
flag &= ~O_TRUNC;
-- } else if (IS_RDONLY(inode) && (flag & FMODE_WRITE))
+- } else if (IS_RDONLY(inode) && (acc_mode & MAY_WRITE))
+ } else if ((IS_RDONLY(inode) || MNT_IS_RDONLY(nd->mnt))
-+ && (flag & FMODE_WRITE))
++ && (acc_mode & MAY_WRITE))
return -EROFS;
/*
* An append-only file must be opened in append mode for writing.
/* get the link contents into pagecache */
static char *page_getlink(struct dentry * dentry, struct page **ppage)
{
-diff -NurpP --minimal linux-2.6.22.10/fs/namespace.c linux-2.6.22.10-vs2.3.0.29/fs/namespace.c
---- linux-2.6.22.10/fs/namespace.c 2007-07-09 13:19:27 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/namespace.c 2007-09-05 02:29:17 +0200
+diff -Nurp linux-2.6.22.18/fs/namespace.c linux-2.6.22.18-vs2.3.0.32/fs/namespace.c
+--- linux-2.6.22.18/fs/namespace.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/namespace.c 2008-02-11 12:35:34.000000000 +0100
@@ -25,6 +25,11 @@
#include <linux/security.h>
#include <linux/mount.h>
- seq_putc(m, ' ');
- seq_path(m, mnt, mnt->mnt_root, " \t\n\\");
- seq_putc(m, ' ');
-- mangle(m, mnt->mnt_sb->s_type->name);
-- if (mnt->mnt_sb->s_subtype && mnt->mnt_sb->s_subtype[0]) {
-- seq_putc(m, '.');
-- mangle(m, mnt->mnt_sb->s_subtype);
-- }
-- seq_puts(m, mnt->mnt_sb->s_flags & MS_RDONLY ? " ro" : " rw");
-- for (fs_infop = fs_info; fs_infop->flag; fs_infop++) {
-- if (mnt->mnt_sb->s_flags & fs_infop->flag)
-- seq_puts(m, fs_infop->str);
+ if (vx_flags(VXF_HIDE_MOUNT, 0))
+ return 0;
+ if (!mnt_is_reachable(mnt) && !vx_check(0, VS_WATCH_P))
+ seq_putc(m, '.');
+ mangle(m, mnt->mnt_sb->s_subtype);
+ }
- }
++ }
+ mangle(m, mnt->mnt_sb->s_type->name);
+- if (mnt->mnt_sb->s_subtype && mnt->mnt_sb->s_subtype[0]) {
+- seq_putc(m, '.');
+- mangle(m, mnt->mnt_sb->s_subtype);
+- }
+- seq_puts(m, mnt->mnt_sb->s_flags & MS_RDONLY ? " ro" : " rw");
+- for (fs_infop = fs_info; fs_infop->flag; fs_infop++) {
+- if (mnt->mnt_sb->s_flags & fs_infop->flag)
+- seq_puts(m, fs_infop->str);
+- }
- for (fs_infop = mnt_info; fs_infop->flag; fs_infop++) {
- if (mnt->mnt_flags & fs_infop->flag)
- seq_puts(m, fs_infop->str);
-+ mangle(m, mnt->mnt_sb->s_type->name);
+ seq_putc(m, ' ');
+ for (p = fs_info; (p->s_flag | p->mnt_flag) ; p++) {
+ if ((s_flags & p->s_flag) || (mnt_flags & p->mnt_flag)) {
- mangle(m, mnt->mnt_devname);
- } else
- seq_puts(m, "no device");
-+ if (vx_flags(VXF_HIDE_MOUNT, 0))
-+ return 0;
-+ if (!mnt_is_reachable(mnt) && !vx_check(0, VS_WATCH_P))
-+ return 0;
-
+-
- /* mount point */
- seq_puts(m, " mounted on ");
- seq_path(m, mnt, mnt->mnt_root, " \t\n\\");
- seq_putc(m, ' ');
++ if (vx_flags(VXF_HIDE_MOUNT, 0))
++ return 0;
++ if (!mnt_is_reachable(mnt) && !vx_check(0, VS_WATCH_P))
++ return 0;
++
+ if (!vx_check(0, VS_ADMIN|VS_WATCH) &&
+ mnt == current->fs->rootmnt) {
+ seq_puts(m, "device /dev/root mounted on / ");
+ atomic_dec(&vs_global_mnt_ns);
kfree(ns);
}
-diff -NurpP --minimal linux-2.6.22.10/fs/nfs/client.c linux-2.6.22.10-vs2.3.0.29/fs/nfs/client.c
---- linux-2.6.22.10/fs/nfs/client.c 2007-07-09 13:19:27 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/nfs/client.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/nfs/client.c linux-2.6.22.18-vs2.3.0.32/fs/nfs/client.c
+--- linux-2.6.22.18/fs/nfs/client.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/nfs/client.c 2008-02-11 12:35:34.000000000 +0100
@@ -521,6 +521,9 @@ static int nfs_init_server_rpcclient(str
if (server->flags & NFS4_MOUNT_INTR)
server->client->cl_intr = 1;
server->maxfilesize = fsinfo->maxfilesize;
/* We're airborne Set socket buffersize */
-diff -NurpP --minimal linux-2.6.22.10/fs/nfs/dir.c linux-2.6.22.10-vs2.3.0.29/fs/nfs/dir.c
---- linux-2.6.22.10/fs/nfs/dir.c 2007-07-09 13:19:27 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/nfs/dir.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/nfs/dir.c linux-2.6.22.18-vs2.3.0.32/fs/nfs/dir.c
+--- linux-2.6.22.18/fs/nfs/dir.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/nfs/dir.c 2008-02-11 12:35:34.000000000 +0100
@@ -34,6 +34,7 @@
#include <linux/namei.h>
#include <linux/mount.h>
return 0;
return 1;
}
-diff -NurpP --minimal linux-2.6.22.10/fs/nfs/inode.c linux-2.6.22.10-vs2.3.0.29/fs/nfs/inode.c
---- linux-2.6.22.10/fs/nfs/inode.c 2007-07-09 13:19:27 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/nfs/inode.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/nfs/inode.c linux-2.6.22.18-vs2.3.0.32/fs/nfs/inode.c
+--- linux-2.6.22.18/fs/nfs/inode.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/nfs/inode.c 2008-02-11 12:35:34.000000000 +0100
@@ -37,6 +37,7 @@
#include <linux/vfs.h>
#include <linux/inet.h>
if (fattr->valid & (NFS_ATTR_FATTR_V3 | NFS_ATTR_FATTR_V4)) {
/*
-diff -NurpP --minimal linux-2.6.22.10/fs/nfs/nfs3xdr.c linux-2.6.22.10-vs2.3.0.29/fs/nfs/nfs3xdr.c
---- linux-2.6.22.10/fs/nfs/nfs3xdr.c 2007-07-09 13:19:27 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/nfs/nfs3xdr.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/nfs/nfs3xdr.c linux-2.6.22.18-vs2.3.0.32/fs/nfs/nfs3xdr.c
+--- linux-2.6.22.18/fs/nfs/nfs3xdr.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/nfs/nfs3xdr.c 2008-02-11 12:35:34.000000000 +0100
@@ -22,6 +22,7 @@
#include <linux/nfs3.h>
#include <linux/nfs_fs.h>
if (args->type == NF3CHR || args->type == NF3BLK) {
*p++ = htonl(MAJOR(args->rdev));
*p++ = htonl(MINOR(args->rdev));
-diff -NurpP --minimal linux-2.6.22.10/fs/nfs/nfsroot.c linux-2.6.22.10-vs2.3.0.29/fs/nfs/nfsroot.c
---- linux-2.6.22.10/fs/nfs/nfsroot.c 2007-07-09 13:19:27 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/nfs/nfsroot.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/nfs/nfsroot.c linux-2.6.22.18-vs2.3.0.32/fs/nfs/nfsroot.c
+--- linux-2.6.22.18/fs/nfs/nfsroot.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/nfs/nfsroot.c 2008-02-11 12:35:34.000000000 +0100
@@ -118,12 +118,12 @@ static int mount_port __initdata = 0; /
enum {
/* Options that take integer arguments */
default:
printk(KERN_WARNING "Root-NFS: unknown "
"option: %s\n", p);
-diff -NurpP --minimal linux-2.6.22.10/fs/nfs/super.c linux-2.6.22.10-vs2.3.0.29/fs/nfs/super.c
---- linux-2.6.22.10/fs/nfs/super.c 2007-10-30 01:57:14 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/nfs/super.c 2007-09-30 14:58:01 +0200
+diff -Nurp linux-2.6.22.18/fs/nfs/super.c linux-2.6.22.18-vs2.3.0.32/fs/nfs/super.c
+--- linux-2.6.22.18/fs/nfs/super.c 2007-09-29 14:11:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/nfs/super.c 2008-02-11 12:35:34.000000000 +0100
@@ -45,6 +45,7 @@
#include <linux/inet.h>
#include <linux/nfs_xdr.h>
{ 0, NULL, NULL }
};
const struct proc_nfs_info *nfs_infop;
-diff -NurpP --minimal linux-2.6.22.10/fs/nfsd/auth.c linux-2.6.22.10-vs2.3.0.29/fs/nfsd/auth.c
---- linux-2.6.22.10/fs/nfsd/auth.c 2006-06-18 04:54:42 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/nfsd/auth.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/nfsd/auth.c linux-2.6.22.18-vs2.3.0.32/fs/nfsd/auth.c
+--- linux-2.6.22.18/fs/nfsd/auth.c 2006-06-18 03:49:35.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/nfsd/auth.c 2008-02-11 12:35:34.000000000 +0100
@@ -9,6 +9,7 @@
#include <linux/sunrpc/svc.h>
#include <linux/sunrpc/svcauth.h>
cap_t(current->cap_effective) &= ~CAP_NFSD_MASK;
} else {
cap_t(current->cap_effective) |= (CAP_NFSD_MASK &
-diff -NurpP --minimal linux-2.6.22.10/fs/nfsd/nfs3xdr.c linux-2.6.22.10-vs2.3.0.29/fs/nfsd/nfs3xdr.c
---- linux-2.6.22.10/fs/nfsd/nfs3xdr.c 2007-07-09 13:19:27 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/nfsd/nfs3xdr.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/nfsd/nfs3xdr.c linux-2.6.22.18-vs2.3.0.32/fs/nfsd/nfs3xdr.c
+--- linux-2.6.22.18/fs/nfsd/nfs3xdr.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/nfsd/nfs3xdr.c 2008-02-11 12:35:34.000000000 +0100
@@ -21,6 +21,7 @@
#include <linux/sunrpc/svc.h>
#include <linux/nfsd/nfsd.h>
if (S_ISLNK(stat->mode) && stat->size > NFS3_MAXPATHLEN) {
p = xdr_encode_hyper(p, (u64) NFS3_MAXPATHLEN);
} else {
-diff -NurpP --minimal linux-2.6.22.10/fs/nfsd/nfs4recover.c linux-2.6.22.10-vs2.3.0.29/fs/nfsd/nfs4recover.c
---- linux-2.6.22.10/fs/nfsd/nfs4recover.c 2007-07-09 13:19:27 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/nfsd/nfs4recover.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/nfsd/nfs4recover.c linux-2.6.22.18-vs2.3.0.32/fs/nfsd/nfs4recover.c
+--- linux-2.6.22.18/fs/nfsd/nfs4recover.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/nfsd/nfs4recover.c 2008-02-11 12:35:34.000000000 +0100
@@ -156,7 +156,7 @@ nfsd4_create_clid_dir(struct nfs4_client
dprintk("NFSD: nfsd4_create_clid_dir: DIRECTORY EXISTS\n");
goto out_put;
mutex_unlock(&dir->d_inode->i_mutex);
return status;
}
-diff -NurpP --minimal linux-2.6.22.10/fs/nfsd/nfs4xdr.c linux-2.6.22.10-vs2.3.0.29/fs/nfsd/nfs4xdr.c
---- linux-2.6.22.10/fs/nfsd/nfs4xdr.c 2007-07-09 13:19:27 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/nfsd/nfs4xdr.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/nfsd/nfs4xdr.c linux-2.6.22.18-vs2.3.0.32/fs/nfsd/nfs4xdr.c
+--- linux-2.6.22.18/fs/nfsd/nfs4xdr.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/nfsd/nfs4xdr.c 2008-02-11 12:35:34.000000000 +0100
@@ -56,6 +56,7 @@
#include <linux/nfsd_idmap.h>
#include <linux/nfs4.h>
if (status == nfserr_resource)
goto out_resource;
if (status)
-diff -NurpP --minimal linux-2.6.22.10/fs/nfsd/nfsxdr.c linux-2.6.22.10-vs2.3.0.29/fs/nfsd/nfsxdr.c
---- linux-2.6.22.10/fs/nfsd/nfsxdr.c 2007-07-09 13:19:27 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/nfsd/nfsxdr.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/nfsd/nfsxdr.c linux-2.6.22.18-vs2.3.0.32/fs/nfsd/nfsxdr.c
+--- linux-2.6.22.18/fs/nfsd/nfsxdr.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/nfsd/nfsxdr.c 2008-02-11 12:35:34.000000000 +0100
@@ -15,6 +15,7 @@
#include <linux/nfsd/nfsd.h>
#include <linux/nfsd/xdr.h>
if (S_ISLNK(type) && stat->size > NFS_MAXPATHLEN) {
*p++ = htonl(NFS_MAXPATHLEN);
-diff -NurpP --minimal linux-2.6.22.10/fs/nfsd/vfs.c linux-2.6.22.10-vs2.3.0.29/fs/nfsd/vfs.c
---- linux-2.6.22.10/fs/nfsd/vfs.c 2007-10-30 01:57:14 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/nfsd/vfs.c 2007-08-11 22:41:51 +0200
+diff -Nurp linux-2.6.22.18/fs/nfsd/vfs.c linux-2.6.22.18-vs2.3.0.32/fs/nfsd/vfs.c
+--- linux-2.6.22.18/fs/nfsd/vfs.c 2007-08-12 03:54:36.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/nfsd/vfs.c 2008-02-11 12:35:34.000000000 +0100
@@ -1186,13 +1186,13 @@ nfsd_create(struct svc_rqst *rqstp, stru
host_err = vfs_create(dirp, dchild, iap->ia_mode, NULL);
break;
return nfserr_rofs;
if (/* (acc & MAY_WRITE) && */ IS_IMMUTABLE(inode))
return nfserr_perm;
-diff -NurpP --minimal linux-2.6.22.10/fs/ocfs2/dlm/dlmfs.c linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/dlm/dlmfs.c
---- linux-2.6.22.10/fs/ocfs2/dlm/dlmfs.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/dlm/dlmfs.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/ocfs2/dlm/dlmfs.c linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/dlm/dlmfs.c
+--- linux-2.6.22.18/fs/ocfs2/dlm/dlmfs.c 2007-07-22 00:00:17.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/dlm/dlmfs.c 2008-02-11 12:35:34.000000000 +0100
@@ -43,6 +43,7 @@
#include <linux/init.h>
#include <linux/string.h>
inode->i_blocks = 0;
inode->i_mapping->backing_dev_info = &dlmfs_backing_dev_info;
inode->i_atime = inode->i_mtime = inode->i_ctime = CURRENT_TIME;
-diff -NurpP --minimal linux-2.6.22.10/fs/ocfs2/dlmglue.c linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/dlmglue.c
---- linux-2.6.22.10/fs/ocfs2/dlmglue.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/dlmglue.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/ocfs2/dlmglue.c linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/dlmglue.c
+--- linux-2.6.22.18/fs/ocfs2/dlmglue.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/dlmglue.c 2008-02-11 12:35:34.000000000 +0100
@@ -1475,6 +1475,7 @@ static void __ocfs2_stuff_meta_lvb(struc
lvb->lvb_iclusters = cpu_to_be32(oi->ip_clusters);
lvb->lvb_iuid = cpu_to_be32(inode->i_uid);
inode->i_mode = be16_to_cpu(lvb->lvb_imode);
inode->i_nlink = be16_to_cpu(lvb->lvb_inlink);
ocfs2_unpack_timespec(&inode->i_atime,
-diff -NurpP --minimal linux-2.6.22.10/fs/ocfs2/dlmglue.h linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/dlmglue.h
---- linux-2.6.22.10/fs/ocfs2/dlmglue.h 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/dlmglue.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/ocfs2/dlmglue.h linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/dlmglue.h
+--- linux-2.6.22.18/fs/ocfs2/dlmglue.h 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/dlmglue.h 2008-02-11 12:35:34.000000000 +0100
@@ -34,7 +34,7 @@
struct ocfs2_meta_lvb {
__u8 lvb_version;
__be32 lvb_iclusters;
__be32 lvb_iuid;
__be32 lvb_igid;
-diff -NurpP --minimal linux-2.6.22.10/fs/ocfs2/file.c linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/file.c
---- linux-2.6.22.10/fs/ocfs2/file.c 2007-10-30 01:57:14 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/file.c 2007-09-05 03:06:11 +0200
+diff -Nurp linux-2.6.22.18/fs/ocfs2/file.c linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/file.c
+--- linux-2.6.22.18/fs/ocfs2/file.c 2007-09-05 07:07:59.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/file.c 2008-02-11 12:35:34.000000000 +0100
@@ -943,13 +943,15 @@ int ocfs2_setattr(struct dentry *dentry,
mlog(0, "uid change: %d\n", attr->ia_uid);
if (attr->ia_valid & ATTR_GID)
.permission = ocfs2_permission,
};
-diff -NurpP --minimal linux-2.6.22.10/fs/ocfs2/inode.c linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/inode.c
---- linux-2.6.22.10/fs/ocfs2/inode.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/inode.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/ocfs2/inode.c linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/inode.c
+--- linux-2.6.22.18/fs/ocfs2/inode.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/inode.c 2008-02-11 12:35:34.000000000 +0100
@@ -28,6 +28,7 @@
#include <linux/slab.h>
#include <linux/highmem.h>
inode->i_mode = le16_to_cpu(fe->i_mode);
if (S_ISLNK(inode->i_mode) && le32_to_cpu(fe->i_clusters) == 0)
inode->i_blocks = 0;
-diff -NurpP --minimal linux-2.6.22.10/fs/ocfs2/inode.h linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/inode.h
---- linux-2.6.22.10/fs/ocfs2/inode.h 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/inode.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/ocfs2/inode.h linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/inode.h
+--- linux-2.6.22.18/fs/ocfs2/inode.h 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/inode.h 2008-02-11 12:35:34.000000000 +0100
@@ -142,6 +142,7 @@ int ocfs2_aio_write(struct file *file, s
void ocfs2_set_inode_flags(struct inode *inode);
static inline blkcnt_t ocfs2_inode_sector_count(struct inode *inode)
{
-diff -NurpP --minimal linux-2.6.22.10/fs/ocfs2/ioctl.c linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/ioctl.c
---- linux-2.6.22.10/fs/ocfs2/ioctl.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/ioctl.c 2007-08-05 20:53:13 +0200
-@@ -39,7 +39,7 @@ static int ocfs2_get_inode_attr(struct i
+diff -Nurp linux-2.6.22.18/fs/ocfs2/ioctl.c linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/ioctl.c
+--- linux-2.6.22.18/fs/ocfs2/ioctl.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/ioctl.c 2008-02-11 12:35:34.000000000 +0100
+@@ -39,7 +39,8 @@ static int ocfs2_get_inode_attr(struct i
return status;
}
-static int ocfs2_set_inode_attr(struct inode *inode, unsigned flags,
++/* Called with inode->i_mutex locked */
+int ocfs2_set_inode_attr(struct inode *inode, unsigned flags,
unsigned mask)
{
struct ocfs2_inode_info *ocfs2_inode = OCFS2_I(inode);
-diff -NurpP --minimal linux-2.6.22.10/fs/ocfs2/ioctl.h linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/ioctl.h
---- linux-2.6.22.10/fs/ocfs2/ioctl.h 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/ioctl.h 2007-08-05 20:53:13 +0200
+@@ -49,8 +50,6 @@ static int ocfs2_set_inode_attr(struct i
+ unsigned oldflags;
+ int status;
+
+- mutex_lock(&inode->i_mutex);
+-
+ status = ocfs2_meta_lock(inode, &bh, 1);
+ if (status < 0) {
+ mlog_errno(status);
+@@ -101,8 +100,6 @@ static int ocfs2_set_inode_attr(struct i
+ bail_unlock:
+ ocfs2_meta_unlock(inode, 1);
+ bail:
+- mutex_unlock(&inode->i_mutex);
+-
+ if (bh)
+ brelse(bh);
+
+@@ -110,6 +107,16 @@ bail:
+ return status;
+ }
+
++static inline int ocfs2_set_inode_attr_lock(struct inode *inode,
++ unsigned flags, unsigned mask)
++{
++ int ret;
++ mutex_lock(&inode->i_mutex);
++ ret = ocfs2_set_inode_attr(inode, flags, mask);
++ mutex_unlock(&inode->i_mutex);
++ return ret;
++}
++
+ int ocfs2_ioctl(struct inode * inode, struct file * filp,
+ unsigned int cmd, unsigned long arg)
+ {
+@@ -128,7 +135,7 @@ int ocfs2_ioctl(struct inode * inode, st
+ if (get_user(flags, (int __user *) arg))
+ return -EFAULT;
+
+- return ocfs2_set_inode_attr(inode, flags,
++ return ocfs2_set_inode_attr_lock(inode, flags,
+ OCFS2_FL_MODIFIABLE);
+ default:
+ return -ENOTTY;
+diff -Nurp linux-2.6.22.18/fs/ocfs2/ioctl.h linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/ioctl.h
+--- linux-2.6.22.18/fs/ocfs2/ioctl.h 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/ioctl.h 2008-02-11 12:35:34.000000000 +0100
@@ -10,6 +10,9 @@
#ifndef OCFS2_IOCTL_H
#define OCFS2_IOCTL_H
int ocfs2_ioctl(struct inode * inode, struct file * filp,
unsigned int cmd, unsigned long arg);
long ocfs2_compat_ioctl(struct file *file, unsigned cmd, unsigned long arg);
-diff -NurpP --minimal linux-2.6.22.10/fs/ocfs2/namei.c linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/namei.c
---- linux-2.6.22.10/fs/ocfs2/namei.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/namei.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/ocfs2/namei.c linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/namei.c
+--- linux-2.6.22.18/fs/ocfs2/namei.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/namei.c 2008-02-11 12:35:34.000000000 +0100
@@ -40,6 +40,7 @@
#include <linux/types.h>
#include <linux/slab.h>
+ .sync_flags = ocfs2_sync_flags,
.permission = ocfs2_permission,
};
-diff -NurpP --minimal linux-2.6.22.10/fs/ocfs2/ocfs2.h linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/ocfs2.h
---- linux-2.6.22.10/fs/ocfs2/ocfs2.h 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/ocfs2.h 2007-08-05 20:53:13 +0200
-@@ -170,6 +170,7 @@ enum ocfs2_mount_options
- OCFS2_MOUNT_NOINTR = 1 << 2, /* Don't catch signals */
- OCFS2_MOUNT_ERRORS_PANIC = 1 << 3, /* Panic on errors */
- OCFS2_MOUNT_DATA_WRITEBACK = 1 << 4, /* No data ordering */
-+ OCFS2_MOUNT_TAGGED = 1 << 8, /* use tagging */
- };
-
- #define OCFS2_OSB_SOFT_RO 0x0001
-diff -NurpP --minimal linux-2.6.22.10/fs/ocfs2/ocfs2_fs.h linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/ocfs2_fs.h
---- linux-2.6.22.10/fs/ocfs2/ocfs2_fs.h 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/ocfs2_fs.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/ocfs2/ocfs2_fs.h linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/ocfs2_fs.h
+--- linux-2.6.22.18/fs/ocfs2/ocfs2_fs.h 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/ocfs2_fs.h 2008-02-11 12:35:34.000000000 +0100
@@ -152,8 +152,12 @@
#define OCFS2_NOATIME_FL (0x00000080) /* do not update atime */
#define OCFS2_DIRSYNC_FL (0x00010000) /* dirsync behaviour (directories only) */
/*
* Extent record flags (e_node.leaf.flags)
-diff -NurpP --minimal linux-2.6.22.10/fs/ocfs2/super.c linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/super.c
---- linux-2.6.22.10/fs/ocfs2/super.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/ocfs2/super.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/ocfs2/ocfs2.h linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/ocfs2.h
+--- linux-2.6.22.18/fs/ocfs2/ocfs2.h 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/ocfs2.h 2008-02-11 12:35:34.000000000 +0100
+@@ -170,6 +170,7 @@ enum ocfs2_mount_options
+ OCFS2_MOUNT_NOINTR = 1 << 2, /* Don't catch signals */
+ OCFS2_MOUNT_ERRORS_PANIC = 1 << 3, /* Panic on errors */
+ OCFS2_MOUNT_DATA_WRITEBACK = 1 << 4, /* No data ordering */
++ OCFS2_MOUNT_TAGGED = 1 << 8, /* use tagging */
+ };
+
+ #define OCFS2_OSB_SOFT_RO 0x0001
+diff -Nurp linux-2.6.22.18/fs/ocfs2/super.c linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/super.c
+--- linux-2.6.22.18/fs/ocfs2/super.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/ocfs2/super.c 2008-02-11 12:35:34.000000000 +0100
@@ -140,6 +140,7 @@ enum {
Opt_data_ordered,
Opt_data_writeback,
default:
mlog(ML_ERROR,
"Unrecognized mount option \"%s\" "
-diff -NurpP --minimal linux-2.6.22.10/fs/open.c linux-2.6.22.10-vs2.3.0.29/fs/open.c
---- linux-2.6.22.10/fs/open.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/open.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/open.c linux-2.6.22.18-vs2.3.0.32/fs/open.c
+--- linux-2.6.22.18/fs/open.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/open.c 2008-02-11 12:35:34.000000000 +0100
@@ -26,22 +26,31 @@
#include <linux/syscalls.h>
#include <linux/rcupdate.h>
}
void fastcall put_unused_fd(unsigned int fd)
-diff -NurpP --minimal linux-2.6.22.10/fs/proc/array.c linux-2.6.22.10-vs2.3.0.29/fs/proc/array.c
---- linux-2.6.22.10/fs/proc/array.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/proc/array.c 2007-10-05 15:07:22 +0200
+diff -Nurp linux-2.6.22.18/fs/proc/array.c linux-2.6.22.18-vs2.3.0.32/fs/proc/array.c
+--- linux-2.6.22.18/fs/proc/array.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/proc/array.c 2008-02-11 12:35:35.000000000 +0100
@@ -75,6 +75,8 @@
#include <linux/cpuset.h>
#include <linux/rcupdate.h>
tcomm,
state,
ppid,
-diff -NurpP --minimal linux-2.6.22.10/fs/proc/base.c linux-2.6.22.10-vs2.3.0.29/fs/proc/base.c
---- linux-2.6.22.10/fs/proc/base.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/proc/base.c 2007-09-05 02:49:29 +0200
+diff -Nurp linux-2.6.22.18/fs/proc/base.c linux-2.6.22.18-vs2.3.0.32/fs/proc/base.c
+--- linux-2.6.22.18/fs/proc/base.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/proc/base.c 2008-02-11 12:35:35.000000000 +0100
@@ -73,6 +73,9 @@
#include <linux/poll.h>
#include <linux/nsproxy.h>
if (proc_task_fill_cache(filp, dirent, filldir, task, tid) < 0) {
/* returning this tgid failed, save it as the first
* pid for the next readir call */
-diff -NurpP --minimal linux-2.6.22.10/fs/proc/generic.c linux-2.6.22.10-vs2.3.0.29/fs/proc/generic.c
---- linux-2.6.22.10/fs/proc/generic.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/proc/generic.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/proc/generic.c linux-2.6.22.18-vs2.3.0.32/fs/proc/generic.c
+--- linux-2.6.22.18/fs/proc/generic.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/proc/generic.c 2008-02-11 12:35:35.000000000 +0100
@@ -20,6 +20,7 @@
#include <linux/namei.h>
#include <linux/bitops.h>
} else {
kfree(ent);
ent = NULL;
-diff -NurpP --minimal linux-2.6.22.10/fs/proc/inode.c linux-2.6.22.10-vs2.3.0.29/fs/proc/inode.c
---- linux-2.6.22.10/fs/proc/inode.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/proc/inode.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/proc/inode.c linux-2.6.22.18-vs2.3.0.32/fs/proc/inode.c
+--- linux-2.6.22.18/fs/proc/inode.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/proc/inode.c 2008-02-11 12:35:35.000000000 +0100
@@ -160,6 +160,8 @@ struct inode *proc_get_inode(struct supe
inode->i_uid = de->uid;
inode->i_gid = de->gid;
if (de->size)
inode->i_size = de->size;
if (de->nlink)
-diff -NurpP --minimal linux-2.6.22.10/fs/proc/internal.h linux-2.6.22.10-vs2.3.0.29/fs/proc/internal.h
---- linux-2.6.22.10/fs/proc/internal.h 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/proc/internal.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/proc/internal.h linux-2.6.22.18-vs2.3.0.32/fs/proc/internal.h
+--- linux-2.6.22.18/fs/proc/internal.h 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/proc/internal.h 2008-02-11 12:35:35.000000000 +0100
@@ -10,6 +10,7 @@
*/
static inline int proc_fd(struct inode *inode)
{
return PROC_I(inode)->fd;
-diff -NurpP --minimal linux-2.6.22.10/fs/proc/proc_misc.c linux-2.6.22.10-vs2.3.0.29/fs/proc/proc_misc.c
---- linux-2.6.22.10/fs/proc/proc_misc.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/proc/proc_misc.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/proc/proc_misc.c linux-2.6.22.18-vs2.3.0.32/fs/proc/proc_misc.c
+--- linux-2.6.22.18/fs/proc/proc_misc.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/proc/proc_misc.c 2008-02-11 12:35:35.000000000 +0100
@@ -53,6 +53,8 @@
#include <asm/div64.h>
#include "internal.h"
cached = 0;
get_vmalloc_info(&vmi);
-diff -NurpP --minimal linux-2.6.22.10/fs/proc/root.c linux-2.6.22.10-vs2.3.0.29/fs/proc/root.c
---- linux-2.6.22.10/fs/proc/root.c 2007-05-02 19:25:21 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/proc/root.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/proc/root.c linux-2.6.22.18-vs2.3.0.32/fs/proc/root.c
+--- linux-2.6.22.18/fs/proc/root.c 2007-07-21 23:58:48.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/proc/root.c 2008-02-11 12:35:35.000000000 +0100
@@ -22,6 +22,9 @@
#include "internal.h"
proc_sys_init();
}
-diff -NurpP --minimal linux-2.6.22.10/fs/quota.c linux-2.6.22.10-vs2.3.0.29/fs/quota.c
---- linux-2.6.22.10/fs/quota.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/quota.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/quota.c linux-2.6.22.18-vs2.3.0.32/fs/quota.c
+--- linux-2.6.22.18/fs/quota.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/quota.c 2008-02-11 12:35:35.000000000 +0100
@@ -16,6 +16,7 @@
#include <linux/buffer_head.h>
#include <linux/capability.h>
sb = get_super(bdev);
bdput(bdev);
if (!sb)
-diff -NurpP --minimal linux-2.6.22.10/fs/reiserfs/bitmap.c linux-2.6.22.10-vs2.3.0.29/fs/reiserfs/bitmap.c
---- linux-2.6.22.10/fs/reiserfs/bitmap.c 2007-02-06 03:01:29 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/reiserfs/bitmap.c 2007-10-05 15:07:22 +0200
+diff -Nurp linux-2.6.22.18/fs/reiserfs/bitmap.c linux-2.6.22.18-vs2.3.0.32/fs/reiserfs/bitmap.c
+--- linux-2.6.22.18/fs/reiserfs/bitmap.c 2007-05-04 15:58:22.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/reiserfs/bitmap.c 2008-02-11 12:35:35.000000000 +0100
@@ -13,6 +13,7 @@
#include <linux/reiserfs_fs_sb.h>
#include <linux/reiserfs_fs_i.h>
}
return CARRY_ON;
-diff -NurpP --minimal linux-2.6.22.10/fs/reiserfs/file.c linux-2.6.22.10-vs2.3.0.29/fs/reiserfs/file.c
---- linux-2.6.22.10/fs/reiserfs/file.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/reiserfs/file.c 2007-09-12 20:04:16 +0200
+diff -Nurp linux-2.6.22.18/fs/reiserfs/file.c linux-2.6.22.18-vs2.3.0.32/fs/reiserfs/file.c
+--- linux-2.6.22.18/fs/reiserfs/file.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/reiserfs/file.c 2008-02-11 12:35:35.000000000 +0100
@@ -1546,4 +1546,5 @@ const struct inode_operations reiserfs_f
.listxattr = reiserfs_listxattr,
.removexattr = reiserfs_removexattr,
.permission = reiserfs_permission,
+ .sync_flags = reiserfs_sync_flags,
};
-diff -NurpP --minimal linux-2.6.22.10/fs/reiserfs/inode.c linux-2.6.22.10-vs2.3.0.29/fs/reiserfs/inode.c
---- linux-2.6.22.10/fs/reiserfs/inode.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/reiserfs/inode.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/reiserfs/inode.c linux-2.6.22.18-vs2.3.0.32/fs/reiserfs/inode.c
+--- linux-2.6.22.18/fs/reiserfs/inode.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/reiserfs/inode.c 2008-02-11 12:35:35.000000000 +0100
@@ -16,6 +16,8 @@
#include <linux/mpage.h>
#include <linux/writeback.h>
mark_inode_dirty(inode);
error =
journal_end(&th, inode->i_sb, jbegin_count);
-diff -NurpP --minimal linux-2.6.22.10/fs/reiserfs/ioctl.c linux-2.6.22.10-vs2.3.0.29/fs/reiserfs/ioctl.c
---- linux-2.6.22.10/fs/reiserfs/ioctl.c 2007-02-06 03:01:29 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/reiserfs/ioctl.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/reiserfs/ioctl.c linux-2.6.22.18-vs2.3.0.32/fs/reiserfs/ioctl.c
+--- linux-2.6.22.18/fs/reiserfs/ioctl.c 2007-05-04 15:58:22.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/reiserfs/ioctl.c 2008-02-11 12:35:35.000000000 +0100
@@ -6,6 +6,7 @@
#include <linux/fs.h>
#include <linux/reiserfs_fs.h>
return -EROFS;
if (get_user(inode->i_generation, (int __user *)arg))
return -EFAULT;
-diff -NurpP --minimal linux-2.6.22.10/fs/reiserfs/namei.c linux-2.6.22.10-vs2.3.0.29/fs/reiserfs/namei.c
---- linux-2.6.22.10/fs/reiserfs/namei.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/reiserfs/namei.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/reiserfs/namei.c linux-2.6.22.18-vs2.3.0.32/fs/reiserfs/namei.c
+--- linux-2.6.22.18/fs/reiserfs/namei.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/reiserfs/namei.c 2008-02-11 12:35:35.000000000 +0100
@@ -17,6 +17,7 @@
#include <linux/reiserfs_acl.h>
#include <linux/reiserfs_xattr.h>
+ .sync_flags = reiserfs_sync_flags,
};
-diff -NurpP --minimal linux-2.6.22.10/fs/reiserfs/stree.c linux-2.6.22.10-vs2.3.0.29/fs/reiserfs/stree.c
---- linux-2.6.22.10/fs/reiserfs/stree.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/reiserfs/stree.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/reiserfs/stree.c linux-2.6.22.18-vs2.3.0.32/fs/reiserfs/stree.c
+--- linux-2.6.22.18/fs/reiserfs/stree.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/reiserfs/stree.c 2008-02-11 12:35:35.000000000 +0100
@@ -55,6 +55,7 @@
#include <linux/reiserfs_fs.h>
#include <linux/buffer_head.h>
+ }
return retval;
}
-diff -NurpP --minimal linux-2.6.22.10/fs/reiserfs/super.c linux-2.6.22.10-vs2.3.0.29/fs/reiserfs/super.c
---- linux-2.6.22.10/fs/reiserfs/super.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/reiserfs/super.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/reiserfs/super.c linux-2.6.22.18-vs2.3.0.32/fs/reiserfs/super.c
+--- linux-2.6.22.18/fs/reiserfs/super.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/reiserfs/super.c 2008-02-11 12:35:35.000000000 +0100
@@ -882,6 +882,14 @@ static int reiserfs_parse_options(struct
{"user_xattr",.setmask = 1 << REISERFS_UNSUPPORTED_OPT},
{"nouser_xattr",.clrmask = 1 << REISERFS_UNSUPPORTED_OPT},
rs = SB_DISK_SUPER_BLOCK(s);
/* Let's do basic sanity check to verify that underlying device is not
smaller than the filesystem. If the check fails then abort and scream,
-diff -NurpP --minimal linux-2.6.22.10/fs/reiserfs/xattr.c linux-2.6.22.10-vs2.3.0.29/fs/reiserfs/xattr.c
---- linux-2.6.22.10/fs/reiserfs/xattr.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/reiserfs/xattr.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/reiserfs/xattr.c linux-2.6.22.18-vs2.3.0.32/fs/reiserfs/xattr.c
+--- linux-2.6.22.18/fs/reiserfs/xattr.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/reiserfs/xattr.c 2008-02-11 12:35:35.000000000 +0100
@@ -35,6 +35,7 @@
#include <linux/namei.h>
#include <linux/errno.h>
reiserfs_write_unlock_xattrs(inode->i_sb);
dput(root);
} else {
-diff -NurpP --minimal linux-2.6.22.10/fs/stat.c linux-2.6.22.10-vs2.3.0.29/fs/stat.c
---- linux-2.6.22.10/fs/stat.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/stat.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/stat.c linux-2.6.22.18-vs2.3.0.32/fs/stat.c
+--- linux-2.6.22.18/fs/stat.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/stat.c 2008-02-11 12:35:35.000000000 +0100
@@ -26,6 +26,7 @@ void generic_fillattr(struct inode *inod
stat->nlink = inode->i_nlink;
stat->uid = inode->i_uid;
stat->rdev = inode->i_rdev;
stat->atime = inode->i_atime;
stat->mtime = inode->i_mtime;
-diff -NurpP --minimal linux-2.6.22.10/fs/super.c linux-2.6.22.10-vs2.3.0.29/fs/super.c
---- linux-2.6.22.10/fs/super.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/super.c 2007-10-20 00:00:59 +0200
+diff -Nurp linux-2.6.22.18/fs/super.c linux-2.6.22.18-vs2.3.0.32/fs/super.c
+--- linux-2.6.22.18/fs/super.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/super.c 2008-02-11 12:35:35.000000000 +0100
@@ -37,6 +37,9 @@
#include <linux/idr.h>
#include <linux/kobject.h>
if (error)
goto out_sb;
-diff -NurpP --minimal linux-2.6.22.10/fs/sysfs/mount.c linux-2.6.22.10-vs2.3.0.29/fs/sysfs/mount.c
---- linux-2.6.22.10/fs/sysfs/mount.c 2007-07-09 13:19:28 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/sysfs/mount.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/sysfs/mount.c linux-2.6.22.18-vs2.3.0.32/fs/sysfs/mount.c
+--- linux-2.6.22.18/fs/sysfs/mount.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/sysfs/mount.c 2008-02-11 12:35:35.000000000 +0100
@@ -12,8 +12,6 @@
#include "sysfs.h"
sb->s_op = &sysfs_ops;
sb->s_time_gran = 1;
sysfs_sb = sb;
-diff -NurpP --minimal linux-2.6.22.10/fs/utimes.c linux-2.6.22.10-vs2.3.0.29/fs/utimes.c
---- linux-2.6.22.10/fs/utimes.c 2007-07-09 13:19:29 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/utimes.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/utimes.c linux-2.6.22.18-vs2.3.0.32/fs/utimes.c
+--- linux-2.6.22.18/fs/utimes.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/utimes.c 2008-02-11 12:35:35.000000000 +0100
@@ -6,6 +6,8 @@
#include <linux/sched.h>
#include <linux/stat.h>
error = -EROFS;
if (IS_RDONLY(inode))
goto dput_and_out;
-diff -NurpP --minimal linux-2.6.22.10/fs/xattr.c linux-2.6.22.10-vs2.3.0.29/fs/xattr.c
---- linux-2.6.22.10/fs/xattr.c 2007-07-09 13:19:29 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/xattr.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/xattr.c linux-2.6.22.18-vs2.3.0.32/fs/xattr.c
+--- linux-2.6.22.18/fs/xattr.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/xattr.c 2008-02-11 12:35:35.000000000 +0100
@@ -17,6 +17,7 @@
#include <linux/module.h>
#include <linux/fsnotify.h>
fput(f);
return error;
}
-diff -NurpP --minimal linux-2.6.22.10/fs/xfs/linux-2.6/xfs_ioctl.c linux-2.6.22.10-vs2.3.0.29/fs/xfs/linux-2.6/xfs_ioctl.c
---- linux-2.6.22.10/fs/xfs/linux-2.6/xfs_ioctl.c 2007-05-02 19:25:22 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/xfs/linux-2.6/xfs_ioctl.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/xfs/linux-2.6/xfs_ioctl.c linux-2.6.22.18-vs2.3.0.32/fs/xfs/linux-2.6/xfs_ioctl.c
+--- linux-2.6.22.18/fs/xfs/linux-2.6/xfs_ioctl.c 2007-07-21 23:58:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/xfs/linux-2.6/xfs_ioctl.c 2008-02-11 12:35:35.000000000 +0100
@@ -1128,6 +1128,10 @@ xfs_di2lxflags(
if (di_flags & XFS_DIFLAG_IMMUTABLE)
if (di_flags & XFS_DIFLAG_APPEND)
flags |= FS_APPEND_FL;
if (di_flags & XFS_DIFLAG_SYNC)
-diff -NurpP --minimal linux-2.6.22.10/fs/xfs/linux-2.6/xfs_iops.c linux-2.6.22.10-vs2.3.0.29/fs/xfs/linux-2.6/xfs_iops.c
---- linux-2.6.22.10/fs/xfs/linux-2.6/xfs_iops.c 2007-05-02 19:25:22 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/xfs/linux-2.6/xfs_iops.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/xfs/linux-2.6/xfs_iops.c linux-2.6.22.18-vs2.3.0.32/fs/xfs/linux-2.6/xfs_iops.c
+--- linux-2.6.22.18/fs/xfs/linux-2.6/xfs_iops.c 2007-07-21 23:58:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/xfs/linux-2.6/xfs_iops.c 2008-02-11 12:35:35.000000000 +0100
@@ -51,6 +51,7 @@
#include <linux/xattr.h>
#include <linux/namei.h>
.removexattr = xfs_vn_removexattr,
+ .sync_flags = xfs_vn_sync_flags,
};
-diff -NurpP --minimal linux-2.6.22.10/fs/xfs/linux-2.6/xfs_linux.h linux-2.6.22.10-vs2.3.0.29/fs/xfs/linux-2.6/xfs_linux.h
---- linux-2.6.22.10/fs/xfs/linux-2.6/xfs_linux.h 2007-05-02 19:25:22 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/xfs/linux-2.6/xfs_linux.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/xfs/linux-2.6/xfs_linux.h linux-2.6.22.18-vs2.3.0.32/fs/xfs/linux-2.6/xfs_linux.h
+--- linux-2.6.22.18/fs/xfs/linux-2.6/xfs_linux.h 2007-07-21 23:58:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/xfs/linux-2.6/xfs_linux.h 2008-02-11 12:35:35.000000000 +0100
@@ -129,6 +129,7 @@
#define current_pid() (current->pid)
#define current_fsuid(cred) (current->fsuid)
#define current_test_flags(f) (current->flags & (f))
#define current_set_flags_nested(sp, f) \
(*(sp) = current->flags, current->flags |= (f))
-diff -NurpP --minimal linux-2.6.22.10/fs/xfs/linux-2.6/xfs_super.c linux-2.6.22.10-vs2.3.0.29/fs/xfs/linux-2.6/xfs_super.c
---- linux-2.6.22.10/fs/xfs/linux-2.6/xfs_super.c 2007-07-09 13:19:29 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/xfs/linux-2.6/xfs_super.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/xfs/linux-2.6/xfs_super.c linux-2.6.22.18-vs2.3.0.32/fs/xfs/linux-2.6/xfs_super.c
+--- linux-2.6.22.18/fs/xfs/linux-2.6/xfs_super.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/xfs/linux-2.6/xfs_super.c 2008-02-11 12:35:35.000000000 +0100
@@ -157,6 +157,7 @@ xfs_revalidate_inode(
inode->i_nlink = ip->i_d.di_nlink;
inode->i_uid = ip->i_d.di_uid;
if (!error)
error = bhv_vfs_mntupdate(vfsp, flags, args);
kmem_free(args, sizeof(*args));
-diff -NurpP --minimal linux-2.6.22.10/fs/xfs/linux-2.6/xfs_vnode.c linux-2.6.22.10-vs2.3.0.29/fs/xfs/linux-2.6/xfs_vnode.c
---- linux-2.6.22.10/fs/xfs/linux-2.6/xfs_vnode.c 2007-05-02 19:25:22 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/xfs/linux-2.6/xfs_vnode.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/xfs/linux-2.6/xfs_vnode.c linux-2.6.22.18-vs2.3.0.32/fs/xfs/linux-2.6/xfs_vnode.c
+--- linux-2.6.22.18/fs/xfs/linux-2.6/xfs_vnode.c 2007-07-21 23:58:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/xfs/linux-2.6/xfs_vnode.c 2008-02-11 12:35:35.000000000 +0100
@@ -119,6 +119,7 @@ vn_revalidate_core(
inode->i_nlink = vap->va_nlink;
inode->i_uid = vap->va_uid;
if (vap->va_xflags & XFS_XFLAG_APPEND)
inode->i_flags |= S_APPEND;
else
-diff -NurpP --minimal linux-2.6.22.10/fs/xfs/linux-2.6/xfs_vnode.h linux-2.6.22.10-vs2.3.0.29/fs/xfs/linux-2.6/xfs_vnode.h
---- linux-2.6.22.10/fs/xfs/linux-2.6/xfs_vnode.h 2007-07-09 13:19:29 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/xfs/linux-2.6/xfs_vnode.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/xfs/linux-2.6/xfs_vnode.h linux-2.6.22.18-vs2.3.0.32/fs/xfs/linux-2.6/xfs_vnode.h
+--- linux-2.6.22.18/fs/xfs/linux-2.6/xfs_vnode.h 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/xfs/linux-2.6/xfs_vnode.h 2008-02-11 12:35:35.000000000 +0100
@@ -350,6 +350,7 @@ typedef struct bhv_vattr {
xfs_nlink_t va_nlink; /* number of references to file */
uid_t va_uid; /* owner user id */
#define XFS_AT_STAT (XFS_AT_TYPE|XFS_AT_MODE|XFS_AT_UID|XFS_AT_GID|\
XFS_AT_FSID|XFS_AT_NODEID|XFS_AT_NLINK|XFS_AT_SIZE|\
-diff -NurpP --minimal linux-2.6.22.10/fs/xfs/quota/xfs_qm_syscalls.c linux-2.6.22.10-vs2.3.0.29/fs/xfs/quota/xfs_qm_syscalls.c
---- linux-2.6.22.10/fs/xfs/quota/xfs_qm_syscalls.c 2007-07-09 13:19:29 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/xfs/quota/xfs_qm_syscalls.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/xfs/quota/xfs_qm_syscalls.c linux-2.6.22.18-vs2.3.0.32/fs/xfs/quota/xfs_qm_syscalls.c
+--- linux-2.6.22.18/fs/xfs/quota/xfs_qm_syscalls.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/xfs/quota/xfs_qm_syscalls.c 2008-02-11 12:35:35.000000000 +0100
@@ -17,6 +17,7 @@
*/
return XFS_ERROR(EPERM);
if ((newlim->d_fieldmask &
-diff -NurpP --minimal linux-2.6.22.10/fs/xfs/xfs_clnt.h linux-2.6.22.10-vs2.3.0.29/fs/xfs/xfs_clnt.h
---- linux-2.6.22.10/fs/xfs/xfs_clnt.h 2006-06-18 04:54:50 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/xfs/xfs_clnt.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/xfs/xfs_clnt.h linux-2.6.22.18-vs2.3.0.32/fs/xfs/xfs_clnt.h
+--- linux-2.6.22.18/fs/xfs/xfs_clnt.h 2006-06-18 03:49:35.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/xfs/xfs_clnt.h 2008-02-11 12:35:35.000000000 +0100
@@ -99,5 +99,7 @@ struct xfs_mount_args {
*/
#define XFSMNT2_COMPAT_IOSIZE 0x00000001 /* don't report large preferred
+
#endif /* __XFS_CLNT_H__ */
-diff -NurpP --minimal linux-2.6.22.10/fs/xfs/xfs_dinode.h linux-2.6.22.10-vs2.3.0.29/fs/xfs/xfs_dinode.h
---- linux-2.6.22.10/fs/xfs/xfs_dinode.h 2006-09-20 16:58:40 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/xfs/xfs_dinode.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/xfs/xfs_dinode.h linux-2.6.22.18-vs2.3.0.32/fs/xfs/xfs_dinode.h
+--- linux-2.6.22.18/fs/xfs/xfs_dinode.h 2007-05-04 15:55:41.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/xfs/xfs_dinode.h 2008-02-11 12:35:35.000000000 +0100
@@ -53,7 +53,8 @@ typedef struct xfs_dinode_core
__uint32_t di_gid; /* owner's group id */
__uint32_t di_nlink; /* number of links to file */
+ XFS_DIFLAG_IUNLINK)
#endif /* __XFS_DINODE_H__ */
-diff -NurpP --minimal linux-2.6.22.10/fs/xfs/xfs_fs.h linux-2.6.22.10-vs2.3.0.29/fs/xfs/xfs_fs.h
---- linux-2.6.22.10/fs/xfs/xfs_fs.h 2006-11-30 21:19:29 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/fs/xfs/xfs_fs.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/xfs/xfs_fs.h linux-2.6.22.18-vs2.3.0.32/fs/xfs/xfs_fs.h
+--- linux-2.6.22.18/fs/xfs/xfs_fs.h 2007-05-04 15:57:37.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/xfs/xfs_fs.h 2008-02-11 12:35:35.000000000 +0100
@@ -66,6 +66,8 @@ struct fsxattr {
#define XFS_XFLAG_EXTSIZE 0x00000800 /* extent size allocator hint */
#define XFS_XFLAG_EXTSZINHERIT 0x00001000 /* inherit inode extent size */
__u32 bs_dmevmask; /* DMIG event mask */
__u16 bs_dmstate; /* DMIG state info */
__u16 bs_aextents; /* attribute number of extents */
-diff -NurpP --minimal linux-2.6.22.10/fs/xfs/xfs_inode.c linux-2.6.22.10-vs2.3.0.29/fs/xfs/xfs_inode.c
---- linux-2.6.22.10/fs/xfs/xfs_inode.c 2007-07-09 13:19:34 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/xfs/xfs_inode.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/xfs/xfs_inode.c linux-2.6.22.18-vs2.3.0.32/fs/xfs/xfs_inode.c
+--- linux-2.6.22.18/fs/xfs/xfs_inode.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/xfs/xfs_inode.c 2008-02-11 12:35:35.000000000 +0100
@@ -49,6 +49,7 @@
#include "xfs_quota.h"
#include "xfs_acl.h"
ip->i_d.di_projid = prid;
memset(&(ip->i_d.di_pad[0]), 0, sizeof(ip->i_d.di_pad));
-diff -NurpP --minimal linux-2.6.22.10/fs/xfs/xfs_itable.c linux-2.6.22.10-vs2.3.0.29/fs/xfs/xfs_itable.c
---- linux-2.6.22.10/fs/xfs/xfs_itable.c 2007-07-09 13:19:34 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/xfs/xfs_itable.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/xfs/xfs_itable.c linux-2.6.22.18-vs2.3.0.32/fs/xfs/xfs_itable.c
+--- linux-2.6.22.18/fs/xfs/xfs_itable.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/xfs/xfs_itable.c 2008-02-11 12:35:35.000000000 +0100
@@ -89,6 +89,7 @@ xfs_bulkstat_one_iget(
buf->bs_mode = dic->di_mode;
buf->bs_uid = dic->di_uid;
buf->bs_size = INT_GET(dic->di_size, ARCH_CONVERT);
buf->bs_atime.tv_sec = INT_GET(dic->di_atime.t_sec, ARCH_CONVERT);
buf->bs_atime.tv_nsec = INT_GET(dic->di_atime.t_nsec, ARCH_CONVERT);
-diff -NurpP --minimal linux-2.6.22.10/fs/xfs/xfs_mount.h linux-2.6.22.10-vs2.3.0.29/fs/xfs/xfs_mount.h
---- linux-2.6.22.10/fs/xfs/xfs_mount.h 2007-05-02 19:25:23 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/xfs/xfs_mount.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/xfs/xfs_mount.h linux-2.6.22.18-vs2.3.0.32/fs/xfs/xfs_mount.h
+--- linux-2.6.22.18/fs/xfs/xfs_mount.h 2007-07-21 23:58:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/xfs/xfs_mount.h 2008-02-11 12:35:35.000000000 +0100
@@ -464,6 +464,7 @@ typedef struct xfs_mount {
#define XFS_MOUNT_NO_PERCPU_SB (1ULL << 23) /* don't use per-cpu superblock
counters */
/*
* Default minimum read and write sizes.
-diff -NurpP --minimal linux-2.6.22.10/fs/xfs/xfs_vfsops.c linux-2.6.22.10-vs2.3.0.29/fs/xfs/xfs_vfsops.c
---- linux-2.6.22.10/fs/xfs/xfs_vfsops.c 2007-07-09 13:19:34 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/xfs/xfs_vfsops.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/xfs/xfs_vfsops.c linux-2.6.22.18-vs2.3.0.32/fs/xfs/xfs_vfsops.c
+--- linux-2.6.22.18/fs/xfs/xfs_vfsops.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/xfs/xfs_vfsops.c 2008-02-11 12:35:35.000000000 +0100
@@ -300,6 +300,8 @@ xfs_start_flags(
if (ap->flags2 & XFSMNT2_COMPAT_IOSIZE)
} else if (!strcmp(this_char, "osyncisdsync")) {
/* no-op, this is now the default */
cmn_err(CE_WARN,
-diff -NurpP --minimal linux-2.6.22.10/fs/xfs/xfs_vnodeops.c linux-2.6.22.10-vs2.3.0.29/fs/xfs/xfs_vnodeops.c
---- linux-2.6.22.10/fs/xfs/xfs_vnodeops.c 2007-07-09 13:19:34 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/fs/xfs/xfs_vnodeops.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/fs/xfs/xfs_vnodeops.c linux-2.6.22.18-vs2.3.0.32/fs/xfs/xfs_vnodeops.c
+--- linux-2.6.22.18/fs/xfs/xfs_vnodeops.c 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/fs/xfs/xfs_vnodeops.c 2008-02-11 12:35:35.000000000 +0100
@@ -159,6 +159,7 @@ xfs_getattr(
vap->va_mode = ip->i_d.di_mode;
vap->va_uid = ip->i_d.di_uid;
if (vap->va_xflags & XFS_XFLAG_APPEND)
di_flags |= XFS_DIFLAG_APPEND;
if (vap->va_xflags & XFS_XFLAG_SYNC)
-diff -NurpP --minimal linux-2.6.22.10/include/asm-alpha/socket.h linux-2.6.22.10-vs2.3.0.29/include/asm-alpha/socket.h
---- linux-2.6.22.10/include/asm-alpha/socket.h 2007-07-09 13:19:35 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-alpha/socket.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-alpha/socket.h linux-2.6.22.18-vs2.3.0.32/include/asm-alpha/socket.h
+--- linux-2.6.22.18/include/asm-alpha/socket.h 2007-07-22 00:00:18.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-alpha/socket.h 2008-02-11 12:35:35.000000000 +0100
@@ -55,6 +55,8 @@
#define SO_TIMESTAMPNS 35
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
/* Security levels - as per NRL IPv6 - don't actually do anything */
#define SO_SECURITY_AUTHENTICATION 19
#define SO_SECURITY_ENCRYPTION_TRANSPORT 20
-diff -NurpP --minimal linux-2.6.22.10/include/asm-arm/socket.h linux-2.6.22.10-vs2.3.0.29/include/asm-arm/socket.h
---- linux-2.6.22.10/include/asm-arm/socket.h 2007-07-09 13:19:39 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-arm/socket.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-arm/socket.h linux-2.6.22.18-vs2.3.0.32/include/asm-arm/socket.h
+--- linux-2.6.22.18/include/asm-arm/socket.h 2007-07-22 00:00:19.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-arm/socket.h 2008-02-11 12:35:35.000000000 +0100
@@ -52,4 +52,6 @@
#define SO_TIMESTAMPNS 35
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
+#define SO_PEERTAG 36
+
#endif /* _ASM_SOCKET_H */
-diff -NurpP --minimal linux-2.6.22.10/include/asm-arm/tlb.h linux-2.6.22.10-vs2.3.0.29/include/asm-arm/tlb.h
---- linux-2.6.22.10/include/asm-arm/tlb.h 2006-06-18 04:54:58 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-arm/tlb.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-arm/tlb.h linux-2.6.22.18-vs2.3.0.32/include/asm-arm/tlb.h
+--- linux-2.6.22.18/include/asm-arm/tlb.h 2006-06-18 03:49:35.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-arm/tlb.h 2008-02-11 12:35:35.000000000 +0100
@@ -28,6 +28,7 @@
#else /* !CONFIG_MMU */
/*
* TLB handling. This allows us to remove pages from the page
-diff -NurpP --minimal linux-2.6.22.10/include/asm-arm26/tlb.h linux-2.6.22.10-vs2.3.0.29/include/asm-arm26/tlb.h
---- linux-2.6.22.10/include/asm-arm26/tlb.h 2006-01-03 17:30:02 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-arm26/tlb.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-arm26/tlb.h linux-2.6.22.18-vs2.3.0.32/include/asm-arm26/tlb.h
+--- linux-2.6.22.18/include/asm-arm26/tlb.h 2006-06-18 03:49:35.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-arm26/tlb.h 2008-02-11 12:35:35.000000000 +0100
@@ -3,6 +3,7 @@
#include <asm/pgalloc.h>
/*
* TLB handling. This allows us to remove pages from the page
-diff -NurpP --minimal linux-2.6.22.10/include/asm-arm26/unistd.h linux-2.6.22.10-vs2.3.0.29/include/asm-arm26/unistd.h
---- linux-2.6.22.10/include/asm-arm26/unistd.h 2007-02-06 03:01:35 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-arm26/unistd.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-arm26/unistd.h linux-2.6.22.18-vs2.3.0.32/include/asm-arm26/unistd.h
+--- linux-2.6.22.18/include/asm-arm26/unistd.h 2007-05-04 15:58:22.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-arm26/unistd.h 2008-02-11 12:35:35.000000000 +0100
@@ -302,6 +302,8 @@
#define __NR_mq_getsetattr (__NR_SYSCALL_BASE+279)
#define __NR_waitid (__NR_SYSCALL_BASE+280)
/*
* The following SWIs are ARM private. FIXME - make appropriate for arm26
*/
-diff -NurpP --minimal linux-2.6.22.10/include/asm-cris/socket.h linux-2.6.22.10-vs2.3.0.29/include/asm-cris/socket.h
---- linux-2.6.22.10/include/asm-cris/socket.h 2007-07-09 13:19:40 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-cris/socket.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-cris/socket.h linux-2.6.22.18-vs2.3.0.32/include/asm-cris/socket.h
+--- linux-2.6.22.18/include/asm-cris/socket.h 2007-07-22 00:00:19.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-cris/socket.h 2008-02-11 12:35:35.000000000 +0100
@@ -54,6 +54,8 @@
#define SO_TIMESTAMPNS 35
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
#endif /* _ASM_SOCKET_H */
-diff -NurpP --minimal linux-2.6.22.10/include/asm-frv/socket.h linux-2.6.22.10-vs2.3.0.29/include/asm-frv/socket.h
---- linux-2.6.22.10/include/asm-frv/socket.h 2007-07-09 13:19:40 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-frv/socket.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-frv/socket.h linux-2.6.22.18-vs2.3.0.32/include/asm-frv/socket.h
+--- linux-2.6.22.18/include/asm-frv/socket.h 2007-07-22 00:00:19.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-frv/socket.h 2008-02-11 12:35:35.000000000 +0100
@@ -52,5 +52,7 @@
#define SO_TIMESTAMPNS 35
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
+
#endif /* _ASM_SOCKET_H */
-diff -NurpP --minimal linux-2.6.22.10/include/asm-generic/tlb.h linux-2.6.22.10-vs2.3.0.29/include/asm-generic/tlb.h
---- linux-2.6.22.10/include/asm-generic/tlb.h 2006-11-30 21:19:31 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-generic/tlb.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-generic/tlb.h linux-2.6.22.18-vs2.3.0.32/include/asm-generic/tlb.h
+--- linux-2.6.22.18/include/asm-generic/tlb.h 2007-05-04 15:57:38.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-generic/tlb.h 2008-02-11 12:35:35.000000000 +0100
@@ -14,6 +14,7 @@
#define _ASM_GENERIC__TLB_H
#include <asm/pgalloc.h>
#include <asm/tlbflush.h>
-diff -NurpP --minimal linux-2.6.22.10/include/asm-h8300/socket.h linux-2.6.22.10-vs2.3.0.29/include/asm-h8300/socket.h
---- linux-2.6.22.10/include/asm-h8300/socket.h 2007-07-09 13:19:40 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-h8300/socket.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-h8300/socket.h linux-2.6.22.18-vs2.3.0.32/include/asm-h8300/socket.h
+--- linux-2.6.22.18/include/asm-h8300/socket.h 2007-07-22 00:00:19.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-h8300/socket.h 2008-02-11 12:35:35.000000000 +0100
@@ -52,4 +52,6 @@
#define SO_TIMESTAMPNS 35
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
+#define SO_PEERTAG 36
+
#endif /* _ASM_SOCKET_H */
-diff -NurpP --minimal linux-2.6.22.10/include/asm-i386/socket.h linux-2.6.22.10-vs2.3.0.29/include/asm-i386/socket.h
---- linux-2.6.22.10/include/asm-i386/socket.h 2007-07-09 13:19:42 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-i386/socket.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-i386/socket.h linux-2.6.22.18-vs2.3.0.32/include/asm-i386/socket.h
+--- linux-2.6.22.18/include/asm-i386/socket.h 2007-07-22 00:00:19.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-i386/socket.h 2008-02-11 12:35:35.000000000 +0100
@@ -52,4 +52,6 @@
#define SO_TIMESTAMPNS 35
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
+#define SO_PEERTAG 36
+
#endif /* _ASM_SOCKET_H */
-diff -NurpP --minimal linux-2.6.22.10/include/asm-ia64/socket.h linux-2.6.22.10-vs2.3.0.29/include/asm-ia64/socket.h
---- linux-2.6.22.10/include/asm-ia64/socket.h 2007-07-09 13:19:43 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-ia64/socket.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-ia64/socket.h linux-2.6.22.18-vs2.3.0.32/include/asm-ia64/socket.h
+--- linux-2.6.22.18/include/asm-ia64/socket.h 2007-07-22 00:00:19.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-ia64/socket.h 2008-02-11 12:35:35.000000000 +0100
@@ -61,4 +61,6 @@
#define SO_TIMESTAMPNS 35
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
+#define SO_PEERTAG 36
+
#endif /* _ASM_IA64_SOCKET_H */
-diff -NurpP --minimal linux-2.6.22.10/include/asm-ia64/tlb.h linux-2.6.22.10-vs2.3.0.29/include/asm-ia64/tlb.h
---- linux-2.6.22.10/include/asm-ia64/tlb.h 2006-09-20 16:58:40 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-ia64/tlb.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-ia64/tlb.h linux-2.6.22.18-vs2.3.0.32/include/asm-ia64/tlb.h
+--- linux-2.6.22.18/include/asm-ia64/tlb.h 2007-05-04 15:55:44.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-ia64/tlb.h 2008-02-11 12:35:35.000000000 +0100
@@ -40,6 +40,7 @@
#include <linux/mm.h>
#include <linux/pagemap.h>
#include <asm/pgalloc.h>
#include <asm/processor.h>
-diff -NurpP --minimal linux-2.6.22.10/include/asm-m32r/socket.h linux-2.6.22.10-vs2.3.0.29/include/asm-m32r/socket.h
---- linux-2.6.22.10/include/asm-m32r/socket.h 2007-07-09 13:19:43 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-m32r/socket.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-m32r/socket.h linux-2.6.22.18-vs2.3.0.32/include/asm-m32r/socket.h
+--- linux-2.6.22.18/include/asm-m32r/socket.h 2007-07-22 00:00:19.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-m32r/socket.h 2008-02-11 12:35:35.000000000 +0100
@@ -52,4 +52,6 @@
#define SO_TIMESTAMPNS 35
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
+#define SO_PEERTAG 36
+
#endif /* _ASM_M32R_SOCKET_H */
-diff -NurpP --minimal linux-2.6.22.10/include/asm-mips/socket.h linux-2.6.22.10-vs2.3.0.29/include/asm-mips/socket.h
---- linux-2.6.22.10/include/asm-mips/socket.h 2007-07-09 13:19:44 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-mips/socket.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-mips/socket.h linux-2.6.22.18-vs2.3.0.32/include/asm-mips/socket.h
+--- linux-2.6.22.18/include/asm-mips/socket.h 2007-07-22 00:00:19.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-mips/socket.h 2008-02-11 12:35:35.000000000 +0100
@@ -73,6 +73,8 @@ To add: #define SO_REUSEPORT 0x0200 /* A
#define SO_TIMESTAMPNS 35
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
#ifdef __KERNEL__
/** sock_type - Socket types
-diff -NurpP --minimal linux-2.6.22.10/include/asm-parisc/socket.h linux-2.6.22.10-vs2.3.0.29/include/asm-parisc/socket.h
---- linux-2.6.22.10/include/asm-parisc/socket.h 2007-07-09 13:19:44 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-parisc/socket.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-parisc/socket.h linux-2.6.22.18-vs2.3.0.32/include/asm-parisc/socket.h
+--- linux-2.6.22.18/include/asm-parisc/socket.h 2007-07-22 00:00:20.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-parisc/socket.h 2008-02-11 12:35:35.000000000 +0100
@@ -51,5 +51,6 @@
#define SO_PEERSEC 0x401d
+#define SO_PEERTAG 0x401f
#endif /* _ASM_SOCKET_H */
-diff -NurpP --minimal linux-2.6.22.10/include/asm-powerpc/socket.h linux-2.6.22.10-vs2.3.0.29/include/asm-powerpc/socket.h
---- linux-2.6.22.10/include/asm-powerpc/socket.h 2007-07-09 13:19:44 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-powerpc/socket.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-powerpc/socket.h linux-2.6.22.18-vs2.3.0.32/include/asm-powerpc/socket.h
+--- linux-2.6.22.18/include/asm-powerpc/socket.h 2007-07-22 00:00:20.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-powerpc/socket.h 2008-02-11 12:35:35.000000000 +0100
@@ -59,4 +59,6 @@
#define SO_TIMESTAMPNS 35
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
+#define SO_PEERTAG 36
+
#endif /* _ASM_POWERPC_SOCKET_H */
-diff -NurpP --minimal linux-2.6.22.10/include/asm-powerpc/systbl.h linux-2.6.22.10-vs2.3.0.29/include/asm-powerpc/systbl.h
---- linux-2.6.22.10/include/asm-powerpc/systbl.h 2007-07-09 13:19:44 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-powerpc/systbl.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-powerpc/systbl.h linux-2.6.22.18-vs2.3.0.32/include/asm-powerpc/systbl.h
+--- linux-2.6.22.18/include/asm-powerpc/systbl.h 2007-07-22 00:00:20.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-powerpc/systbl.h 2008-02-11 12:35:35.000000000 +0100
@@ -260,7 +260,7 @@ COMPAT_SYS_SPU(fstatfs64)
SYSX(sys_ni_syscall, ppc_fadvise64_64, ppc_fadvise64_64)
PPC_SYS_SPU(rtas)
COMPAT_SYS(migrate_pages)
COMPAT_SYS(mbind)
COMPAT_SYS(get_mempolicy)
-diff -NurpP --minimal linux-2.6.22.10/include/asm-powerpc/unistd.h linux-2.6.22.10-vs2.3.0.29/include/asm-powerpc/unistd.h
---- linux-2.6.22.10/include/asm-powerpc/unistd.h 2007-07-09 13:19:45 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-powerpc/unistd.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-powerpc/unistd.h linux-2.6.22.18-vs2.3.0.32/include/asm-powerpc/unistd.h
+--- linux-2.6.22.18/include/asm-powerpc/unistd.h 2007-07-22 00:00:20.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-powerpc/unistd.h 2008-02-11 12:35:35.000000000 +0100
@@ -275,7 +275,7 @@
#endif
#define __NR_rtas 255
#define __NR_migrate_pages 258
#define __NR_mbind 259
#define __NR_get_mempolicy 260
-diff -NurpP --minimal linux-2.6.22.10/include/asm-s390/socket.h linux-2.6.22.10-vs2.3.0.29/include/asm-s390/socket.h
---- linux-2.6.22.10/include/asm-s390/socket.h 2007-07-09 13:19:45 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-s390/socket.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-s390/socket.h linux-2.6.22.18-vs2.3.0.32/include/asm-s390/socket.h
+--- linux-2.6.22.18/include/asm-s390/socket.h 2007-07-22 00:00:20.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-s390/socket.h 2008-02-11 12:35:35.000000000 +0100
@@ -60,4 +60,6 @@
#define SO_TIMESTAMPNS 35
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
+#define SO_PEERTAG 36
+
#endif /* _ASM_SOCKET_H */
-diff -NurpP --minimal linux-2.6.22.10/include/asm-s390/unistd.h linux-2.6.22.10-vs2.3.0.29/include/asm-s390/unistd.h
---- linux-2.6.22.10/include/asm-s390/unistd.h 2007-07-09 13:19:45 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-s390/unistd.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-s390/unistd.h linux-2.6.22.18-vs2.3.0.32/include/asm-s390/unistd.h
+--- linux-2.6.22.18/include/asm-s390/unistd.h 2007-07-22 00:00:20.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-s390/unistd.h 2008-02-11 12:35:35.000000000 +0100
@@ -202,7 +202,7 @@
#define __NR_clock_gettime (__NR_timer_create+6)
#define __NR_clock_getres (__NR_timer_create+7)
#define __NR_statfs64 265
#define __NR_fstatfs64 266
#define __NR_remap_file_pages 267
-diff -NurpP --minimal linux-2.6.22.10/include/asm-sh/socket.h linux-2.6.22.10-vs2.3.0.29/include/asm-sh/socket.h
---- linux-2.6.22.10/include/asm-sh/socket.h 2007-07-09 13:19:45 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-sh/socket.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-sh/socket.h linux-2.6.22.18-vs2.3.0.32/include/asm-sh/socket.h
+--- linux-2.6.22.18/include/asm-sh/socket.h 2007-07-22 00:00:20.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-sh/socket.h 2008-02-11 12:35:35.000000000 +0100
@@ -52,4 +52,6 @@
#define SO_TIMESTAMPNS 35
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
+#define SO_PEERTAG 36
+
#endif /* __ASM_SH_SOCKET_H */
-diff -NurpP --minimal linux-2.6.22.10/include/asm-sparc/socket.h linux-2.6.22.10-vs2.3.0.29/include/asm-sparc/socket.h
---- linux-2.6.22.10/include/asm-sparc/socket.h 2007-07-09 13:19:54 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-sparc/socket.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-sparc/socket.h linux-2.6.22.18-vs2.3.0.32/include/asm-sparc/socket.h
+--- linux-2.6.22.18/include/asm-sparc/socket.h 2007-07-22 00:00:20.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-sparc/socket.h 2008-02-11 12:35:35.000000000 +0100
@@ -52,6 +52,8 @@
#define SO_TIMESTAMPNS 0x0021
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
/* Security levels - as per NRL IPv6 - don't actually do anything */
#define SO_SECURITY_AUTHENTICATION 0x5001
#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002
-diff -NurpP --minimal linux-2.6.22.10/include/asm-sparc/unistd.h linux-2.6.22.10-vs2.3.0.29/include/asm-sparc/unistd.h
---- linux-2.6.22.10/include/asm-sparc/unistd.h 2007-07-09 13:19:54 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-sparc/unistd.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-sparc/unistd.h linux-2.6.22.18-vs2.3.0.32/include/asm-sparc/unistd.h
+--- linux-2.6.22.18/include/asm-sparc/unistd.h 2007-07-22 00:00:20.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-sparc/unistd.h 2008-02-11 12:35:35.000000000 +0100
@@ -283,7 +283,7 @@
#define __NR_timer_getoverrun 264
#define __NR_timer_delete 265
#define __NR_io_setup 268
#define __NR_io_destroy 269
#define __NR_io_submit 270
-diff -NurpP --minimal linux-2.6.22.10/include/asm-sparc64/socket.h linux-2.6.22.10-vs2.3.0.29/include/asm-sparc64/socket.h
---- linux-2.6.22.10/include/asm-sparc64/socket.h 2007-07-09 13:19:54 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-sparc64/socket.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-sparc64/socket.h linux-2.6.22.18-vs2.3.0.32/include/asm-sparc64/socket.h
+--- linux-2.6.22.18/include/asm-sparc64/socket.h 2007-07-22 00:00:20.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-sparc64/socket.h 2008-02-11 12:35:35.000000000 +0100
@@ -52,6 +52,8 @@
#define SO_TIMESTAMPNS 0x0021
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
/* Security levels - as per NRL IPv6 - don't actually do anything */
#define SO_SECURITY_AUTHENTICATION 0x5001
#define SO_SECURITY_ENCRYPTION_TRANSPORT 0x5002
-diff -NurpP --minimal linux-2.6.22.10/include/asm-sparc64/tlb.h linux-2.6.22.10-vs2.3.0.29/include/asm-sparc64/tlb.h
---- linux-2.6.22.10/include/asm-sparc64/tlb.h 2007-07-09 13:19:54 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-sparc64/tlb.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-sparc64/tlb.h linux-2.6.22.18-vs2.3.0.32/include/asm-sparc64/tlb.h
+--- linux-2.6.22.18/include/asm-sparc64/tlb.h 2007-07-22 00:00:20.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-sparc64/tlb.h 2008-02-11 12:35:35.000000000 +0100
@@ -3,6 +3,7 @@
#include <linux/swap.h>
#include <asm/pgalloc.h>
#include <asm/tlbflush.h>
#include <asm/mmu_context.h>
-diff -NurpP --minimal linux-2.6.22.10/include/asm-sparc64/unistd.h linux-2.6.22.10-vs2.3.0.29/include/asm-sparc64/unistd.h
---- linux-2.6.22.10/include/asm-sparc64/unistd.h 2007-07-09 13:19:54 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-sparc64/unistd.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-sparc64/unistd.h linux-2.6.22.18-vs2.3.0.32/include/asm-sparc64/unistd.h
+--- linux-2.6.22.18/include/asm-sparc64/unistd.h 2007-07-22 00:00:20.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-sparc64/unistd.h 2008-02-11 12:35:35.000000000 +0100
@@ -285,7 +285,7 @@
#define __NR_timer_getoverrun 264
#define __NR_timer_delete 265
#define __NR_io_setup 268
#define __NR_io_destroy 269
#define __NR_io_submit 270
-diff -NurpP --minimal linux-2.6.22.10/include/asm-v850/socket.h linux-2.6.22.10-vs2.3.0.29/include/asm-v850/socket.h
---- linux-2.6.22.10/include/asm-v850/socket.h 2007-07-09 13:19:55 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-v850/socket.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-v850/socket.h linux-2.6.22.18-vs2.3.0.32/include/asm-v850/socket.h
+--- linux-2.6.22.18/include/asm-v850/socket.h 2007-07-22 00:00:20.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-v850/socket.h 2008-02-11 12:35:35.000000000 +0100
@@ -52,4 +52,6 @@
#define SO_TIMESTAMPNS 35
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
+#define SO_PEERTAG 36
+
#endif /* __V850_SOCKET_H__ */
-diff -NurpP --minimal linux-2.6.22.10/include/asm-x86_64/socket.h linux-2.6.22.10-vs2.3.0.29/include/asm-x86_64/socket.h
---- linux-2.6.22.10/include/asm-x86_64/socket.h 2007-07-09 13:19:55 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-x86_64/socket.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-x86_64/socket.h linux-2.6.22.18-vs2.3.0.32/include/asm-x86_64/socket.h
+--- linux-2.6.22.18/include/asm-x86_64/socket.h 2007-07-22 00:00:20.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-x86_64/socket.h 2008-02-11 12:35:35.000000000 +0100
@@ -52,4 +52,6 @@
#define SO_TIMESTAMPNS 35
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
+#define SO_PEERTAG 36
+
#endif /* _ASM_SOCKET_H */
-diff -NurpP --minimal linux-2.6.22.10/include/asm-x86_64/unistd.h linux-2.6.22.10-vs2.3.0.29/include/asm-x86_64/unistd.h
---- linux-2.6.22.10/include/asm-x86_64/unistd.h 2007-07-09 13:19:55 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-x86_64/unistd.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-x86_64/unistd.h linux-2.6.22.18-vs2.3.0.32/include/asm-x86_64/unistd.h
+--- linux-2.6.22.18/include/asm-x86_64/unistd.h 2007-07-22 00:00:20.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-x86_64/unistd.h 2008-02-11 12:35:35.000000000 +0100
@@ -532,7 +532,7 @@ __SYSCALL(__NR_tgkill, sys_tgkill)
#define __NR_utimes 235
__SYSCALL(__NR_utimes, sys_utimes)
#define __NR_mbind 237
__SYSCALL(__NR_mbind, sys_mbind)
#define __NR_set_mempolicy 238
-diff -NurpP --minimal linux-2.6.22.10/include/asm-xtensa/socket.h linux-2.6.22.10-vs2.3.0.29/include/asm-xtensa/socket.h
---- linux-2.6.22.10/include/asm-xtensa/socket.h 2007-07-09 13:19:55 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/asm-xtensa/socket.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/asm-xtensa/socket.h linux-2.6.22.18-vs2.3.0.32/include/asm-xtensa/socket.h
+--- linux-2.6.22.18/include/asm-xtensa/socket.h 2007-07-22 00:00:20.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/asm-xtensa/socket.h 2008-02-11 12:35:35.000000000 +0100
@@ -63,4 +63,6 @@
#define SO_TIMESTAMPNS 35
#define SCM_TIMESTAMPNS SO_TIMESTAMPNS
+#define SO_PEERTAG 36
+
#endif /* _XTENSA_SOCKET_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/Kbuild linux-2.6.22.10-vs2.3.0.29/include/linux/Kbuild
---- linux-2.6.22.10/include/linux/Kbuild 2007-10-30 01:57:14 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/Kbuild 2007-09-30 14:58:01 +0200
-@@ -351,3 +351,6 @@ unifdef-y += xattr.h
- unifdef-y += xfrm.h
-
- objhdr-y += version.h
-+
-+header-y += vserver/
-+
-diff -NurpP --minimal linux-2.6.22.10/include/linux/capability.h linux-2.6.22.10-vs2.3.0.29/include/linux/capability.h
---- linux-2.6.22.10/include/linux/capability.h 2007-07-09 13:19:55 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/capability.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/capability.h linux-2.6.22.18-vs2.3.0.32/include/linux/capability.h
+--- linux-2.6.22.18/include/linux/capability.h 2007-07-22 00:00:20.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/capability.h 2008-02-11 12:35:35.000000000 +0100
@@ -237,6 +237,7 @@ typedef __u32 kernel_cap_t;
arbitrary SCSI commands */
/* Allow setting encryption key on loopback filesystem */
#ifdef __KERNEL__
/*
* Bounding set
-diff -NurpP --minimal linux-2.6.22.10/include/linux/devpts_fs.h linux-2.6.22.10-vs2.3.0.29/include/linux/devpts_fs.h
---- linux-2.6.22.10/include/linux/devpts_fs.h 2004-08-14 12:55:59 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/devpts_fs.h 2007-10-06 18:19:52 +0200
+diff -Nurp linux-2.6.22.18/include/linux/devpts_fs.h linux-2.6.22.18-vs2.3.0.32/include/linux/devpts_fs.h
+--- linux-2.6.22.18/include/linux/devpts_fs.h 2006-06-18 03:49:35.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/devpts_fs.h 2008-02-11 12:35:35.000000000 +0100
@@ -30,5 +30,4 @@ static inline void devpts_pty_kill(int n
#endif
-
#endif /* _LINUX_DEVPTS_FS_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/ext2_fs.h linux-2.6.22.10-vs2.3.0.29/include/linux/ext2_fs.h
---- linux-2.6.22.10/include/linux/ext2_fs.h 2006-11-30 21:19:37 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/ext2_fs.h 2007-10-05 15:07:22 +0200
+diff -Nurp linux-2.6.22.18/include/linux/ext2_fs.h linux-2.6.22.18-vs2.3.0.32/include/linux/ext2_fs.h
+--- linux-2.6.22.18/include/linux/ext2_fs.h 2007-05-04 15:57:41.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/ext2_fs.h 2008-02-11 12:35:35.000000000 +0100
@@ -188,6 +188,8 @@ struct ext2_group_desc
#define EXT2_NOTAIL_FL FS_NOTAIL_FL /* file tail should not be merged */
#define EXT2_DIRSYNC_FL FS_DIRSYNC_FL /* dirsync behaviour (directories only) */
#define clear_opt(o, opt) o &= ~EXT2_MOUNT_##opt
-diff -NurpP --minimal linux-2.6.22.10/include/linux/ext3_fs.h linux-2.6.22.10-vs2.3.0.29/include/linux/ext3_fs.h
---- linux-2.6.22.10/include/linux/ext3_fs.h 2007-07-09 13:19:56 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/ext3_fs.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/ext3_fs.h linux-2.6.22.18-vs2.3.0.32/include/linux/ext3_fs.h
+--- linux-2.6.22.18/include/linux/ext3_fs.h 2007-07-22 00:00:20.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/ext3_fs.h 2008-02-11 12:35:35.000000000 +0100
@@ -177,6 +177,8 @@ struct ext3_group_desc
#define EXT3_NOTAIL_FL 0x00008000 /* file tail should not be merged */
#define EXT3_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */
extern void ext3_read_inode (struct inode *);
extern int ext3_write_inode (struct inode *, int);
-diff -NurpP --minimal linux-2.6.22.10/include/linux/ext4_fs.h linux-2.6.22.10-vs2.3.0.29/include/linux/ext4_fs.h
---- linux-2.6.22.10/include/linux/ext4_fs.h 2007-07-09 13:19:56 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/ext4_fs.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/ext4_fs.h linux-2.6.22.18-vs2.3.0.32/include/linux/ext4_fs.h
+--- linux-2.6.22.18/include/linux/ext4_fs.h 2007-07-22 00:00:22.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/ext4_fs.h 2008-02-11 12:35:35.000000000 +0100
@@ -189,8 +189,10 @@ struct ext4_group_desc
#define EXT4_NOTAIL_FL 0x00008000 /* file tail should not be merged */
#define EXT4_DIRSYNC_FL 0x00010000 /* dirsync behaviour (directories only) */
extern void ext4_read_inode (struct inode *);
extern int ext4_write_inode (struct inode *, int);
-diff -NurpP --minimal linux-2.6.22.10/include/linux/fs.h linux-2.6.22.10-vs2.3.0.29/include/linux/fs.h
---- linux-2.6.22.10/include/linux/fs.h 2007-07-09 13:19:56 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/fs.h 2007-10-20 00:01:05 +0200
+diff -Nurp linux-2.6.22.18/include/linux/fs.h linux-2.6.22.18-vs2.3.0.32/include/linux/fs.h
+--- linux-2.6.22.18/include/linux/fs.h 2007-07-22 00:00:23.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/fs.h 2008-02-11 12:35:35.000000000 +0100
@@ -123,6 +123,8 @@ extern int dir_notify_enable;
#define MS_SLAVE (1<<19) /* change to slave */
#define MS_SHARED (1<<20) /* change to shared */
extern int simple_getattr(struct vfsmount *, struct dentry *, struct kstat *);
extern int simple_statfs(struct dentry *, struct kstatfs *);
extern int simple_link(struct dentry *, struct inode *, struct dentry *);
-diff -NurpP --minimal linux-2.6.22.10/include/linux/init_task.h linux-2.6.22.10-vs2.3.0.29/include/linux/init_task.h
---- linux-2.6.22.10/include/linux/init_task.h 2007-07-09 13:19:56 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/init_task.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/init_task.h linux-2.6.22.18-vs2.3.0.32/include/linux/init_task.h
+--- linux-2.6.22.18/include/linux/init_task.h 2007-07-22 00:00:23.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/init_task.h 2008-02-11 12:35:35.000000000 +0100
@@ -169,6 +169,10 @@ extern struct group_info init_groups;
}, \
INIT_TRACE_IRQFLAGS \
}
-diff -NurpP --minimal linux-2.6.22.10/include/linux/ipc.h linux-2.6.22.10-vs2.3.0.29/include/linux/ipc.h
---- linux-2.6.22.10/include/linux/ipc.h 2007-07-09 13:19:56 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/ipc.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/ipc.h linux-2.6.22.18-vs2.3.0.32/include/linux/ipc.h
+--- linux-2.6.22.18/include/linux/ipc.h 2007-07-22 00:00:23.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/ipc.h 2008-02-11 12:35:35.000000000 +0100
@@ -63,6 +63,7 @@ struct kern_ipc_perm
key_t key;
uid_t uid;
uid_t cuid;
gid_t cgid;
mode_t mode;
-diff -NurpP --minimal linux-2.6.22.10/include/linux/jffs2.h linux-2.6.22.10-vs2.3.0.29/include/linux/jffs2.h
---- linux-2.6.22.10/include/linux/jffs2.h 2006-11-30 21:19:38 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/jffs2.h 2007-10-05 15:07:22 +0200
+diff -Nurp linux-2.6.22.18/include/linux/jffs2.h linux-2.6.22.18-vs2.3.0.32/include/linux/jffs2.h
+--- linux-2.6.22.18/include/linux/jffs2.h 2007-05-04 15:57:43.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/jffs2.h 2008-02-11 12:35:36.000000000 +0100
@@ -82,12 +82,36 @@
//#define JFFS2_NODETYPE_OPTIONS (JFFS2_FEATURE_RWCOMPAT_COPY | JFFS2_NODE_ACCURATE | 4)
jint16_t uid; /* The file's owner. */
jint16_t gid; /* The file's group. */
jint32_t isize; /* Total resultant size of this inode (used for truncations) */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/loop.h linux-2.6.22.10-vs2.3.0.29/include/linux/loop.h
---- linux-2.6.22.10/include/linux/loop.h 2007-07-09 13:19:56 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/loop.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/Kbuild linux-2.6.22.18-vs2.3.0.32/include/linux/Kbuild
+--- linux-2.6.22.18/include/linux/Kbuild 2007-09-29 14:11:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/Kbuild 2008-02-11 12:35:35.000000000 +0100
+@@ -351,3 +351,6 @@ unifdef-y += xattr.h
+ unifdef-y += xfrm.h
+
+ objhdr-y += version.h
++
++header-y += vserver/
++
+diff -Nurp linux-2.6.22.18/include/linux/loop.h linux-2.6.22.18-vs2.3.0.32/include/linux/loop.h
+--- linux-2.6.22.18/include/linux/loop.h 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/loop.h 2008-02-11 12:35:36.000000000 +0100
@@ -45,6 +45,7 @@ struct loop_device {
struct loop_func_table *lo_encryption;
__u32 lo_init[2];
int (*ioctl)(struct loop_device *, int cmd,
unsigned long arg);
-diff -NurpP --minimal linux-2.6.22.10/include/linux/magic.h linux-2.6.22.10-vs2.3.0.29/include/linux/magic.h
---- linux-2.6.22.10/include/linux/magic.h 2007-07-09 13:19:56 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/magic.h 2007-10-06 18:19:33 +0200
+diff -Nurp linux-2.6.22.18/include/linux/magic.h linux-2.6.22.18-vs2.3.0.32/include/linux/magic.h
+--- linux-2.6.22.18/include/linux/magic.h 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/magic.h 2008-02-11 12:35:36.000000000 +0100
@@ -3,7 +3,7 @@
#define ADFS_SUPER_MAGIC 0xadf5
#define QNX4_SUPER_MAGIC 0x002f /* qnx4 fs detection */
#define REISERFS_SUPER_MAGIC 0x52654973 /* used by gcc */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/major.h linux-2.6.22.10-vs2.3.0.29/include/linux/major.h
---- linux-2.6.22.10/include/linux/major.h 2007-07-09 13:19:56 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/major.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/major.h linux-2.6.22.18-vs2.3.0.32/include/linux/major.h
+--- linux-2.6.22.18/include/linux/major.h 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/major.h 2008-02-11 12:35:36.000000000 +0100
@@ -15,6 +15,7 @@
#define HD_MAJOR IDE0_MAJOR
#define PTY_SLAVE_MAJOR 3
#define TTYAUX_MAJOR 5
#define LP_MAJOR 6
#define VCS_MAJOR 7
-diff -NurpP --minimal linux-2.6.22.10/include/linux/mount.h linux-2.6.22.10-vs2.3.0.29/include/linux/mount.h
---- linux-2.6.22.10/include/linux/mount.h 2007-07-09 13:19:56 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/mount.h 2007-09-05 02:29:04 +0200
+diff -Nurp linux-2.6.22.18/include/linux/mount.h linux-2.6.22.18-vs2.3.0.32/include/linux/mount.h
+--- linux-2.6.22.18/include/linux/mount.h 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/mount.h 2008-02-11 12:35:36.000000000 +0100
@@ -28,6 +28,9 @@ struct mnt_namespace;
#define MNT_NOATIME 0x08
#define MNT_NODIRATIME 0x10
};
static inline struct vfsmount *mntget(struct vfsmount *mnt)
-diff -NurpP --minimal linux-2.6.22.10/include/linux/net.h linux-2.6.22.10-vs2.3.0.29/include/linux/net.h
---- linux-2.6.22.10/include/linux/net.h 2007-07-09 13:19:56 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/net.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/net.h linux-2.6.22.18-vs2.3.0.32/include/linux/net.h
+--- linux-2.6.22.18/include/linux/net.h 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/net.h 2008-02-11 12:35:36.000000000 +0100
@@ -63,6 +63,7 @@ typedef enum {
#define SOCK_NOSPACE 2
#define SOCK_PASSCRED 3
#ifndef ARCH_HAS_SOCKET_TYPES
/**
-diff -NurpP --minimal linux-2.6.22.10/include/linux/nfs_mount.h linux-2.6.22.10-vs2.3.0.29/include/linux/nfs_mount.h
---- linux-2.6.22.10/include/linux/nfs_mount.h 2007-07-09 13:20:00 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/nfs_mount.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/nfs_mount.h linux-2.6.22.18-vs2.3.0.32/include/linux/nfs_mount.h
+--- linux-2.6.22.18/include/linux/nfs_mount.h 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/nfs_mount.h 2008-02-11 12:35:36.000000000 +0100
@@ -62,6 +62,7 @@ struct nfs_mount_data {
#define NFS_MOUNT_STRICTLOCK 0x1000 /* reserved for NFSv4 */
#define NFS_MOUNT_SECFLAVOUR 0x2000 /* 5 */
#define NFS_MOUNT_FLAGMASK 0xFFFF
#endif
-diff -NurpP --minimal linux-2.6.22.10/include/linux/nsproxy.h linux-2.6.22.10-vs2.3.0.29/include/linux/nsproxy.h
---- linux-2.6.22.10/include/linux/nsproxy.h 2007-07-09 13:20:00 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/nsproxy.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/nsproxy.h linux-2.6.22.18-vs2.3.0.32/include/linux/nsproxy.h
+--- linux-2.6.22.18/include/linux/nsproxy.h 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/nsproxy.h 2008-02-11 12:35:36.000000000 +0100
@@ -3,6 +3,7 @@
#include <linux/spinlock.h>
}
+
#endif
-diff -NurpP --minimal linux-2.6.22.10/include/linux/pid.h linux-2.6.22.10-vs2.3.0.29/include/linux/pid.h
---- linux-2.6.22.10/include/linux/pid.h 2007-07-09 13:20:00 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/pid.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/pid.h linux-2.6.22.18-vs2.3.0.32/include/linux/pid.h
+--- linux-2.6.22.18/include/linux/pid.h 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/pid.h 2008-02-11 12:35:36.000000000 +0100
@@ -8,7 +8,8 @@ enum pid_type
PIDTYPE_PID,
PIDTYPE_PGID,
};
/*
-diff -NurpP --minimal linux-2.6.22.10/include/linux/proc_fs.h linux-2.6.22.10-vs2.3.0.29/include/linux/proc_fs.h
---- linux-2.6.22.10/include/linux/proc_fs.h 2007-07-09 13:20:00 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/proc_fs.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/proc_fs.h linux-2.6.22.18-vs2.3.0.32/include/linux/proc_fs.h
+--- linux-2.6.22.18/include/linux/proc_fs.h 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/proc_fs.h 2008-02-11 12:35:36.000000000 +0100
@@ -54,6 +54,7 @@ struct proc_dir_entry {
nlink_t nlink;
uid_t uid;
int fd;
union proc_op op;
struct proc_dir_entry *pde;
-diff -NurpP --minimal linux-2.6.22.10/include/linux/reiserfs_fs.h linux-2.6.22.10-vs2.3.0.29/include/linux/reiserfs_fs.h
---- linux-2.6.22.10/include/linux/reiserfs_fs.h 2007-05-02 19:25:34 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/reiserfs_fs.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/reiserfs_fs.h linux-2.6.22.18-vs2.3.0.32/include/linux/reiserfs_fs.h
+--- linux-2.6.22.18/include/linux/reiserfs_fs.h 2007-07-21 23:58:53.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/reiserfs_fs.h 2008-02-11 12:35:36.000000000 +0100
@@ -821,6 +821,10 @@ struct stat_data_v1 {
#define REISERFS_COMPR_FL FS_COMPR_FL
#define REISERFS_NOTAIL_FL FS_NOTAIL_FL
/* namei.c */
void set_de_name_and_namelen(struct reiserfs_dir_entry *de);
-diff -NurpP --minimal linux-2.6.22.10/include/linux/reiserfs_fs_sb.h linux-2.6.22.10-vs2.3.0.29/include/linux/reiserfs_fs_sb.h
---- linux-2.6.22.10/include/linux/reiserfs_fs_sb.h 2007-07-09 13:20:00 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/reiserfs_fs_sb.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/reiserfs_fs_sb.h linux-2.6.22.18-vs2.3.0.32/include/linux/reiserfs_fs_sb.h
+--- linux-2.6.22.18/include/linux/reiserfs_fs_sb.h 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/reiserfs_fs_sb.h 2008-02-11 12:35:36.000000000 +0100
@@ -458,6 +458,7 @@ enum reiserfs_mount_options {
REISERFS_POSIXACL,
REISERFS_BARRIER_NONE,
/* Actions on error */
REISERFS_ERROR_PANIC,
-diff -NurpP --minimal linux-2.6.22.10/include/linux/sched.h linux-2.6.22.10-vs2.3.0.29/include/linux/sched.h
---- linux-2.6.22.10/include/linux/sched.h 2007-07-09 13:20:01 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/sched.h 2007-10-04 23:47:06 +0200
+diff -Nurp linux-2.6.22.18/include/linux/sched.h linux-2.6.22.18-vs2.3.0.32/include/linux/sched.h
+--- linux-2.6.22.18/include/linux/sched.h 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/sched.h 2008-02-11 12:35:36.000000000 +0100
@@ -26,6 +26,7 @@
#define CLONE_STOPPED 0x02000000 /* Start in stopped state */
#define CLONE_NEWUTS 0x04000000 /* New utsname group? */
static inline struct user_struct *get_uid(struct user_struct *u)
{
atomic_inc(&u->__count);
-diff -NurpP --minimal linux-2.6.22.10/include/linux/shmem_fs.h linux-2.6.22.10-vs2.3.0.29/include/linux/shmem_fs.h
---- linux-2.6.22.10/include/linux/shmem_fs.h 2006-11-30 21:19:39 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/shmem_fs.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/shmem_fs.h linux-2.6.22.18-vs2.3.0.32/include/linux/shmem_fs.h
+--- linux-2.6.22.18/include/linux/shmem_fs.h 2007-05-04 15:57:44.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/shmem_fs.h 2008-02-11 12:35:36.000000000 +0100
@@ -8,6 +8,9 @@
#define SHMEM_NR_DIRECT 16
struct shmem_inode_info {
spinlock_t lock;
unsigned long flags;
-diff -NurpP --minimal linux-2.6.22.10/include/linux/stat.h linux-2.6.22.10-vs2.3.0.29/include/linux/stat.h
---- linux-2.6.22.10/include/linux/stat.h 2007-07-09 13:20:01 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/stat.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/stat.h linux-2.6.22.18-vs2.3.0.32/include/linux/stat.h
+--- linux-2.6.22.18/include/linux/stat.h 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/stat.h 2008-02-11 12:35:36.000000000 +0100
@@ -66,6 +66,7 @@ struct kstat {
unsigned int nlink;
uid_t uid;
dev_t rdev;
loff_t size;
struct timespec atime;
-diff -NurpP --minimal linux-2.6.22.10/include/linux/sunrpc/auth.h linux-2.6.22.10-vs2.3.0.29/include/linux/sunrpc/auth.h
---- linux-2.6.22.10/include/linux/sunrpc/auth.h 2006-11-30 21:19:40 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/sunrpc/auth.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/sunrpc/auth.h linux-2.6.22.18-vs2.3.0.32/include/linux/sunrpc/auth.h
+--- linux-2.6.22.18/include/linux/sunrpc/auth.h 2007-05-04 15:57:44.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/sunrpc/auth.h 2008-02-11 12:35:36.000000000 +0100
@@ -24,6 +24,7 @@
struct auth_cred {
uid_t uid;
struct group_info *group_info;
};
-diff -NurpP --minimal linux-2.6.22.10/include/linux/sunrpc/clnt.h linux-2.6.22.10-vs2.3.0.29/include/linux/sunrpc/clnt.h
---- linux-2.6.22.10/include/linux/sunrpc/clnt.h 2007-07-09 13:20:01 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/sunrpc/clnt.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/sunrpc/clnt.h linux-2.6.22.18-vs2.3.0.32/include/linux/sunrpc/clnt.h
+--- linux-2.6.22.18/include/linux/sunrpc/clnt.h 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/sunrpc/clnt.h 2008-02-11 12:35:36.000000000 +0100
@@ -43,7 +43,8 @@ struct rpc_clnt {
cl_discrtry : 1,/* disconnect before retry */
cl_autobind : 1,/* use getport() */
struct rpc_rtt * cl_rtt; /* RTO estimator data */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/syscalls.h linux-2.6.22.10-vs2.3.0.29/include/linux/syscalls.h
---- linux-2.6.22.10/include/linux/syscalls.h 2007-07-09 13:20:01 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/syscalls.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/syscalls.h linux-2.6.22.18-vs2.3.0.32/include/linux/syscalls.h
+--- linux-2.6.22.18/include/linux/syscalls.h 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/syscalls.h 2008-02-11 12:35:36.000000000 +0100
@@ -294,6 +294,8 @@ asmlinkage long sys_symlink(const char _
asmlinkage long sys_unlink(const char __user *pathname);
asmlinkage long sys_rename(const char __user *oldname,
asmlinkage long sys_chmod(const char __user *filename, mode_t mode);
asmlinkage long sys_fchmod(unsigned int fd, mode_t mode);
-diff -NurpP --minimal linux-2.6.22.10/include/linux/sysctl.h linux-2.6.22.10-vs2.3.0.29/include/linux/sysctl.h
---- linux-2.6.22.10/include/linux/sysctl.h 2007-07-09 13:20:01 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/sysctl.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/sysctl.h linux-2.6.22.18-vs2.3.0.32/include/linux/sysctl.h
+--- linux-2.6.22.18/include/linux/sysctl.h 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/sysctl.h 2008-02-11 12:35:36.000000000 +0100
@@ -106,6 +106,7 @@ enum
KERN_CAP_BSET=14, /* int: capability bounding set */
KERN_PANIC=15, /* int: panic timeout */
KERN_SPARC_REBOOT=21, /* reboot command on Sparc */
KERN_CTLALTDEL=22, /* int: allow ctl-alt-del to reboot */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/sysfs.h linux-2.6.22.10-vs2.3.0.29/include/linux/sysfs.h
---- linux-2.6.22.10/include/linux/sysfs.h 2007-07-09 13:20:01 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/sysfs.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/sysfs.h linux-2.6.22.18-vs2.3.0.32/include/linux/sysfs.h
+--- linux-2.6.22.18/include/linux/sysfs.h 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/sysfs.h 2008-02-11 12:35:36.000000000 +0100
@@ -15,6 +15,8 @@
#include <linux/list.h>
#include <asm/atomic.h>
struct kobject;
struct module;
struct nameidata;
-diff -NurpP --minimal linux-2.6.22.10/include/linux/time.h linux-2.6.22.10-vs2.3.0.29/include/linux/time.h
---- linux-2.6.22.10/include/linux/time.h 2007-07-09 13:20:01 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/time.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/time.h linux-2.6.22.18-vs2.3.0.32/include/linux/time.h
+--- linux-2.6.22.18/include/linux/time.h 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/time.h 2008-02-11 12:35:36.000000000 +0100
@@ -176,6 +176,9 @@ static inline void timespec_add_ns(struc
}
a->tv_nsec = ns;
#endif /* __KERNEL__ */
#define NFDBITS __NFDBITS
-diff -NurpP --minimal linux-2.6.22.10/include/linux/types.h linux-2.6.22.10-vs2.3.0.29/include/linux/types.h
---- linux-2.6.22.10/include/linux/types.h 2007-02-06 03:01:52 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/types.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/types.h linux-2.6.22.18-vs2.3.0.32/include/linux/types.h
+--- linux-2.6.22.18/include/linux/types.h 2007-05-04 15:58:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/types.h 2008-02-11 12:35:36.000000000 +0100
@@ -39,6 +39,9 @@ typedef __kernel_uid32_t uid_t;
typedef __kernel_gid32_t gid_t;
typedef __kernel_uid16_t uid16_t;
#ifdef CONFIG_UID16
/* This is defined by include/asm-{arch}/posix_types.h */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vroot.h linux-2.6.22.10-vs2.3.0.29/include/linux/vroot.h
---- linux-2.6.22.10/include/linux/vroot.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vroot.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/vroot.h linux-2.6.22.18-vs2.3.0.32/include/linux/vroot.h
+--- linux-2.6.22.18/include/linux/vroot.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vroot.h 2008-02-11 12:35:36.000000000 +0100
@@ -0,0 +1,51 @@
+
+/*
+#define VROOT_CLR_DEV 0x5601
+
+#endif /* _LINUX_VROOT_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vs_base.h linux-2.6.22.10-vs2.3.0.29/include/linux/vs_base.h
---- linux-2.6.22.10/include/linux/vs_base.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vs_base.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/vs_base.h linux-2.6.22.18-vs2.3.0.32/include/linux/vs_base.h
+--- linux-2.6.22.18/include/linux/vs_base.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vs_base.h 2008-02-11 12:35:36.000000000 +0100
@@ -0,0 +1,9 @@
+#ifndef _VS_BASE_H
+#define _VS_BASE_H
+#else
+#warning duplicate inclusion
+#endif
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vs_context.h linux-2.6.22.10-vs2.3.0.29/include/linux/vs_context.h
---- linux-2.6.22.10/include/linux/vs_context.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vs_context.h 2007-10-01 14:57:41 +0200
+diff -Nurp linux-2.6.22.18/include/linux/vs_context.h linux-2.6.22.18-vs2.3.0.32/include/linux/vs_context.h
+--- linux-2.6.22.18/include/linux/vs_context.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vs_context.h 2008-02-11 12:35:36.000000000 +0100
@@ -0,0 +1,224 @@
+#ifndef _VS_CONTEXT_H
+#define _VS_CONTEXT_H
+#else
+#warning duplicate inclusion
+#endif
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vs_cowbl.h linux-2.6.22.10-vs2.3.0.29/include/linux/vs_cowbl.h
---- linux-2.6.22.10/include/linux/vs_cowbl.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vs_cowbl.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/vs_cowbl.h linux-2.6.22.18-vs2.3.0.32/include/linux/vs_cowbl.h
+--- linux-2.6.22.18/include/linux/vs_cowbl.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vs_cowbl.h 2008-02-11 12:35:36.000000000 +0100
@@ -0,0 +1,44 @@
+#ifndef _VS_COWBL_H
+#define _VS_COWBL_H
+#else
+#warning duplicate inclusion
+#endif
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vs_cvirt.h linux-2.6.22.10-vs2.3.0.29/include/linux/vs_cvirt.h
---- linux-2.6.22.10/include/linux/vs_cvirt.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vs_cvirt.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/linux/vs_cvirt.h linux-2.6.22.18-vs2.3.0.32/include/linux/vs_cvirt.h
+--- linux-2.6.22.18/include/linux/vs_cvirt.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vs_cvirt.h 2008-02-11 12:35:36.000000000 +0100
@@ -0,0 +1,49 @@
+#ifndef _VS_CVIRT_H
+#define _VS_CVIRT_H
+#else
+#warning duplicate inclusion
+#endif
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vs_device.h linux-2.6.22.10-vs2.3.0.29/include/linux/vs_device.h
---- linux-2.6.22.10/include/linux/vs_device.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vs_device.h 2007-10-11 01:10:22 +0200
+diff -Nurp linux-2.6.22.18/include/linux/vs_device.h linux-2.6.22.18-vs2.3.0.32/include/linux/vs_device.h
+--- linux-2.6.22.18/include/linux/vs_device.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vs_device.h 2008-02-11 12:35:36.000000000 +0100
@@ -0,0 +1,45 @@
+#ifndef _VS_DEVICE_H
+#define _VS_DEVICE_H
+#else
+#warning duplicate inclusion
+#endif
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vs_dlimit.h linux-2.6.22.10-vs2.3.0.29/include/linux/vs_dlimit.h
---- linux-2.6.22.10/include/linux/vs_dlimit.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vs_dlimit.h 2007-08-15 22:04:43 +0200
+diff -Nurp linux-2.6.22.18/include/linux/vs_dlimit.h linux-2.6.22.18-vs2.3.0.32/include/linux/vs_dlimit.h
+--- linux-2.6.22.18/include/linux/vs_dlimit.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vs_dlimit.h 2008-02-11 12:35:36.000000000 +0100
@@ -0,0 +1,211 @@
+#ifndef _VS_DLIMIT_H
+#define _VS_DLIMIT_H
+#else
+#warning duplicate inclusion
+#endif
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vs_inet.h linux-2.6.22.10-vs2.3.0.29/include/linux/vs_inet.h
---- linux-2.6.22.10/include/linux/vs_inet.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vs_inet.h 2007-10-05 15:07:22 +0200
-@@ -0,0 +1,341 @@
-+#ifndef _VS_INET_H
-+#define _VS_INET_H
+diff -Nurp linux-2.6.22.18/include/linux/vserver/base.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/base.h
+--- linux-2.6.22.18/include/linux/vserver/base.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/base.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,218 @@
++#ifndef _VX_BASE_H
++#define _VX_BASE_H
+
-+#include "vserver/base.h"
-+#include "vserver/network.h"
-+#include "vserver/debug.h"
+
-+#define IPI_LOOPBACK htonl(INADDR_LOOPBACK)
++/* context state changes */
+
-+#define NXAV4(a) NIPQUAD((a)->ip[0]), NIPQUAD((a)->ip[1]), \
-+ NIPQUAD((a)->mask), (a)->type
-+#define NXAV4_FMT "[" NIPQUAD_FMT "-" NIPQUAD_FMT "/" NIPQUAD_FMT ":%04x]"
++enum {
++ VSC_STARTUP = 1,
++ VSC_SHUTDOWN,
+
++ VSC_NETUP,
++ VSC_NETDOWN,
++};
+
-+static inline
-+int v4_addr_match(struct nx_addr_v4 *nxa, __be32 addr, uint16_t tmask)
-+{
-+ __be32 ip = nxa->ip[0].s_addr;
-+ __be32 mask = nxa->mask.s_addr;
-+ __be32 bcast = ip | ~mask;
-+ int ret = 0;
+
-+ switch (nxa->type & tmask) {
-+ case NXA_TYPE_MASK:
-+ ret = (ip == (addr & mask));
-+ break;
-+ case NXA_TYPE_ADDR:
-+ ret = 3;
-+ if (addr == ip)
-+ break;
-+ /* fall through to broadcast */
-+ case NXA_MOD_BCAST:
-+ ret = ((tmask & NXA_MOD_BCAST) && (addr == bcast));
-+ break;
-+ case NXA_TYPE_RANGE:
-+ ret = ((nxa->ip[0].s_addr <= addr) &&
-+ (nxa->ip[1].s_addr > addr));
-+ break;
-+ case NXA_TYPE_ANY:
-+ ret = 2;
-+ break;
-+ }
++#define MAX_S_CONTEXT 65535 /* Arbitrary limit */
+
-+ vxdprintk(VXD_CBIT(net, 0),
-+ "v4_addr_match(%p" NXAV4_FMT "," NIPQUAD_FMT ",%04x) = %d",
-+ nxa, NXAV4(nxa), NIPQUAD(addr), tmask, ret);
-+ return ret;
-+}
++/* check conditions */
+
-+static inline
-+int v4_addr_in_nx_info(struct nx_info *nxi, __be32 addr, uint16_t tmask)
-+{
-+ struct nx_addr_v4 *nxa;
-+ int ret = 1;
++#define VS_ADMIN 0x0001
++#define VS_WATCH 0x0002
++#define VS_HIDE 0x0004
++#define VS_HOSTID 0x0008
+
-+ if (!nxi)
-+ goto out;
++#define VS_IDENT 0x0010
++#define VS_EQUIV 0x0020
++#define VS_PARENT 0x0040
++#define VS_CHILD 0x0080
+
-+ ret = 2;
-+ /* allow 127.0.0.1 when remapping lback */
-+ if ((tmask & NXA_LOOPBACK) &&
-+ (addr == IPI_LOOPBACK) &&
-+ nx_info_flags(nxi, NXF_LBACK_REMAP, 0))
-+ goto out;
-+ ret = 3;
-+ /* check for lback address */
-+ if ((tmask & NXA_MOD_LBACK) &&
-+ (nxi->v4_lback.s_addr == addr))
-+ goto out;
-+ ret = 4;
-+ /* check for broadcast address */
-+ if ((tmask & NXA_MOD_BCAST) &&
-+ (nxi->v4_bcast.s_addr == addr))
-+ goto out;
-+ ret = 5;
-+ /* check for v4 addresses */
-+ for (nxa = &nxi->v4; nxa; nxa = nxa->next)
-+ if (v4_addr_match(nxa, addr, tmask))
-+ goto out;
-+ ret = 0;
-+out:
-+ vxdprintk(VXD_CBIT(net, 0),
-+ "v4_addr_in_nx_info(%p[#%u]," NIPQUAD_FMT ",%04x) = %d",
-+ nxi, nxi ? nxi->nx_id : 0, NIPQUAD(addr), tmask, ret);
-+ return ret;
-+}
++#define VS_ARG_MASK 0x00F0
+
-+static inline
-+int v4_nx_addr_match(struct nx_addr_v4 *nxa, struct nx_addr_v4 *addr, uint16_t mask)
-+{
-+ /* FIXME: needs full range checks */
-+ return v4_addr_match(nxa, addr->ip[0].s_addr, mask);
-+}
++#ifdef CONFIG_VSERVER_PRIVACY
++#define VS_ADMIN_P (0)
++#define VS_WATCH_P (0)
++#else
++#define VS_ADMIN_P VS_ADMIN
++#define VS_WATCH_P VS_WATCH
++#endif
+
-+static inline
-+int v4_nx_addr_in_nx_info(struct nx_info *nxi, struct nx_addr_v4 *nxa, uint16_t mask)
-+{
-+ struct nx_addr_v4 *ptr;
++#define VS_HARDIRQ 0x1000
++#define VS_SOFTIRQ 0x2000
++#define VS_IRQ 0x4000
+
-+ for (ptr = &nxi->v4; ptr; ptr = ptr->next)
-+ if (v4_nx_addr_match(ptr, nxa, mask))
-+ return 1;
-+ return 0;
-+}
++#define VS_IRQ_MASK 0xF000
+
-+#include <net/inet_sock.h>
++#include <linux/hardirq.h>
+
+/*
-+ * Check if a given address matches for a socket
-+ *
-+ * nxi: the socket's nx_info if any
-+ * addr: to be verified address
++ * check current context for ADMIN/WATCH and
++ * optionally against supplied argument
+ */
-+static inline
-+int v4_sock_addr_match (
-+ struct nx_info *nxi,
-+ struct inet_sock *inet,
-+ __be32 addr)
++static inline int __vs_check(int cid, int id, unsigned int mode)
+{
-+ __be32 saddr = inet->rcv_saddr;
-+ __be32 bcast = nxi ? nxi->v4_bcast.s_addr : INADDR_BROADCAST;
-+
-+ if (addr && (saddr == addr || bcast == addr))
-+ return 1;
-+ if (!saddr)
-+ return v4_addr_in_nx_info(nxi, addr, NXA_MASK_BIND);
-+ return 0;
++ if (mode & VS_ARG_MASK) {
++ if ((mode & VS_IDENT) && (id == cid))
++ return 1;
++ }
++ if (mode & VS_IRQ_MASK) {
++ if ((mode & VS_IRQ) && unlikely(in_interrupt()))
++ return 1;
++ if ((mode & VS_HARDIRQ) && unlikely(in_irq()))
++ return 1;
++ if ((mode & VS_SOFTIRQ) && unlikely(in_softirq()))
++ return 1;
++ }
++ return (((mode & VS_ADMIN) && (cid == 0)) ||
++ ((mode & VS_WATCH) && (cid == 1)) ||
++ ((mode & VS_HOSTID) && (id == 0)));
+}
+
++#define vx_task_xid(t) ((t)->xid)
+
-+/* inet related checks and helpers */
++#define vx_current_xid() vx_task_xid(current)
+
++#define current_vx_info() (current->vx_info)
+
-+struct in_ifaddr;
-+struct net_device;
-+struct sock;
+
-+#ifdef CONFIG_INET
++#define vx_check(c, m) __vs_check(vx_current_xid(), c, (m) | VS_IRQ)
+
-+#include <linux/netdevice.h>
-+#include <linux/inetdevice.h>
-+#include <net/inet_timewait_sock.h>
++#define vx_weak_check(c, m) ((m) ? vx_check(c, m) : 1)
+
+
-+int dev_in_nx_info(struct net_device *, struct nx_info *);
-+int v4_dev_in_nx_info(struct net_device *, struct nx_info *);
-+int nx_v4_addr_conflict(struct nx_info *, struct nx_info *);
++#define nx_task_nid(t) ((t)->nid)
+
++#define nx_current_nid() nx_task_nid(current)
+
-+/*
-+ * check if address is covered by socket
-+ *
-+ * sk: the socket to check against
-+ * addr: the address in question (must be != 0)
-+ */
++#define current_nx_info() (current->nx_info)
+
-+static inline
-+int __v4_addr_match_socket(const struct sock *sk, struct nx_addr_v4 *nxa)
-+{
-+ struct nx_info *nxi = sk->sk_nx_info;
-+ __be32 saddr = inet_rcv_saddr(sk);
+
-+ vxdprintk(VXD_CBIT(net, 5),
-+ "__v4_addr_in_socket(%p," NXAV4_FMT ") %p:" NIPQUAD_FMT " %p;%lx",
-+ sk, NXAV4(nxa), nxi, NIPQUAD(saddr), sk->sk_socket,
-+ (sk->sk_socket?sk->sk_socket->flags:0));
++#define nx_check(c, m) __vs_check(nx_current_nid(), c, m)
+
-+ if (saddr) { /* direct address match */
-+ return v4_addr_match(nxa, saddr, -1);
-+ } else if (nxi) { /* match against nx_info */
-+ return v4_nx_addr_in_nx_info(nxi, nxa, -1);
-+ } else { /* unrestricted any socket */
-+ return 1;
-+ }
-+}
++#define nx_weak_check(c, m) ((m) ? nx_check(c, m) : 1)
+
+
+
-+static inline
-+int nx_dev_visible(struct nx_info *nxi, struct net_device *dev)
-+{
-+ vxdprintk(VXD_CBIT(net, 1), "nx_dev_visible(%p[#%u],%p »%s«) %d",
-+ nxi, nxi ? nxi->nx_id : 0, dev, dev->name,
-+ nxi ? dev_in_nx_info(dev, nxi) : 0);
++/* generic flag merging */
+
-+ if (!nx_info_flags(nxi, NXF_HIDE_NETIF, 0))
-+ return 1;
-+ if (dev_in_nx_info(dev, nxi))
-+ return 1;
-+ return 0;
-+}
++#define vs_check_flags(v, m, f) (((v) & (m)) ^ (f))
+
++#define vs_mask_flags(v, f, m) (((v) & ~(m)) | ((f) & (m)))
+
-+static inline
-+int v4_ifa_in_nx_info(struct in_ifaddr *ifa, struct nx_info *nxi)
-+{
-+ if (!nxi)
-+ return 1;
-+ if (!ifa)
-+ return 0;
-+ return v4_addr_in_nx_info(nxi, ifa->ifa_local, NXA_MASK_SHOW);
-+}
++#define vs_mask_mask(v, f, m) (((v) & ~(m)) | ((v) & (f) & (m)))
+
-+static inline
-+int nx_v4_ifa_visible(struct nx_info *nxi, struct in_ifaddr *ifa)
-+{
-+ vxdprintk(VXD_CBIT(net, 1), "nx_v4_ifa_visible(%p[#%u],%p) %d",
-+ nxi, nxi ? nxi->nx_id : 0, ifa,
-+ nxi ? v4_ifa_in_nx_info(ifa, nxi) : 0);
++#define vs_check_bit(v, n) ((v) & (1LL << (n)))
+
-+ if (!nx_info_flags(nxi, NXF_HIDE_NETIF, 0))
-+ return 1;
-+ if (v4_ifa_in_nx_info(ifa, nxi))
-+ return 1;
-+ return 0;
-+}
+
++/* context flags */
+
-+struct nx_v4_sock_addr {
-+ __be32 saddr; /* Address used for validation */
-+ __be32 baddr; /* Address used for socket bind */
-+};
++#define __vx_flags(v) ((v) ? (v)->vx_flags : 0)
+
-+static inline
-+int v4_map_sock_addr(struct inet_sock *inet, struct sockaddr_in *addr,
-+ struct nx_v4_sock_addr *nsa)
-+{
-+ struct sock *sk = &inet->sk;
-+ struct nx_info *nxi = sk->sk_nx_info;
-+ __be32 saddr = addr->sin_addr.s_addr;
-+ __be32 baddr = saddr;
++#define vx_current_flags() __vx_flags(current->vx_info)
+
-+ vxdprintk(VXD_CBIT(net, 3),
-+ "inet_bind(%p)* %p,%p;%lx " NIPQUAD_FMT,
-+ sk, sk->sk_nx_info, sk->sk_socket,
-+ (sk->sk_socket ? sk->sk_socket->flags : 0),
-+ NIPQUAD(saddr));
++#define vx_info_flags(v, m, f) \
++ vs_check_flags(__vx_flags(v), m, f)
+
-+ if (nxi) {
-+ if (saddr == INADDR_ANY) {
-+ if (nx_info_flags(nxi, NXF_SINGLE_IP, 0))
-+ baddr = nxi->v4.ip[0].s_addr;
-+ } else if (saddr == IPI_LOOPBACK) {
-+ if (nx_info_flags(nxi, NXF_LBACK_REMAP, 0))
-+ baddr = nxi->v4_lback.s_addr;
-+ } else { /* normal address bind */
-+ if (!v4_addr_in_nx_info(nxi, saddr, NXA_MASK_BIND))
-+ return -EADDRNOTAVAIL;
-+ }
-+ }
++#define task_vx_flags(t, m, f) \
++ ((t) && vx_info_flags((t)->vx_info, m, f))
+
-+ vxdprintk(VXD_CBIT(net, 3),
-+ "inet_bind(%p) " NIPQUAD_FMT ", " NIPQUAD_FMT,
-+ sk, NIPQUAD(saddr), NIPQUAD(baddr));
++#define vx_flags(m, f) vx_info_flags(current->vx_info, m, f)
+
-+ nsa->saddr = saddr;
-+ nsa->baddr = baddr;
-+ return 0;
-+}
+
-+static inline
-+void v4_set_sock_addr(struct inet_sock *inet, struct nx_v4_sock_addr *nsa)
-+{
-+ inet->saddr = nsa->baddr;
-+ inet->rcv_saddr = nsa->baddr;
-+}
++/* context caps */
+
++#define __vx_ccaps(v) ((v) ? (v)->vx_ccaps : 0)
+
-+/*
-+ * helper to simplify inet_lookup_listener
-+ *
-+ * nxi: the socket's nx_info if any
-+ * addr: to be verified address
-+ * saddr: socket address
-+ */
-+static inline int v4_inet_addr_match (
-+ struct nx_info *nxi,
-+ __be32 addr,
-+ __be32 saddr)
-+{
-+ if (addr && (saddr == addr))
-+ return 1;
-+ if (!saddr)
-+ return nxi ? v4_addr_in_nx_info(nxi, addr, NXA_MASK_BIND) : 1;
-+ return 0;
-+}
++#define vx_current_ccaps() __vx_ccaps(current->vx_info)
+
-+static inline __be32 nx_map_sock_lback(struct nx_info *nxi, __be32 addr)
-+{
-+ if (nx_info_flags(nxi, NXF_HIDE_LBACK, 0) &&
-+ (addr == nxi->v4_lback.s_addr))
-+ return IPI_LOOPBACK;
-+ return addr;
-+}
++#define vx_info_ccaps(v, c) (__vx_ccaps(v) & (c))
+
-+static inline
-+int nx_info_has_v4(struct nx_info *nxi)
-+{
-+ if (!nxi)
-+ return 1;
-+ if (NX_IPV4(nxi))
-+ return 1;
-+ if (nx_info_flags(nxi, NXF_LBACK_REMAP, 0))
-+ return 1;
-+ return 0;
-+}
++#define vx_ccaps(c) vx_info_ccaps(current->vx_info, (c))
+
-+#else /* CONFIG_INET */
+
-+static inline
-+int nx_dev_visible(struct nx_info *n, struct net_device *d)
-+{
-+ return 1;
-+}
+
-+static inline
-+int nx_v4_addr_conflict(struct nx_info *n, uint32_t a, const struct sock *s)
-+{
-+ return 1;
-+}
++/* network flags */
+
-+static inline
-+int v4_ifa_in_nx_info(struct in_ifaddr *a, struct nx_info *n)
-+{
-+ return 1;
-+}
++#define __nx_flags(n) ((n) ? (n)->nx_flags : 0)
+
-+static inline
-+int nx_info_has_v4(struct nx_info *nxi)
-+{
-+ return 0;
-+}
++#define nx_current_flags() __nx_flags(current->nx_info)
+
-+#endif /* CONFIG_INET */
++#define nx_info_flags(n, m, f) \
++ vs_check_flags(__nx_flags(n), m, f)
+
-+#define current_nx_info_has_v4() \
-+ nx_info_has_v4(current_nx_info())
++#define task_nx_flags(t, m, f) \
++ ((t) && nx_info_flags((t)->nx_info, m, f))
+
-+#else
-+#warning duplicate inclusion
-+#endif
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vs_inet6.h linux-2.6.22.10-vs2.3.0.29/include/linux/vs_inet6.h
---- linux-2.6.22.10/include/linux/vs_inet6.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vs_inet6.h 2007-10-05 14:54:36 +0200
-@@ -0,0 +1,228 @@
-+#ifndef _VS_INET6_H
-+#define _VS_INET6_H
++#define nx_flags(m, f) nx_info_flags(current->nx_info, m, f)
+
-+#include <net/ipv6.h>
-+#include "vserver/base.h"
-+#include "vserver/network.h"
-+#include "vserver/debug.h"
+
-+#define NXAV6(a) NIP6((a)->ip), NIP6((a)->mask), (a)->prefix, (a)->type
-+#define NXAV6_FMT "[" NIP6_FMT "/" NIP6_FMT "/%d:%04x]"
++/* network caps */
+
++#define __nx_ncaps(n) ((n) ? (n)->nx_ncaps : 0)
+
-+#ifdef CONFIG_IPV6
++#define nx_current_ncaps() __nx_ncaps(current->nx_info)
+
-+static inline
-+int v6_addr_match(struct nx_addr_v6 *nxa,
-+ const struct in6_addr *addr, uint16_t mask)
-+{
-+ switch (nxa->type & mask) {
-+ case NXA_TYPE_MASK:
-+ return ipv6_masked_addr_cmp(&nxa->ip, &nxa->mask, addr);
-+ case NXA_TYPE_ADDR:
-+ return ipv6_addr_equal(&nxa->ip, addr);
-+ case NXA_TYPE_ANY:
-+ return 1;
-+ default:
-+ return 0;
-+ }
-+}
++#define nx_info_ncaps(n, c) (__nx_ncaps(n) & (c))
+
-+static inline
-+int v6_addr_in_nx_info(struct nx_info *nxi,
-+ const struct in6_addr *addr, uint16_t mask)
-+{
-+ struct nx_addr_v6 *nxa;
++#define nx_ncaps(c) nx_info_ncaps(current->nx_info, c)
+
-+ if (!nxi)
-+ return 1;
-+ for (nxa = &nxi->v6; nxa; nxa = nxa->next)
-+ if (v6_addr_match(nxa, addr, mask))
-+ return 1;
-+ return 0;
-+}
+
-+static inline
-+int v6_nx_addr_match(struct nx_addr_v6 *nxa, struct nx_addr_v6 *addr, uint16_t mask)
-+{
-+ /* FIXME: needs full range checks */
-+ return v6_addr_match(nxa, &addr->ip, mask);
-+}
++/* context mask capabilities */
+
-+static inline
-+int v6_nx_addr_in_nx_info(struct nx_info *nxi, struct nx_addr_v6 *nxa, uint16_t mask)
-+{
-+ struct nx_addr_v6 *ptr;
++#define __vx_mcaps(v) ((v) ? (v)->vx_ccaps >> 32UL : ~0 )
+
-+ for (ptr = &nxi->v6; ptr; ptr = ptr->next)
-+ if (v6_nx_addr_match(ptr, nxa, mask))
-+ return 1;
-+ return 0;
-+}
++#define vx_info_mcaps(v, c) (__vx_mcaps(v) & (c))
+
++#define vx_mcaps(c) vx_info_mcaps(current->vx_info, c)
+
-+/*
-+ * Check if a given address matches for a socket
-+ *
-+ * nxi: the socket's nx_info if any
-+ * addr: to be verified address
-+ */
-+static inline
-+int v6_sock_addr_match (
-+ struct nx_info *nxi,
-+ struct inet_sock *inet,
-+ struct in6_addr *addr)
-+{
-+ struct sock *sk = &inet->sk;
-+ struct in6_addr *saddr = inet6_rcv_saddr(sk);
+
-+ if (!ipv6_addr_any(addr) &&
-+ ipv6_addr_equal(saddr, addr))
-+ return 1;
-+ if (ipv6_addr_any(saddr))
-+ return v6_addr_in_nx_info(nxi, addr, -1);
-+ return 0;
-+}
++/* context bcap mask */
+
-+/*
-+ * check if address is covered by socket
-+ *
-+ * sk: the socket to check against
-+ * addr: the address in question (must be != 0)
-+ */
++#define __vx_bcaps(v) ((v) ? (v)->vx_bcaps : ~0 )
+
-+static inline
-+int __v6_addr_match_socket(const struct sock *sk, struct nx_addr_v6 *nxa)
-+{
-+ struct nx_info *nxi = sk->sk_nx_info;
-+ struct in6_addr *saddr = inet6_rcv_saddr(sk);
++#define vx_current_bcaps() __vx_bcaps(current->vx_info)
+
-+ vxdprintk(VXD_CBIT(net, 5),
-+ "__v6_addr_in_socket(%p," NXAV6_FMT ") %p:" NIP6_FMT " %p;%lx",
-+ sk, NXAV6(nxa), nxi, NIP6(*saddr), sk->sk_socket,
-+ (sk->sk_socket?sk->sk_socket->flags:0));
++#define vx_info_bcaps(v, c) (__vx_bcaps(v) & (c))
+
-+ if (!ipv6_addr_any(saddr)) { /* direct address match */
-+ return v6_addr_match(nxa, saddr, -1);
-+ } else if (nxi) { /* match against nx_info */
-+ return v6_nx_addr_in_nx_info(nxi, nxa, -1);
-+ } else { /* unrestricted any socket */
-+ return 1;
-+ }
-+}
++#define vx_bcaps(c) vx_info_bcaps(current->vx_info, c)
+
+
-+/* inet related checks and helpers */
++#define vx_info_cap_bset(v) ((v) ? (v)->vx_cap_bset : cap_bset)
+
++#define vx_current_cap_bset() vx_info_cap_bset(current->vx_info)
+
-+struct in_ifaddr;
-+struct net_device;
-+struct sock;
+
++#define __vx_info_mbcap(v, b) \
++ (!vx_info_flags(v, VXF_STATE_SETUP, 0) ? \
++ vx_info_bcaps(v, b) : (b))
+
-+#include <linux/netdevice.h>
-+#include <linux/inetdevice.h>
-+#include <net/inet_timewait_sock.h>
++#define vx_info_mbcap(v, b) __vx_info_mbcap(v, cap_t(b))
+
++#define task_vx_mbcap(t, b) \
++ vx_info_mbcap((t)->vx_info, (t)->b)
+
-+int dev_in_nx_info(struct net_device *, struct nx_info *);
-+int v6_dev_in_nx_info(struct net_device *, struct nx_info *);
-+int nx_v6_addr_conflict(struct nx_info *, struct nx_info *);
++#define vx_mbcap(b) task_vx_mbcap(current, b)
+
++#define vx_cap_raised(v, c, f) (vx_info_mbcap(v, c) & CAP_TO_MASK(f))
+
++#define vx_capable(b, c) (capable(b) || \
++ (cap_raised(current->cap_effective, b) && vx_ccaps(c)))
+
-+static inline
-+int v6_ifa_in_nx_info(struct inet6_ifaddr *ifa, struct nx_info *nxi)
-+{
-+ if (!nxi)
-+ return 1;
-+ if (!ifa)
-+ return 0;
-+ return v6_addr_in_nx_info(nxi, &ifa->addr, -1);
-+}
++#define nx_capable(b, c) (capable(b) || \
++ (cap_raised(current->cap_effective, b) && nx_ncaps(c)))
+
-+static inline
-+int nx_v6_ifa_visible(struct nx_info *nxi, struct inet6_ifaddr *ifa)
-+{
-+ if (!nx_info_flags(nxi, NXF_HIDE_NETIF, 0))
-+ return 1;
-+ if (v6_ifa_in_nx_info(ifa, nxi))
-+ return 1;
-+ return 0;
-+}
++#define vx_current_initpid(n) \
++ (current->vx_info && \
++ (current->vx_info->vx_initpid == (n)))
+
+
-+struct nx_v6_sock_addr {
-+ struct in6_addr saddr; /* Address used for validation */
-+ struct in6_addr baddr; /* Address used for socket bind */
-+};
++#define __vx_state(v) ((v) ? ((v)->vx_state) : 0)
+
-+static inline
-+int v6_map_sock_addr(struct inet_sock *inet, struct sockaddr_in6 *addr,
-+ struct nx_v6_sock_addr *nsa)
-+{
-+ // struct sock *sk = &inet->sk;
-+ // struct nx_info *nxi = sk->sk_nx_info;
-+ struct in6_addr saddr = addr->sin6_addr;
-+ struct in6_addr baddr = saddr;
++#define vx_info_state(v, m) (__vx_state(v) & (m))
+
-+ nsa->saddr = saddr;
-+ nsa->baddr = baddr;
-+ return 0;
-+}
+
-+static inline
-+void v6_set_sock_addr(struct inet_sock *inet, struct nx_v6_sock_addr *nsa)
-+{
-+ // struct sock *sk = &inet->sk;
-+ // struct in6_addr *saddr = inet6_rcv_saddr(sk);
++#define __nx_state(n) ((n) ? ((n)->nx_state) : 0)
+
-+ // *saddr = nsa->baddr;
-+ // inet->saddr = nsa->baddr;
-+}
++#define nx_info_state(n, m) (__nx_state(n) & (m))
+
-+static inline
-+int nx_info_has_v6(struct nx_info *nxi)
-+{
-+ if (!nxi)
-+ return 1;
-+ if (NX_IPV6(nxi))
-+ return 1;
-+ return 0;
-+}
++#endif
+diff -Nurp linux-2.6.22.18/include/linux/vserver/cacct_cmd.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/cacct_cmd.h
+--- linux-2.6.22.18/include/linux/vserver/cacct_cmd.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/cacct_cmd.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,23 @@
++#ifndef _VX_CACCT_CMD_H
++#define _VX_CACCT_CMD_H
+
-+#else /* CONFIG_IPV6 */
+
-+static inline
-+int nx_v6_dev_visible(struct nx_info *n, struct net_device *d)
-+{
-+ return 1;
-+}
++/* virtual host info name commands */
+
++#define VCMD_sock_stat VC_CMD(VSTAT, 5, 0)
+
-+static inline
-+int nx_v6_addr_conflict(struct nx_info *n, uint32_t a, const struct sock *s)
-+{
-+ return 1;
-+}
++struct vcmd_sock_stat_v0 {
++ uint32_t field;
++ uint32_t count[3];
++ uint64_t total[3];
++};
+
-+static inline
-+int v6_ifa_in_nx_info(struct in_ifaddr *a, struct nx_info *n)
-+{
-+ return 1;
-+}
+
-+static inline
-+int nx_info_has_v6(struct nx_info *nxi)
-+{
-+ return 0;
-+}
++#ifdef __KERNEL__
+
-+#endif /* CONFIG_IPV6 */
++#include <linux/compiler.h>
+
-+#define current_nx_info_has_v6() \
-+ nx_info_has_v6(current_nx_info())
++extern int vc_sock_stat(struct vx_info *, void __user *);
+
-+#else
-+#warning duplicate inclusion
-+#endif
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vs_limit.h linux-2.6.22.10-vs2.3.0.29/include/linux/vs_limit.h
---- linux-2.6.22.10/include/linux/vs_limit.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vs_limit.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,140 @@
-+#ifndef _VS_LIMIT_H
-+#define _VS_LIMIT_H
++#endif /* __KERNEL__ */
++#endif /* _VX_CACCT_CMD_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/cacct_def.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/cacct_def.h
+--- linux-2.6.22.18/include/linux/vserver/cacct_def.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/cacct_def.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,43 @@
++#ifndef _VX_CACCT_DEF_H
++#define _VX_CACCT_DEF_H
+
-+#include "vserver/limit.h"
-+#include "vserver/base.h"
-+#include "vserver/context.h"
-+#include "vserver/debug.h"
-+#include "vserver/context.h"
-+#include "vserver/limit_int.h"
++#include <asm/atomic.h>
++#include <linux/vserver/cacct.h>
+
+
-+#define vx_acc_cres(v, d, p, r) \
-+ __vx_acc_cres(v, r, d, p, __FILE__, __LINE__)
++struct _vx_sock_acc {
++ atomic_long_t count;
++ atomic_long_t total;
++};
+
-+#define vx_acc_cres_cond(x, d, p, r) \
-+ __vx_acc_cres(((x) == vx_current_xid()) ? current->vx_info : 0, \
-+ r, d, p, __FILE__, __LINE__)
++/* context sub struct */
+
++struct _vx_cacct {
++ struct _vx_sock_acc sock[VXA_SOCK_SIZE][3];
++ atomic_t slab[8];
++ atomic_t page[6][8];
++};
+
-+#define vx_add_cres(v, a, p, r) \
-+ __vx_add_cres(v, r, a, p, __FILE__, __LINE__)
-+#define vx_sub_cres(v, a, p, r) vx_add_cres(v, -(a), p, r)
++#ifdef CONFIG_VSERVER_DEBUG
+
-+#define vx_add_cres_cond(x, a, p, r) \
-+ __vx_add_cres(((x) == vx_current_xid()) ? current->vx_info : 0, \
-+ r, a, p, __FILE__, __LINE__)
-+#define vx_sub_cres_cond(x, a, p, r) vx_add_cres_cond(x, -(a), p, r)
++static inline void __dump_vx_cacct(struct _vx_cacct *cacct)
++{
++ int i, j;
+
++ printk("\t_vx_cacct:");
++ for (i = 0; i < 6; i++) {
++ struct _vx_sock_acc *ptr = cacct->sock[i];
+
-+/* process and file limits */
++ printk("\t [%d] =", i);
++ for (j = 0; j < 3; j++) {
++ printk(" [%d] = %8lu, %8lu", j,
++ atomic_long_read(&ptr[j].count),
++ atomic_long_read(&ptr[j].total));
++ }
++ printk("\n");
++ }
++}
+
-+#define vx_nproc_inc(p) \
-+ vx_acc_cres((p)->vx_info, 1, p, RLIMIT_NPROC)
++#endif
+
-+#define vx_nproc_dec(p) \
-+ vx_acc_cres((p)->vx_info,-1, p, RLIMIT_NPROC)
++#endif /* _VX_CACCT_DEF_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/cacct.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/cacct.h
+--- linux-2.6.22.18/include/linux/vserver/cacct.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/cacct.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,15 @@
++#ifndef _VX_CACCT_H
++#define _VX_CACCT_H
+
-+#define vx_files_inc(f) \
-+ vx_acc_cres_cond((f)->f_xid, 1, f, RLIMIT_NOFILE)
+
-+#define vx_files_dec(f) \
-+ vx_acc_cres_cond((f)->f_xid,-1, f, RLIMIT_NOFILE)
++enum sock_acc_field {
++ VXA_SOCK_UNSPEC = 0,
++ VXA_SOCK_UNIX,
++ VXA_SOCK_INET,
++ VXA_SOCK_INET6,
++ VXA_SOCK_PACKET,
++ VXA_SOCK_OTHER,
++ VXA_SOCK_SIZE /* array size */
++};
+
-+#define vx_locks_inc(l) \
-+ vx_acc_cres_cond((l)->fl_xid, 1, l, RLIMIT_LOCKS)
++#endif /* _VX_CACCT_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/cacct_int.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/cacct_int.h
+--- linux-2.6.22.18/include/linux/vserver/cacct_int.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/cacct_int.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,21 @@
++#ifndef _VX_CACCT_INT_H
++#define _VX_CACCT_INT_H
+
-+#define vx_locks_dec(l) \
-+ vx_acc_cres_cond((l)->fl_xid,-1, l, RLIMIT_LOCKS)
+
-+#define vx_openfd_inc(f) \
-+ vx_acc_cres(current->vx_info, 1, (void *)(long)(f), VLIMIT_OPENFD)
++#ifdef __KERNEL__
+
-+#define vx_openfd_dec(f) \
-+ vx_acc_cres(current->vx_info,-1, (void *)(long)(f), VLIMIT_OPENFD)
++static inline
++unsigned long vx_sock_count(struct _vx_cacct *cacct, int type, int pos)
++{
++ return atomic_long_read(&cacct->sock[type][pos].count);
++}
+
+
-+#define vx_cres_avail(v, n, r) \
-+ __vx_cres_avail(v, r, n, __FILE__, __LINE__)
++static inline
++unsigned long vx_sock_total(struct _vx_cacct *cacct, int type, int pos)
++{
++ return atomic_long_read(&cacct->sock[type][pos].total);
++}
+
++#endif /* __KERNEL__ */
++#endif /* _VX_CACCT_INT_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/context_cmd.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/context_cmd.h
+--- linux-2.6.22.18/include/linux/vserver/context_cmd.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/context_cmd.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,128 @@
++#ifndef _VX_CONTEXT_CMD_H
++#define _VX_CONTEXT_CMD_H
+
-+#define vx_nproc_avail(n) \
-+ vx_cres_avail(current->vx_info, n, RLIMIT_NPROC)
+
-+#define vx_files_avail(n) \
-+ vx_cres_avail(current->vx_info, n, RLIMIT_NOFILE)
++/* vinfo commands */
+
-+#define vx_locks_avail(n) \
-+ vx_cres_avail(current->vx_info, n, RLIMIT_LOCKS)
++#define VCMD_task_xid VC_CMD(VINFO, 1, 0)
+
-+#define vx_openfd_avail(n) \
-+ vx_cres_avail(current->vx_info, n, VLIMIT_OPENFD)
++#ifdef __KERNEL__
++extern int vc_task_xid(uint32_t);
+
++#endif /* __KERNEL__ */
+
-+/* dentry limits */
++#define VCMD_vx_info VC_CMD(VINFO, 5, 0)
+
-+#define vx_dentry_inc(d) do { \
-+ if (atomic_read(&d->d_count) == 1) \
-+ vx_acc_cres(current->vx_info, 1, d, VLIMIT_DENTRY); \
-+ } while (0)
++struct vcmd_vx_info_v0 {
++ uint32_t xid;
++ uint32_t initpid;
++ /* more to come */
++};
+
-+#define vx_dentry_dec(d) do { \
-+ if (atomic_read(&d->d_count) == 0) \
-+ vx_acc_cres(current->vx_info,-1, d, VLIMIT_DENTRY); \
-+ } while (0)
++#ifdef __KERNEL__
++extern int vc_vx_info(struct vx_info *, void __user *);
+
-+#define vx_dentry_avail(n) \
-+ vx_cres_avail(current->vx_info, n, VLIMIT_DENTRY)
++#endif /* __KERNEL__ */
+
++#define VCMD_ctx_stat VC_CMD(VSTAT, 0, 0)
+
-+/* socket limits */
++struct vcmd_ctx_stat_v0 {
++ uint32_t usecnt;
++ uint32_t tasks;
++ /* more to come */
++};
+
-+#define vx_sock_inc(s) \
-+ vx_acc_cres((s)->sk_vx_info, 1, s, VLIMIT_NSOCK)
++#ifdef __KERNEL__
++extern int vc_ctx_stat(struct vx_info *, void __user *);
+
-+#define vx_sock_dec(s) \
-+ vx_acc_cres((s)->sk_vx_info,-1, s, VLIMIT_NSOCK)
++#endif /* __KERNEL__ */
+
-+#define vx_sock_avail(n) \
-+ vx_cres_avail(current->vx_info, n, VLIMIT_NSOCK)
++/* context commands */
+
++#define VCMD_ctx_create_v0 VC_CMD(VPROC, 1, 0)
++#define VCMD_ctx_create VC_CMD(VPROC, 1, 1)
+
-+/* ipc resource limits */
++struct vcmd_ctx_create {
++ uint64_t flagword;
++};
+
-+#define vx_ipcmsg_add(v, u, a) \
-+ vx_add_cres(v, a, u, RLIMIT_MSGQUEUE)
++#define VCMD_ctx_migrate_v0 VC_CMD(PROCMIG, 1, 0)
++#define VCMD_ctx_migrate VC_CMD(PROCMIG, 1, 1)
+
-+#define vx_ipcmsg_sub(v, u, a) \
-+ vx_sub_cres(v, a, u, RLIMIT_MSGQUEUE)
++struct vcmd_ctx_migrate {
++ uint64_t flagword;
++};
+
-+#define vx_ipcmsg_avail(v, a) \
-+ vx_cres_avail(v, a, RLIMIT_MSGQUEUE)
++#ifdef __KERNEL__
++extern int vc_ctx_create(uint32_t, void __user *);
++extern int vc_ctx_migrate(struct vx_info *, void __user *);
+
++#endif /* __KERNEL__ */
+
-+#define vx_ipcshm_add(v, k, a) \
-+ vx_add_cres(v, a, (void *)(long)(k), VLIMIT_SHMEM)
+
-+#define vx_ipcshm_sub(v, k, a) \
-+ vx_sub_cres(v, a, (void *)(long)(k), VLIMIT_SHMEM)
++/* flag commands */
+
-+#define vx_ipcshm_avail(v, a) \
-+ vx_cres_avail(v, a, VLIMIT_SHMEM)
++#define VCMD_get_cflags VC_CMD(FLAGS, 1, 0)
++#define VCMD_set_cflags VC_CMD(FLAGS, 2, 0)
+
++struct vcmd_ctx_flags_v0 {
++ uint64_t flagword;
++ uint64_t mask;
++};
+
-+#define vx_semary_inc(a) \
-+ vx_acc_cres(current->vx_info, 1, a, VLIMIT_SEMARY)
++#ifdef __KERNEL__
++extern int vc_get_cflags(struct vx_info *, void __user *);
++extern int vc_set_cflags(struct vx_info *, void __user *);
+
-+#define vx_semary_dec(a) \
-+ vx_acc_cres(current->vx_info, -1, a, VLIMIT_SEMARY)
++#endif /* __KERNEL__ */
+
+
-+#define vx_nsems_add(a,n) \
-+ vx_add_cres(current->vx_info, n, a, VLIMIT_NSEMS)
++/* context caps commands */
+
-+#define vx_nsems_sub(a,n) \
-+ vx_sub_cres(current->vx_info, n, a, VLIMIT_NSEMS)
++#define VCMD_get_ccaps VC_CMD(FLAGS, 3, 1)
++#define VCMD_set_ccaps VC_CMD(FLAGS, 4, 1)
+
++struct vcmd_ctx_caps_v1 {
++ uint64_t ccaps;
++ uint64_t cmask;
++};
+
-+#else
-+#warning duplicate inclusion
-+#endif
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vs_memory.h linux-2.6.22.10-vs2.3.0.29/include/linux/vs_memory.h
---- linux-2.6.22.10/include/linux/vs_memory.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vs_memory.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,159 @@
-+#ifndef _VS_MEMORY_H
-+#define _VS_MEMORY_H
++#ifdef __KERNEL__
++extern int vc_get_ccaps(struct vx_info *, void __user *);
++extern int vc_set_ccaps(struct vx_info *, void __user *);
+
-+#include "vserver/limit.h"
-+#include "vserver/base.h"
-+#include "vserver/context.h"
-+#include "vserver/debug.h"
-+#include "vserver/context.h"
-+#include "vserver/limit_int.h"
++#endif /* __KERNEL__ */
+
+
-+#define __acc_add_long(a, v) (*(v) += (a))
-+#define __acc_inc_long(v) (++*(v))
-+#define __acc_dec_long(v) (--*(v))
++/* bcaps commands */
+
-+#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
-+#define __acc_add_atomic(a, v) atomic_long_add(a, v)
-+#define __acc_inc_atomic(v) atomic_long_inc(v)
-+#define __acc_dec_atomic(v) atomic_long_dec(v)
-+#else /* NR_CPUS < CONFIG_SPLIT_PTLOCK_CPUS */
-+#define __acc_add_atomic(a, v) __acc_add_long(a, v)
-+#define __acc_inc_atomic(v) __acc_inc_long(v)
-+#define __acc_dec_atomic(v) __acc_dec_long(v)
-+#endif /* NR_CPUS < CONFIG_SPLIT_PTLOCK_CPUS */
++#define VCMD_get_bcaps VC_CMD(FLAGS, 9, 0)
++#define VCMD_set_bcaps VC_CMD(FLAGS, 10, 0)
+
++struct vcmd_bcaps {
++ uint64_t bcaps;
++ uint64_t bmask;
++};
+
-+#define vx_acc_page(m, d, v, r) do { \
-+ if ((d) > 0) \
-+ __acc_inc_long(&(m)->v); \
-+ else \
-+ __acc_dec_long(&(m)->v); \
-+ __vx_acc_cres(m->mm_vx_info, r, d, m, __FILE__, __LINE__); \
-+} while (0)
++#ifdef __KERNEL__
++extern int vc_get_bcaps(struct vx_info *, void __user *);
++extern int vc_set_bcaps(struct vx_info *, void __user *);
+
-+#define vx_acc_page_atomic(m, d, v, r) do { \
-+ if ((d) > 0) \
-+ __acc_inc_atomic(&(m)->v); \
-+ else \
-+ __acc_dec_atomic(&(m)->v); \
-+ __vx_acc_cres(m->mm_vx_info, r, d, m, __FILE__, __LINE__); \
-+} while (0)
-+
-+
-+#define vx_acc_pages(m, p, v, r) do { \
-+ unsigned long __p = (p); \
-+ __acc_add_long(__p, &(m)->v); \
-+ __vx_add_cres(m->mm_vx_info, r, __p, m, __FILE__, __LINE__); \
-+} while (0)
++#endif /* __KERNEL__ */
+
-+#define vx_acc_pages_atomic(m, p, v, r) do { \
-+ unsigned long __p = (p); \
-+ __acc_add_atomic(__p, &(m)->v); \
-+ __vx_add_cres(m->mm_vx_info, r, __p, m, __FILE__, __LINE__); \
-+} while (0)
+
++/* OOM badness */
+
++#define VCMD_get_badness VC_CMD(MEMCTRL, 5, 0)
++#define VCMD_set_badness VC_CMD(MEMCTRL, 6, 0)
+
-+#define vx_acc_vmpage(m, d) \
-+ vx_acc_page(m, d, total_vm, RLIMIT_AS)
-+#define vx_acc_vmlpage(m, d) \
-+ vx_acc_page(m, d, locked_vm, RLIMIT_MEMLOCK)
-+#define vx_acc_file_rsspage(m, d) \
-+ vx_acc_page_atomic(m, d, _file_rss, VLIMIT_MAPPED)
-+#define vx_acc_anon_rsspage(m, d) \
-+ vx_acc_page_atomic(m, d, _anon_rss, VLIMIT_ANON)
++struct vcmd_badness_v0 {
++ int64_t bias;
++};
+
-+#define vx_acc_vmpages(m, p) \
-+ vx_acc_pages(m, p, total_vm, RLIMIT_AS)
-+#define vx_acc_vmlpages(m, p) \
-+ vx_acc_pages(m, p, locked_vm, RLIMIT_MEMLOCK)
-+#define vx_acc_file_rsspages(m, p) \
-+ vx_acc_pages_atomic(m, p, _file_rss, VLIMIT_MAPPED)
-+#define vx_acc_anon_rsspages(m, p) \
-+ vx_acc_pages_atomic(m, p, _anon_rss, VLIMIT_ANON)
++#ifdef __KERNEL__
++extern int vc_get_badness(struct vx_info *, void __user *);
++extern int vc_set_badness(struct vx_info *, void __user *);
+
-+#define vx_pages_add(s, r, p) __vx_add_cres(s, r, p, 0, __FILE__, __LINE__)
-+#define vx_pages_sub(s, r, p) vx_pages_add(s, r, -(p))
++#endif /* __KERNEL__ */
++#endif /* _VX_CONTEXT_CMD_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/context.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/context.h
+--- linux-2.6.22.18/include/linux/vserver/context.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/context.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,176 @@
++#ifndef _VX_CONTEXT_H
++#define _VX_CONTEXT_H
+
-+#define vx_vmpages_inc(m) vx_acc_vmpage(m, 1)
-+#define vx_vmpages_dec(m) vx_acc_vmpage(m, -1)
-+#define vx_vmpages_add(m, p) vx_acc_vmpages(m, p)
-+#define vx_vmpages_sub(m, p) vx_acc_vmpages(m, -(p))
++#include <linux/types.h>
++#include <linux/capability.h>
+
-+#define vx_vmlocked_inc(m) vx_acc_vmlpage(m, 1)
-+#define vx_vmlocked_dec(m) vx_acc_vmlpage(m, -1)
-+#define vx_vmlocked_add(m, p) vx_acc_vmlpages(m, p)
-+#define vx_vmlocked_sub(m, p) vx_acc_vmlpages(m, -(p))
+
-+#define vx_file_rsspages_inc(m) vx_acc_file_rsspage(m, 1)
-+#define vx_file_rsspages_dec(m) vx_acc_file_rsspage(m, -1)
-+#define vx_file_rsspages_add(m, p) vx_acc_file_rsspages(m, p)
-+#define vx_file_rsspages_sub(m, p) vx_acc_file_rsspages(m, -(p))
++/* context flags */
+
-+#define vx_anon_rsspages_inc(m) vx_acc_anon_rsspage(m, 1)
-+#define vx_anon_rsspages_dec(m) vx_acc_anon_rsspage(m, -1)
-+#define vx_anon_rsspages_add(m, p) vx_acc_anon_rsspages(m, p)
-+#define vx_anon_rsspages_sub(m, p) vx_acc_anon_rsspages(m, -(p))
++#define VXF_INFO_SCHED 0x00000002
++#define VXF_INFO_NPROC 0x00000004
++#define VXF_INFO_PRIVATE 0x00000008
+
++#define VXF_INFO_INIT 0x00000010
++#define VXF_INFO_HIDE 0x00000020
++#define VXF_INFO_ULIMIT 0x00000040
++#define VXF_INFO_NSPACE 0x00000080
+
-+#define vx_pages_avail(m, p, r) \
-+ __vx_cres_avail((m)->mm_vx_info, r, p, __FILE__, __LINE__)
++#define VXF_SCHED_HARD 0x00000100
++#define VXF_SCHED_PRIO 0x00000200
++#define VXF_SCHED_PAUSE 0x00000400
+
-+#define vx_vmpages_avail(m, p) vx_pages_avail(m, p, RLIMIT_AS)
-+#define vx_vmlocked_avail(m, p) vx_pages_avail(m, p, RLIMIT_MEMLOCK)
-+#define vx_anon_avail(m, p) vx_pages_avail(m, p, VLIMIT_ANON)
-+#define vx_mapped_avail(m, p) vx_pages_avail(m, p, VLIMIT_MAPPED)
++#define VXF_VIRT_MEM 0x00010000
++#define VXF_VIRT_UPTIME 0x00020000
++#define VXF_VIRT_CPU 0x00040000
++#define VXF_VIRT_LOAD 0x00080000
++#define VXF_VIRT_TIME 0x00100000
+
-+#define vx_rss_avail(m, p) \
-+ __vx_cres_array_avail((m)->mm_vx_info, VLA_RSS, p, __FILE__, __LINE__)
++#define VXF_HIDE_MOUNT 0x01000000
++/* was VXF_HIDE_NETIF 0x02000000 */
++#define VXF_HIDE_VINFO 0x04000000
+
++#define VXF_STATE_SETUP (1ULL << 32)
++#define VXF_STATE_INIT (1ULL << 33)
++#define VXF_STATE_ADMIN (1ULL << 34)
+
-+enum {
-+ VXPT_UNKNOWN = 0,
-+ VXPT_ANON,
-+ VXPT_NONE,
-+ VXPT_FILE,
-+ VXPT_SWAP,
-+ VXPT_WRITE
-+};
++#define VXF_SC_HELPER (1ULL << 36)
++#define VXF_REBOOT_KILL (1ULL << 37)
++#define VXF_PERSISTENT (1ULL << 38)
+
-+#if 0
-+#define vx_page_fault(mm, vma, type, ret)
-+#else
++#define VXF_FORK_RSS (1ULL << 48)
++#define VXF_PROLIFIC (1ULL << 49)
+
-+static inline
-+void __vx_page_fault(struct mm_struct *mm,
-+ struct vm_area_struct *vma, int type, int ret)
-+{
-+ struct vx_info *vxi = mm->mm_vx_info;
-+ int what;
-+/*
-+ static char *page_type[6] =
-+ { "UNKNOWN", "ANON", "NONE", "FILE", "SWAP", "WRITE" };
-+ static char *page_what[4] =
-+ { "FAULT_OOM", "FAULT_SIGBUS", "FAULT_MINOR", "FAULT_MAJOR" };
-+*/
++#define VXF_IGNEG_NICE (1ULL << 52)
+
-+ if (!vxi)
-+ return;
++#define VXF_ONE_TIME (0x0007ULL << 32)
+
-+ what = (ret & 0x3);
++#define VXF_INIT_SET (VXF_STATE_SETUP | VXF_STATE_INIT | VXF_STATE_ADMIN)
+
-+/* printk("[%d] page[%d][%d] %2x %s %s\n", vxi->vx_id,
-+ type, what, ret, page_type[type], page_what[what]);
-+*/
-+ if (ret & VM_FAULT_WRITE)
-+ what |= 0x4;
-+ atomic_inc(&vxi->cacct.page[type][what]);
-+}
+
-+#define vx_page_fault(mm, vma, type, ret) __vx_page_fault(mm, vma, type, ret)
-+#endif
++/* context migration */
+
++#define VXM_SET_INIT 0x00000001
++#define VXM_SET_REAPER 0x00000002
+
-+extern unsigned long vx_badness(struct task_struct *task, struct mm_struct *mm);
++/* context caps */
+
-+#else
-+#warning duplicate inclusion
-+#endif
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vs_network.h linux-2.6.22.10-vs2.3.0.29/include/linux/vs_network.h
---- linux-2.6.22.10/include/linux/vs_network.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vs_network.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,166 @@
-+#ifndef _NX_VS_NETWORK_H
-+#define _NX_VS_NETWORK_H
++#define VXC_CAP_MASK 0x00000000
+
-+#include "vserver/context.h"
-+#include "vserver/network.h"
-+#include "vserver/base.h"
-+#include "vserver/debug.h"
++#define VXC_SET_UTSNAME 0x00000001
++#define VXC_SET_RLIMIT 0x00000002
+
++/* was VXC_RAW_ICMP 0x00000100 */
++#define VXC_SYSLOG 0x00001000
+
-+#define get_nx_info(i) __get_nx_info(i, __FILE__, __LINE__)
++#define VXC_SECURE_MOUNT 0x00010000
++#define VXC_SECURE_REMOUNT 0x00020000
++#define VXC_BINARY_MOUNT 0x00040000
+
-+static inline struct nx_info *__get_nx_info(struct nx_info *nxi,
-+ const char *_file, int _line)
-+{
-+ if (!nxi)
-+ return NULL;
++#define VXC_QUOTA_CTL 0x00100000
++#define VXC_ADMIN_MAPPER 0x00200000
++#define VXC_ADMIN_CLOOP 0x00400000
+
-+ vxlprintk(VXD_CBIT(nid, 2), "get_nx_info(%p[#%d.%d])",
-+ nxi, nxi ? nxi->nx_id : 0,
-+ nxi ? atomic_read(&nxi->nx_usecnt) : 0,
-+ _file, _line);
++#define VXC_KTHREAD 0x01000000
+
-+ atomic_inc(&nxi->nx_usecnt);
-+ return nxi;
-+}
+
++#ifdef __KERNEL__
+
-+extern void free_nx_info(struct nx_info *);
++#include <linux/list.h>
++#include <linux/spinlock.h>
++#include <linux/rcupdate.h>
+
-+#define put_nx_info(i) __put_nx_info(i, __FILE__, __LINE__)
++#include "limit_def.h"
++#include "sched_def.h"
++#include "cvirt_def.h"
++#include "cacct_def.h"
++#include "device_def.h"
+
-+static inline void __put_nx_info(struct nx_info *nxi, const char *_file, int _line)
-+{
-+ if (!nxi)
-+ return;
++struct _vx_info_pc {
++ struct _vx_sched_pc sched_pc;
++ struct _vx_cvirt_pc cvirt_pc;
++};
+
-+ vxlprintk(VXD_CBIT(nid, 2), "put_nx_info(%p[#%d.%d])",
-+ nxi, nxi ? nxi->nx_id : 0,
-+ nxi ? atomic_read(&nxi->nx_usecnt) : 0,
-+ _file, _line);
++struct vx_info {
++ struct hlist_node vx_hlist; /* linked list of contexts */
++ xid_t vx_id; /* context id */
++ atomic_t vx_usecnt; /* usage count */
++ atomic_t vx_tasks; /* tasks count */
++ struct vx_info *vx_parent; /* parent context */
++ int vx_state; /* context state */
+
-+ if (atomic_dec_and_test(&nxi->nx_usecnt))
-+ free_nx_info(nxi);
-+}
++ unsigned long vx_nsmask; /* assignment mask */
++ struct nsproxy *vx_nsproxy; /* private namespace */
++ struct fs_struct *vx_fs; /* private namespace fs */
+
++ uint64_t vx_flags; /* context flags */
++ uint64_t vx_bcaps; /* bounding caps (system) */
++ uint64_t vx_ccaps; /* context caps (vserver) */
++ kernel_cap_t vx_cap_bset; /* the guest's bset */
+
-+#define init_nx_info(p, i) __init_nx_info(p, i, __FILE__, __LINE__)
++ struct task_struct *vx_reaper; /* guest reaper process */
++ pid_t vx_initpid; /* PID of guest init */
++ int64_t vx_badness_bias; /* OOM points bias */
+
-+static inline void __init_nx_info(struct nx_info **nxp, struct nx_info *nxi,
-+ const char *_file, int _line)
-+{
-+ if (nxi) {
-+ vxlprintk(VXD_CBIT(nid, 3),
-+ "init_nx_info(%p[#%d.%d])",
-+ nxi, nxi ? nxi->nx_id : 0,
-+ nxi ? atomic_read(&nxi->nx_usecnt) : 0,
-+ _file, _line);
++ struct _vx_limit limit; /* vserver limits */
++ struct _vx_sched sched; /* vserver scheduler */
++ struct _vx_cvirt cvirt; /* virtual/bias stuff */
++ struct _vx_cacct cacct; /* context accounting */
+
-+ atomic_inc(&nxi->nx_usecnt);
-+ }
-+ *nxp = nxi;
-+}
++ struct _vx_device dmap; /* default device map targets */
+
++#ifndef CONFIG_SMP
++ struct _vx_info_pc info_pc; /* per cpu data */
++#else
++ struct _vx_info_pc *ptr_pc; /* per cpu array */
++#endif
+
-+#define set_nx_info(p, i) __set_nx_info(p, i, __FILE__, __LINE__)
++ wait_queue_head_t vx_wait; /* context exit waitqueue */
++ int reboot_cmd; /* last sys_reboot() cmd */
++ int exit_code; /* last process exit code */
+
-+static inline void __set_nx_info(struct nx_info **nxp, struct nx_info *nxi,
-+ const char *_file, int _line)
-+{
-+ struct nx_info *nxo;
++ char vx_name[65]; /* vserver name */
++};
+
-+ if (!nxi)
-+ return;
++#ifndef CONFIG_SMP
++#define vx_ptr_pc(vxi) (&(vxi)->info_pc)
++#define vx_per_cpu(vxi, v, id) vx_ptr_pc(vxi)->v
++#else
++#define vx_ptr_pc(vxi) ((vxi)->ptr_pc)
++#define vx_per_cpu(vxi, v, id) per_cpu_ptr(vx_ptr_pc(vxi), id)->v
++#endif
+
-+ vxlprintk(VXD_CBIT(nid, 3), "set_nx_info(%p[#%d.%d])",
-+ nxi, nxi ? nxi->nx_id : 0,
-+ nxi ? atomic_read(&nxi->nx_usecnt) : 0,
-+ _file, _line);
++#define vx_cpu(vxi, v) vx_per_cpu(vxi, v, smp_processor_id())
+
-+ atomic_inc(&nxi->nx_usecnt);
-+ nxo = xchg(nxp, nxi);
-+ BUG_ON(nxo);
-+}
+
-+#define clr_nx_info(p) __clr_nx_info(p, __FILE__, __LINE__)
++struct vx_info_save {
++ struct vx_info *vxi;
++ xid_t xid;
++};
+
-+static inline void __clr_nx_info(struct nx_info **nxp,
-+ const char *_file, int _line)
-+{
-+ struct nx_info *nxo;
+
-+ nxo = xchg(nxp, NULL);
-+ if (!nxo)
-+ return;
++/* status flags */
+
-+ vxlprintk(VXD_CBIT(nid, 3), "clr_nx_info(%p[#%d.%d])",
-+ nxo, nxo ? nxo->nx_id : 0,
-+ nxo ? atomic_read(&nxo->nx_usecnt) : 0,
-+ _file, _line);
++#define VXS_HASHED 0x0001
++#define VXS_PAUSED 0x0010
++#define VXS_SHUTDOWN 0x0100
++#define VXS_HELPER 0x1000
++#define VXS_RELEASED 0x8000
+
-+ if (atomic_dec_and_test(&nxo->nx_usecnt))
-+ free_nx_info(nxo);
-+}
+
++extern void claim_vx_info(struct vx_info *, struct task_struct *);
++extern void release_vx_info(struct vx_info *, struct task_struct *);
+
-+#define claim_nx_info(v, p) __claim_nx_info(v, p, __FILE__, __LINE__)
++extern struct vx_info *lookup_vx_info(int);
++extern struct vx_info *lookup_or_create_vx_info(int);
+
-+static inline void __claim_nx_info(struct nx_info *nxi,
-+ struct task_struct *task, const char *_file, int _line)
-+{
-+ vxlprintk(VXD_CBIT(nid, 3), "claim_nx_info(%p[#%d.%d.%d]) %p",
-+ nxi, nxi ? nxi->nx_id : 0,
-+ nxi?atomic_read(&nxi->nx_usecnt):0,
-+ nxi?atomic_read(&nxi->nx_tasks):0,
-+ task, _file, _line);
++extern int get_xid_list(int, unsigned int *, int);
++extern int xid_is_hashed(xid_t);
+
-+ atomic_inc(&nxi->nx_tasks);
-+}
++extern int vx_migrate_task(struct task_struct *, struct vx_info *, int);
+
++extern long vs_state_change(struct vx_info *, unsigned int);
+
-+extern void unhash_nx_info(struct nx_info *);
+
-+#define release_nx_info(v, p) __release_nx_info(v, p, __FILE__, __LINE__)
++#endif /* __KERNEL__ */
++#endif /* _VX_CONTEXT_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/cvirt_cmd.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/cvirt_cmd.h
+--- linux-2.6.22.18/include/linux/vserver/cvirt_cmd.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/cvirt_cmd.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,53 @@
++#ifndef _VX_CVIRT_CMD_H
++#define _VX_CVIRT_CMD_H
+
-+static inline void __release_nx_info(struct nx_info *nxi,
-+ struct task_struct *task, const char *_file, int _line)
-+{
-+ vxlprintk(VXD_CBIT(nid, 3), "release_nx_info(%p[#%d.%d.%d]) %p",
-+ nxi, nxi ? nxi->nx_id : 0,
-+ nxi ? atomic_read(&nxi->nx_usecnt) : 0,
-+ nxi ? atomic_read(&nxi->nx_tasks) : 0,
-+ task, _file, _line);
+
-+ might_sleep();
++/* virtual host info name commands */
+
-+ if (atomic_dec_and_test(&nxi->nx_tasks))
-+ unhash_nx_info(nxi);
-+}
++#define VCMD_set_vhi_name VC_CMD(VHOST, 1, 0)
++#define VCMD_get_vhi_name VC_CMD(VHOST, 2, 0)
+
++struct vcmd_vhi_name_v0 {
++ uint32_t field;
++ char name[65];
++};
+
-+#define task_get_nx_info(i) __task_get_nx_info(i, __FILE__, __LINE__)
+
-+static __inline__ struct nx_info *__task_get_nx_info(struct task_struct *p,
-+ const char *_file, int _line)
-+{
-+ struct nx_info *nxi;
++enum vhi_name_field {
++ VHIN_CONTEXT = 0,
++ VHIN_SYSNAME,
++ VHIN_NODENAME,
++ VHIN_RELEASE,
++ VHIN_VERSION,
++ VHIN_MACHINE,
++ VHIN_DOMAINNAME,
++};
+
-+ task_lock(p);
-+ vxlprintk(VXD_CBIT(nid, 5), "task_get_nx_info(%p)",
-+ p, _file, _line);
-+ nxi = __get_nx_info(p->nx_info, _file, _line);
-+ task_unlock(p);
-+ return nxi;
-+}
+
++#ifdef __KERNEL__
+
-+static inline void exit_nx_info(struct task_struct *p)
-+{
-+ if (p->nx_info)
-+ release_nx_info(p->nx_info, p);
-+}
++#include <linux/compiler.h>
+
++extern int vc_set_vhi_name(struct vx_info *, void __user *);
++extern int vc_get_vhi_name(struct vx_info *, void __user *);
+
-+#else
-+#warning duplicate inclusion
-+#endif
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vs_pid.h linux-2.6.22.10-vs2.3.0.29/include/linux/vs_pid.h
---- linux-2.6.22.10/include/linux/vs_pid.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vs_pid.h 2007-09-05 02:49:29 +0200
-@@ -0,0 +1,133 @@
-+#ifndef _VS_PID_H
-+#define _VS_PID_H
++#endif /* __KERNEL__ */
+
-+#include "vserver/base.h"
-+#include "vserver/context.h"
-+#include "vserver/debug.h"
-+#include <linux/pid_namespace.h>
++#define VCMD_virt_stat VC_CMD(VSTAT, 3, 0)
+
++struct vcmd_virt_stat_v0 {
++ uint64_t offset;
++ uint64_t uptime;
++ uint32_t nr_threads;
++ uint32_t nr_running;
++ uint32_t nr_uninterruptible;
++ uint32_t nr_onhold;
++ uint32_t nr_forks;
++ uint32_t load[3];
++};
+
-+/* pid faking stuff */
++#ifdef __KERNEL__
++extern int vc_virt_stat(struct vx_info *, void __user *);
+
++#endif /* __KERNEL__ */
++#endif /* _VX_CVIRT_CMD_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/cvirt_def.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/cvirt_def.h
+--- linux-2.6.22.18/include/linux/vserver/cvirt_def.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/cvirt_def.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,81 @@
++#ifndef _VX_CVIRT_DEF_H
++#define _VX_CVIRT_DEF_H
+
-+#define vx_info_map_pid(v, p) \
-+ __vx_info_map_pid((v), (p), __FUNC__, __FILE__, __LINE__)
-+#define vx_info_map_tgid(v,p) vx_info_map_pid(v,p)
-+#define vx_map_pid(p) vx_info_map_pid(current->vx_info, p)
-+#define vx_map_tgid(p) vx_map_pid(p)
++#include <linux/jiffies.h>
++#include <linux/spinlock.h>
++#include <linux/wait.h>
++#include <linux/time.h>
++#include <linux/utsname.h>
++#include <asm/atomic.h>
+
-+static inline int __vx_info_map_pid(struct vx_info *vxi, int pid,
-+ const char *func, const char *file, int line)
-+{
-+ if (vx_info_flags(vxi, VXF_INFO_INIT, 0)) {
-+ vxfprintk(VXD_CBIT(cvirt, 2),
-+ "vx_map_tgid: %p/%llx: %d -> %d",
-+ vxi, (long long)vxi->vx_flags, pid,
-+ (pid && pid == vxi->vx_initpid) ? 1 : pid,
-+ func, file, line);
-+ if (pid == 0)
-+ return 0;
-+ if (pid == vxi->vx_initpid)
-+ return 1;
-+ }
-+ return pid;
-+}
+
-+#define vx_info_rmap_pid(v, p) \
-+ __vx_info_rmap_pid((v), (p), __FUNC__, __FILE__, __LINE__)
-+#define vx_rmap_pid(p) vx_info_rmap_pid(current->vx_info, p)
-+#define vx_rmap_tgid(p) vx_rmap_pid(p)
++struct _vx_usage_stat {
++ uint64_t user;
++ uint64_t nice;
++ uint64_t system;
++ uint64_t softirq;
++ uint64_t irq;
++ uint64_t idle;
++ uint64_t iowait;
++};
+
-+static inline int __vx_info_rmap_pid(struct vx_info *vxi, int pid,
-+ const char *func, const char *file, int line)
-+{
-+ if (vx_info_flags(vxi, VXF_INFO_INIT, 0)) {
-+ vxfprintk(VXD_CBIT(cvirt, 2),
-+ "vx_rmap_tgid: %p/%llx: %d -> %d",
-+ vxi, (long long)vxi->vx_flags, pid,
-+ (pid == 1) ? vxi->vx_initpid : pid,
-+ func, file, line);
-+ if ((pid == 1) && vxi->vx_initpid)
-+ return vxi->vx_initpid;
-+ if (pid == vxi->vx_initpid)
-+ return ~0U;
-+ }
-+ return pid;
-+}
++struct _vx_syslog {
++ wait_queue_head_t log_wait;
++ spinlock_t logbuf_lock; /* lock for the log buffer */
+
++ unsigned long log_start; /* next char to be read by syslog() */
++ unsigned long con_start; /* next char to be sent to consoles */
++ unsigned long log_end; /* most-recently-written-char + 1 */
++ unsigned long logged_chars; /* #chars since last read+clear operation */
+
-+#define VXF_FAKE_INIT (VXF_INFO_INIT | VXF_STATE_INIT)
++ char log_buf[1024];
++};
+
-+static inline
-+int vx_proc_task_visible(struct task_struct *task)
-+{
-+ if ((task->pid == 1) &&
-+ !vx_flags(VXF_FAKE_INIT, VXF_FAKE_INIT))
-+ /* show a blend through init */
-+ goto visible;
-+ if (vx_check(vx_task_xid(task), VS_WATCH | VS_IDENT))
-+ goto visible;
-+ return 0;
-+visible:
-+ return 1;
-+}
+
-+static inline
-+struct task_struct *vx_find_proc_task_by_pid(int pid)
-+{
-+ struct task_struct *task = find_task_by_pid(pid);
++/* context sub struct */
+
-+ if (task && !vx_proc_task_visible(task)) {
-+ vxdprintk(VXD_CBIT(misc, 6),
-+ "dropping task (find) %p[#%u,%u] for %p[#%u,%u]",
-+ task, task->xid, task->pid,
-+ current, current->xid, current->pid);
-+ task = NULL;
-+ }
-+ return task;
-+}
++struct _vx_cvirt {
++ atomic_t nr_threads; /* number of current threads */
++ atomic_t nr_running; /* number of running threads */
++ atomic_t nr_uninterruptible; /* number of uninterruptible threads */
+
-+static inline
-+struct task_struct *vx_get_proc_task(struct inode *inode, struct pid *pid)
-+{
-+ struct task_struct *task = get_pid_task(pid, PIDTYPE_PID);
++ atomic_t nr_onhold; /* processes on hold */
++ uint32_t onhold_last; /* jiffies when put on hold */
+
-+ if (task && !vx_proc_task_visible(task)) {
-+ vxdprintk(VXD_CBIT(misc, 6),
-+ "dropping task (get) %p[#%u,%u] for %p[#%u,%u]",
-+ task, task->xid, task->pid,
-+ current, current->xid, current->pid);
-+ put_task_struct(task);
-+ task = NULL;
-+ }
-+ return task;
-+}
++ struct timeval bias_tv; /* time offset to the host */
++ struct timespec bias_idle;
++ struct timespec bias_uptime; /* context creation point */
++ uint64_t bias_clock; /* offset in clock_t */
+
++ spinlock_t load_lock; /* lock for the load averages */
++ atomic_t load_updates; /* nr of load updates done so far */
++ uint32_t load_last; /* last time load was calculated */
++ uint32_t load[3]; /* load averages 1,5,15 */
+
-+static inline
-+struct task_struct *vx_child_reaper(struct task_struct *p)
-+{
-+ struct vx_info *vxi = p->vx_info;
-+ struct task_struct *reaper = child_reaper(p);
++ atomic_t total_forks; /* number of forks so far */
+
-+ if (!vxi)
-+ goto out;
++ struct _vx_syslog syslog;
++};
+
-+ BUG_ON(!p->vx_info->vx_reaper);
++struct _vx_cvirt_pc {
++ struct _vx_usage_stat cpustat;
++};
+
-+ /* child reaper for the guest reaper */
-+ if (vxi->vx_reaper == p)
-+ goto out;
+
-+ reaper = vxi->vx_reaper;
-+out:
-+ vxdprintk(VXD_CBIT(xid, 7),
-+ "vx_child_reaper(%p[#%u,%u]) = %p[#%u,%u]",
-+ p, p->xid, p->pid, reaper, reaper->xid, reaper->pid);
-+ return reaper;
-+}
++#ifdef CONFIG_VSERVER_DEBUG
+
++static inline void __dump_vx_cvirt(struct _vx_cvirt *cvirt)
++{
++ printk("\t_vx_cvirt:\n");
++ printk("\t threads: %4d, %4d, %4d, %4d\n",
++ atomic_read(&cvirt->nr_threads),
++ atomic_read(&cvirt->nr_running),
++ atomic_read(&cvirt->nr_uninterruptible),
++ atomic_read(&cvirt->nr_onhold));
++ /* add rest here */
++ printk("\t total_forks = %d\n", atomic_read(&cvirt->total_forks));
++}
+
-+#else
-+#warning duplicate inclusion
+#endif
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vs_sched.h linux-2.6.22.10-vs2.3.0.29/include/linux/vs_sched.h
---- linux-2.6.22.10/include/linux/vs_sched.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vs_sched.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,110 @@
-+#ifndef _VS_SCHED_H
-+#define _VS_SCHED_H
+
-+#include "vserver/base.h"
-+#include "vserver/context.h"
-+#include "vserver/sched.h"
++#endif /* _VX_CVIRT_DEF_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/cvirt.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/cvirt.h
+--- linux-2.6.22.18/include/linux/vserver/cvirt.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/cvirt.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,20 @@
++#ifndef _VX_CVIRT_H
++#define _VX_CVIRT_H
+
+
-+#define VAVAVOOM_RATIO 50
++#ifdef __KERNEL__
+
-+#define MAX_PRIO_BIAS 20
-+#define MIN_PRIO_BIAS -20
++struct timespec;
+
++void vx_vsi_uptime(struct timespec *, struct timespec *);
+
-+#ifdef CONFIG_VSERVER_HARDCPU
+
-+/*
-+ * effective_prio - return the priority that is based on the static
-+ * priority but is modified by bonuses/penalties.
-+ *
-+ * We scale the actual sleep average [0 .... MAX_SLEEP_AVG]
-+ * into a -4 ... 0 ... +4 bonus/penalty range.
-+ *
-+ * Additionally, we scale another amount based on the number of
-+ * CPU tokens currently held by the context, if the process is
-+ * part of a context (and the appropriate SCHED flag is set).
-+ * This ranges from -5 ... 0 ... +15, quadratically.
-+ *
-+ * So, the total bonus is -9 .. 0 .. +19
-+ * We use ~50% of the full 0...39 priority range so that:
-+ *
-+ * 1) nice +19 interactive tasks do not preempt nice 0 CPU hogs.
-+ * 2) nice -20 CPU hogs do not get preempted by nice 0 tasks.
-+ * unless that context is far exceeding its CPU allocation.
-+ *
-+ * Both properties are important to certain workloads.
-+ */
-+static inline
-+int vx_effective_vavavoom(struct _vx_sched_pc *sched_pc, int max_prio)
-+{
-+ int vavavoom, max;
++struct vx_info;
+
-+ /* lots of tokens = lots of vavavoom
-+ * no tokens = no vavavoom */
-+ if ((vavavoom = sched_pc->tokens) >= 0) {
-+ max = sched_pc->tokens_max;
-+ vavavoom = max - vavavoom;
-+ max = max * max;
-+ vavavoom = max_prio * VAVAVOOM_RATIO / 100
-+ * (vavavoom*vavavoom - (max >> 2)) / max;
-+ return vavavoom;
-+ }
-+ return 0;
-+}
++void vx_update_load(struct vx_info *);
+
+
-+static inline
-+int vx_adjust_prio(struct task_struct *p, int prio, int max_user)
-+{
-+ struct vx_info *vxi = p->vx_info;
-+ struct _vx_sched_pc *sched_pc;
++int vx_do_syslog(int, char __user *, int);
+
-+ if (!vxi)
-+ return prio;
++#endif /* __KERNEL__ */
++#endif /* _VX_CVIRT_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/debug_cmd.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/debug_cmd.h
+--- linux-2.6.22.18/include/linux/vserver/debug_cmd.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/debug_cmd.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,58 @@
++#ifndef _VX_DEBUG_CMD_H
++#define _VX_DEBUG_CMD_H
+
-+ sched_pc = &vx_cpu(vxi, sched_pc);
-+ if (vx_info_flags(vxi, VXF_SCHED_PRIO, 0)) {
-+ int vavavoom = vx_effective_vavavoom(sched_pc, max_user);
+
-+ sched_pc->vavavoom = vavavoom;
-+ prio += vavavoom;
-+ }
-+ prio += sched_pc->prio_bias;
-+ return prio;
-+}
++/* debug commands */
+
-+#else /* !CONFIG_VSERVER_HARDCPU */
++#define VCMD_dump_history VC_CMD(DEBUG, 1, 0)
+
-+static inline
-+int vx_adjust_prio(struct task_struct *p, int prio, int max_user)
-+{
-+ struct vx_info *vxi = p->vx_info;
++#define VCMD_read_history VC_CMD(DEBUG, 5, 0)
++#define VCMD_read_monitor VC_CMD(DEBUG, 6, 0)
+
-+ if (vxi)
-+ prio += vx_cpu(vxi, sched_pc).prio_bias;
-+ return prio;
-+}
++struct vcmd_read_history_v0 {
++ uint32_t index;
++ uint32_t count;
++ char __user *data;
++};
+
-+#endif /* CONFIG_VSERVER_HARDCPU */
++struct vcmd_read_monitor_v0 {
++ uint32_t index;
++ uint32_t count;
++ char __user *data;
++};
+
+
-+static inline void vx_account_user(struct vx_info *vxi,
-+ cputime_t cputime, int nice)
-+{
-+ if (!vxi)
-+ return;
-+ vx_cpu(vxi, sched_pc).user_ticks += cputime;
-+}
++#ifdef __KERNEL__
+
-+static inline void vx_account_system(struct vx_info *vxi,
-+ cputime_t cputime, int idle)
-+{
-+ if (!vxi)
-+ return;
-+ vx_cpu(vxi, sched_pc).sys_ticks += cputime;
-+}
++#ifdef CONFIG_COMPAT
+
-+#else
-+#warning duplicate inclusion
-+#endif
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vs_socket.h linux-2.6.22.10-vs2.3.0.29/include/linux/vs_socket.h
---- linux-2.6.22.10/include/linux/vs_socket.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vs_socket.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,80 @@
-+#ifndef _VS_SOCKET_H
-+#define _VS_SOCKET_H
++#include <asm/compat.h>
+
-+#include "vserver/debug.h"
-+#include "vserver/base.h"
-+#include "vserver/cacct.h"
-+#include "vserver/context.h"
-+#include "vserver/tag.h"
++struct vcmd_read_history_v0_x32 {
++ uint32_t index;
++ uint32_t count;
++ compat_uptr_t data_ptr;
++};
+
++struct vcmd_read_monitor_v0_x32 {
++ uint32_t index;
++ uint32_t count;
++ compat_uptr_t data_ptr;
++};
+
-+/* socket accounting */
++#endif /* CONFIG_COMPAT */
+
-+#include <linux/socket.h>
++extern int vc_dump_history(uint32_t);
+
-+static inline int vx_sock_type(int family)
-+{
-+ switch (family) {
-+ case PF_UNSPEC:
-+ return VXA_SOCK_UNSPEC;
-+ case PF_UNIX:
-+ return VXA_SOCK_UNIX;
-+ case PF_INET:
-+ return VXA_SOCK_INET;
-+ case PF_INET6:
-+ return VXA_SOCK_INET6;
-+ case PF_PACKET:
-+ return VXA_SOCK_PACKET;
-+ default:
-+ return VXA_SOCK_OTHER;
-+ }
-+}
++extern int vc_read_history(uint32_t, void __user *);
++extern int vc_read_monitor(uint32_t, void __user *);
+
-+#define vx_acc_sock(v, f, p, s) \
-+ __vx_acc_sock(v, f, p, s, __FILE__, __LINE__)
++#ifdef CONFIG_COMPAT
+
-+static inline void __vx_acc_sock(struct vx_info *vxi,
-+ int family, int pos, int size, char *file, int line)
-+{
-+ if (vxi) {
-+ int type = vx_sock_type(family);
++extern int vc_read_history_x32(uint32_t, void __user *);
++extern int vc_read_monitor_x32(uint32_t, void __user *);
+
-+ atomic_long_inc(&vxi->cacct.sock[type][pos].count);
-+ atomic_long_add(size, &vxi->cacct.sock[type][pos].total);
-+ }
-+}
++#endif /* CONFIG_COMPAT */
+
-+#define vx_sock_recv(sk, s) \
-+ vx_acc_sock((sk)->sk_vx_info, (sk)->sk_family, 0, s)
-+#define vx_sock_send(sk, s) \
-+ vx_acc_sock((sk)->sk_vx_info, (sk)->sk_family, 1, s)
-+#define vx_sock_fail(sk, s) \
-+ vx_acc_sock((sk)->sk_vx_info, (sk)->sk_family, 2, s)
++#endif /* __KERNEL__ */
++#endif /* _VX_DEBUG_CMD_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/debug.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/debug.h
+--- linux-2.6.22.18/include/linux/vserver/debug.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/debug.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,130 @@
++#ifndef _VX_DEBUG_H
++#define _VX_DEBUG_H
+
+
-+#define sock_vx_init(s) do { \
-+ (s)->sk_xid = 0; \
-+ (s)->sk_vx_info = NULL; \
-+ } while (0)
++#define VXD_CBIT(n, m) (vx_debug_ ## n & (1 << (m)))
++#define VXD_CMIN(n, m) (vx_debug_ ## n > (m))
++#define VXD_MASK(n, m) (vx_debug_ ## n & (m))
+
-+#define sock_nx_init(s) do { \
-+ (s)->sk_nid = 0; \
-+ (s)->sk_nx_info = NULL; \
-+ } while (0)
++#define VXD_DEV(d) (d), (d)->bd_inode->i_ino, \
++ imajor((d)->bd_inode), iminor((d)->bd_inode)
++#define VXF_DEV "%p[%lu,%d:%d]"
+
-+static inline
-+int vx_socket_peer_tag(struct socket *sock, int level,
-+ char __user *optval, int __user *optlen, int len)
-+{
-+ struct peer_tag tag;
-+
-+ tag.xid = sock->sk->sk_xid;
-+ tag.nid = sock->sk->sk_nid;
-+ if (copy_to_user(optval, &tag, sizeof(tag)))
-+ return -EFAULT;
-+ return 0;
-+}
-+
-+#else
-+#warning duplicate inclusion
-+#endif
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vs_tag.h linux-2.6.22.10-vs2.3.0.29/include/linux/vs_tag.h
---- linux-2.6.22.10/include/linux/vs_tag.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vs_tag.h 2007-08-15 19:11:32 +0200
-@@ -0,0 +1,43 @@
-+#ifndef _VS_TAG_H
-+#define _VS_TAG_H
-+
-+#include <linux/vserver/tag.h>
-+
-+/* check conditions */
-+
-+#define DX_ADMIN 0x0001
-+#define DX_WATCH 0x0002
-+#define DX_HOSTID 0x0008
-+
-+#define DX_IDENT 0x0010
-+
-+#define DX_ARG_MASK 0x0010
+
++#define __FUNC__ __func__
+
-+#define dx_task_tag(t) ((t)->tag)
+
-+#define dx_current_tag() dx_task_tag(current)
++#define vxd_path(d, m) \
++ ({ static char _buffer[PATH_MAX]; \
++ d_path(d, m, _buffer, sizeof(_buffer)); })
+
-+#define dx_check(c, m) __dx_check(dx_current_tag(), c, m)
++#define vxd_cond_path(n) \
++ ((n) ? vxd_path((n)->dentry, (n)->mnt) : "<null>" )
+
-+#define dx_weak_check(c, m) ((m) ? dx_check(c, m) : 1)
+
++#ifdef CONFIG_VSERVER_DEBUG
+
-+/*
-+ * check current context for ADMIN/WATCH and
-+ * optionally against supplied argument
-+ */
-+static inline int __dx_check(tag_t cid, tag_t id, unsigned int mode)
-+{
-+ if (mode & DX_ARG_MASK) {
-+ if ((mode & DX_IDENT) && (id == cid))
-+ return 1;
-+ }
-+ return (((mode & DX_ADMIN) && (cid == 0)) ||
-+ ((mode & DX_WATCH) && (cid == 1)) ||
-+ ((mode & DX_HOSTID) && (id == 0)));
-+}
++extern unsigned int vx_debug_switch;
++extern unsigned int vx_debug_xid;
++extern unsigned int vx_debug_nid;
++extern unsigned int vx_debug_tag;
++extern unsigned int vx_debug_net;
++extern unsigned int vx_debug_limit;
++extern unsigned int vx_debug_cres;
++extern unsigned int vx_debug_dlim;
++extern unsigned int vx_debug_quota;
++extern unsigned int vx_debug_cvirt;
++extern unsigned int vx_debug_space;
++extern unsigned int vx_debug_misc;
+
-+#else
-+#warning duplicate inclusion
-+#endif
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vs_time.h linux-2.6.22.10-vs2.3.0.29/include/linux/vs_time.h
---- linux-2.6.22.10/include/linux/vs_time.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vs_time.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,19 @@
-+#ifndef _VS_TIME_H
-+#define _VS_TIME_H
+
++#define VX_LOGLEVEL "vxD: "
++#define VX_PROC_FMT "%p: "
++#define VX_PROCESS current
+
-+/* time faking stuff */
++#define vxdprintk(c, f, x...) \
++ do { \
++ if (c) \
++ printk(VX_LOGLEVEL VX_PROC_FMT f "\n", \
++ VX_PROCESS , ##x); \
++ } while (0)
+
-+#ifdef CONFIG_VSERVER_VTIME
++#define vxlprintk(c, f, x...) \
++ do { \
++ if (c) \
++ printk(VX_LOGLEVEL f " @%s:%d\n", x); \
++ } while (0)
+
-+extern void vx_gettimeofday(struct timeval *tv);
-+extern int vx_settimeofday(struct timespec *ts);
++#define vxfprintk(c, f, x...) \
++ do { \
++ if (c) \
++ printk(VX_LOGLEVEL f " %s@%s:%d\n", x); \
++ } while (0)
+
-+#else
-+#define vx_gettimeofday(t) do_gettimeofday(t)
-+#define vx_settimeofday(t) do_settimeofday(t)
-+#endif
+
-+#else
-+#warning duplicate inclusion
-+#endif
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/Kbuild linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/Kbuild
---- linux-2.6.22.10/include/linux/vserver/Kbuild 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/Kbuild 2007-10-11 01:10:22 +0200
-@@ -0,0 +1,8 @@
++struct vx_info;
+
-+unifdef-y += context_cmd.h network_cmd.h space_cmd.h \
-+ cacct_cmd.h cvirt_cmd.h limit_cmd.h dlimit_cmd.h \
-+ inode_cmd.h tag_cmd.h sched_cmd.h signal_cmd.h \
-+ debug_cmd.h device_cmd.h
++void dump_vx_info(struct vx_info *, int);
++void dump_vx_info_inactive(int);
+
-+unifdef-y += switch.h network.h monitor.h inode.h device.h
++#else /* CONFIG_VSERVER_DEBUG */
+
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/base.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/base.h
---- linux-2.6.22.10/include/linux/vserver/base.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/base.h 2007-09-17 14:07:30 +0200
-@@ -0,0 +1,218 @@
-+#ifndef _VX_BASE_H
-+#define _VX_BASE_H
++#define vx_debug_switch 0
++#define vx_debug_xid 0
++#define vx_debug_nid 0
++#define vx_debug_tag 0
++#define vx_debug_net 0
++#define vx_debug_limit 0
++#define vx_debug_cres 0
++#define vx_debug_dlim 0
++#define vx_debug_cvirt 0
+
++#define vxdprintk(x...) do { } while (0)
++#define vxlprintk(x...) do { } while (0)
++#define vxfprintk(x...) do { } while (0)
+
-+/* context state changes */
++#endif /* CONFIG_VSERVER_DEBUG */
+
-+enum {
-+ VSC_STARTUP = 1,
-+ VSC_SHUTDOWN,
+
-+ VSC_NETUP,
-+ VSC_NETDOWN,
-+};
++#ifdef CONFIG_VSERVER_WARN
+
++#define VX_WARNLEVEL KERN_WARNING "vxW: "
++#define VX_WARN_TASK "[»%s«,%u:#%u|%u|%u] "
++#define VX_WARN_XID "[xid #%u] "
++#define VX_WARN_NID "[nid #%u] "
++#define VX_WARN_TAG "[tag #%u] "
+
-+#define MAX_S_CONTEXT 65535 /* Arbitrary limit */
++#define vxwprintk(c, f, x...) \
++ do { \
++ if (c) \
++ printk(VX_WARNLEVEL f "\n", ##x); \
++ } while (0)
+
-+/* check conditions */
++#else /* CONFIG_VSERVER_WARN */
+
-+#define VS_ADMIN 0x0001
-+#define VS_WATCH 0x0002
-+#define VS_HIDE 0x0004
-+#define VS_HOSTID 0x0008
++#define vxwprintk(x...) do { } while (0)
+
-+#define VS_IDENT 0x0010
-+#define VS_EQUIV 0x0020
-+#define VS_PARENT 0x0040
-+#define VS_CHILD 0x0080
++#endif /* CONFIG_VSERVER_WARN */
+
-+#define VS_ARG_MASK 0x00F0
++#define vxwprintk_task(c, f, x...) \
++ vxwprintk(c, VX_WARN_TASK f, \
++ current->comm, current->pid, \
++ current->xid, current->nid, current->tag, ##x)
++#define vxwprintk_xid(c, f, x...) \
++ vxwprintk(c, VX_WARN_XID f, current->xid, x)
++#define vxwprintk_nid(c, f, x...) \
++ vxwprintk(c, VX_WARN_NID f, current->nid, x)
++#define vxwprintk_tag(c, f, x...) \
++ vxwprintk(c, VX_WARN_TAG f, current->tag, x)
+
-+#ifdef CONFIG_VSERVER_PRIVACY
-+#define VS_ADMIN_P (0)
-+#define VS_WATCH_P (0)
++#ifdef CONFIG_VSERVER_DEBUG
++#define vxd_assert_lock(l) assert_spin_locked(l)
++#define vxd_assert(c, f, x...) vxlprintk(!(c), \
++ "assertion [" f "] failed.", ##x, __FILE__, __LINE__)
+#else
-+#define VS_ADMIN_P VS_ADMIN
-+#define VS_WATCH_P VS_WATCH
++#define vxd_assert_lock(l) do { } while (0)
++#define vxd_assert(c, f, x...) do { } while (0)
+#endif
+
-+#define VS_HARDIRQ 0x1000
-+#define VS_SOFTIRQ 0x2000
-+#define VS_IRQ 0x4000
-+
-+#define VS_IRQ_MASK 0xF000
-+
-+#include <linux/hardirq.h>
+
-+/*
-+ * check current context for ADMIN/WATCH and
-+ * optionally against supplied argument
-+ */
-+static inline int __vs_check(int cid, int id, unsigned int mode)
-+{
-+ if (mode & VS_ARG_MASK) {
-+ if ((mode & VS_IDENT) && (id == cid))
-+ return 1;
-+ }
-+ if (mode & VS_IRQ_MASK) {
-+ if ((mode & VS_IRQ) && unlikely(in_interrupt()))
-+ return 1;
-+ if ((mode & VS_HARDIRQ) && unlikely(in_irq()))
-+ return 1;
-+ if ((mode & VS_SOFTIRQ) && unlikely(in_softirq()))
-+ return 1;
-+ }
-+ return (((mode & VS_ADMIN) && (cid == 0)) ||
-+ ((mode & VS_WATCH) && (cid == 1)) ||
-+ ((mode & VS_HOSTID) && (id == 0)));
-+}
++#endif /* _VX_DEBUG_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/device_cmd.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/device_cmd.h
+--- linux-2.6.22.18/include/linux/vserver/device_cmd.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/device_cmd.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,44 @@
++#ifndef _VX_DEVICE_CMD_H
++#define _VX_DEVICE_CMD_H
+
-+#define vx_task_xid(t) ((t)->xid)
+
-+#define vx_current_xid() vx_task_xid(current)
++/* device vserver commands */
+
-+#define current_vx_info() (current->vx_info)
++#define VCMD_set_mapping VC_CMD(DEVICE, 1, 0)
++#define VCMD_unset_mapping VC_CMD(DEVICE, 2, 0)
+
++struct vcmd_set_mapping_v0 {
++ const char __user *device;
++ const char __user *target;
++ uint32_t flags;
++};
+
-+#define vx_check(c, m) __vs_check(vx_current_xid(), c, (m) | VS_IRQ)
+
-+#define vx_weak_check(c, m) ((m) ? vx_check(c, m) : 1)
++#ifdef __KERNEL__
+
++#ifdef CONFIG_COMPAT
+
-+#define nx_task_nid(t) ((t)->nid)
++#include <asm/compat.h>
+
-+#define nx_current_nid() nx_task_nid(current)
++struct vcmd_set_mapping_v0_x32 {
++ compat_uptr_t device_ptr;
++ compat_uptr_t target_ptr;
++ uint32_t flags;
++};
+
-+#define current_nx_info() (current->nx_info)
++#endif /* CONFIG_COMPAT */
+
++#include <linux/compiler.h>
+
-+#define nx_check(c, m) __vs_check(nx_current_nid(), c, m)
++extern int vc_set_mapping(struct vx_info *, void __user *);
++extern int vc_unset_mapping(struct vx_info *, void __user *);
+
-+#define nx_weak_check(c, m) ((m) ? nx_check(c, m) : 1)
++#ifdef CONFIG_COMPAT
+
++extern int vc_set_mapping_x32(struct vx_info *, void __user *);
++extern int vc_unset_mapping_x32(struct vx_info *, void __user *);
+
++#endif /* CONFIG_COMPAT */
+
-+/* generic flag merging */
++#endif /* __KERNEL__ */
++#endif /* _VX_DEVICE_CMD_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/device_def.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/device_def.h
+--- linux-2.6.22.18/include/linux/vserver/device_def.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/device_def.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,17 @@
++#ifndef _VX_DEVICE_DEF_H
++#define _VX_DEVICE_DEF_H
+
-+#define vs_check_flags(v, m, f) (((v) & (m)) ^ (f))
-+
-+#define vs_mask_flags(v, f, m) (((v) & ~(m)) | ((f) & (m)))
-+
-+#define vs_mask_mask(v, f, m) (((v) & ~(m)) | ((v) & (f) & (m)))
-+
-+#define vs_check_bit(v, n) ((v) & (1LL << (n)))
++#include <linux/types.h>
+
++struct vx_dmap_target {
++ dev_t target;
++ uint32_t flags;
++};
+
-+/* context flags */
++struct _vx_device {
++#ifdef CONFIG_VSERVER_DEVICE
++ struct vx_dmap_target targets[2];
++#endif
++};
+
-+#define __vx_flags(v) ((v) ? (v)->vx_flags : 0)
++#endif /* _VX_DEVICE_DEF_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/device.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/device.h
+--- linux-2.6.22.18/include/linux/vserver/device.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/device.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,15 @@
++#ifndef _VX_DEVICE_H
++#define _VX_DEVICE_H
+
-+#define vx_current_flags() __vx_flags(current->vx_info)
+
-+#define vx_info_flags(v, m, f) \
-+ vs_check_flags(__vx_flags(v), m, f)
++#define DATTR_CREATE 0x00000001
++#define DATTR_OPEN 0x00000002
+
-+#define task_vx_flags(t, m, f) \
-+ ((t) && vx_info_flags((t)->vx_info, m, f))
++#define DATTR_REMAP 0x00000010
+
-+#define vx_flags(m, f) vx_info_flags(current->vx_info, m, f)
++#define DATTR_MASK 0x00000013
+
+
-+/* context caps */
++#else /* _VX_DEVICE_H */
++#warning duplicate inclusion
++#endif /* _VX_DEVICE_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/dlimit_cmd.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/dlimit_cmd.h
+--- linux-2.6.22.18/include/linux/vserver/dlimit_cmd.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/dlimit_cmd.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,74 @@
++#ifndef _VX_DLIMIT_CMD_H
++#define _VX_DLIMIT_CMD_H
+
-+#define __vx_ccaps(v) ((v) ? (v)->vx_ccaps : 0)
+
-+#define vx_current_ccaps() __vx_ccaps(current->vx_info)
++/* dlimit vserver commands */
+
-+#define vx_info_ccaps(v, c) (__vx_ccaps(v) & (c))
++#define VCMD_add_dlimit VC_CMD(DLIMIT, 1, 0)
++#define VCMD_rem_dlimit VC_CMD(DLIMIT, 2, 0)
+
-+#define vx_ccaps(c) vx_info_ccaps(current->vx_info, (c))
++#define VCMD_set_dlimit VC_CMD(DLIMIT, 5, 0)
++#define VCMD_get_dlimit VC_CMD(DLIMIT, 6, 0)
+
++struct vcmd_ctx_dlimit_base_v0 {
++ const char __user *name;
++ uint32_t flags;
++};
+
++struct vcmd_ctx_dlimit_v0 {
++ const char __user *name;
++ uint32_t space_used; /* used space in kbytes */
++ uint32_t space_total; /* maximum space in kbytes */
++ uint32_t inodes_used; /* used inodes */
++ uint32_t inodes_total; /* maximum inodes */
++ uint32_t reserved; /* reserved for root in % */
++ uint32_t flags;
++};
+
-+/* network flags */
++#define CDLIM_UNSET ((uint32_t)0UL)
++#define CDLIM_INFINITY ((uint32_t)~0UL)
++#define CDLIM_KEEP ((uint32_t)~1UL)
+
-+#define __nx_flags(n) ((n) ? (n)->nx_flags : 0)
++#ifdef __KERNEL__
+
-+#define nx_current_flags() __nx_flags(current->nx_info)
++#ifdef CONFIG_COMPAT
+
-+#define nx_info_flags(n, m, f) \
-+ vs_check_flags(__nx_flags(n), m, f)
++#include <asm/compat.h>
+
-+#define task_nx_flags(t, m, f) \
-+ ((t) && nx_info_flags((t)->nx_info, m, f))
++struct vcmd_ctx_dlimit_base_v0_x32 {
++ compat_uptr_t name_ptr;
++ uint32_t flags;
++};
+
-+#define nx_flags(m, f) nx_info_flags(current->nx_info, m, f)
++struct vcmd_ctx_dlimit_v0_x32 {
++ compat_uptr_t name_ptr;
++ uint32_t space_used; /* used space in kbytes */
++ uint32_t space_total; /* maximum space in kbytes */
++ uint32_t inodes_used; /* used inodes */
++ uint32_t inodes_total; /* maximum inodes */
++ uint32_t reserved; /* reserved for root in % */
++ uint32_t flags;
++};
+
++#endif /* CONFIG_COMPAT */
+
-+/* network caps */
++#include <linux/compiler.h>
+
-+#define __nx_ncaps(n) ((n) ? (n)->nx_ncaps : 0)
++extern int vc_add_dlimit(uint32_t, void __user *);
++extern int vc_rem_dlimit(uint32_t, void __user *);
+
-+#define nx_current_ncaps() __nx_ncaps(current->nx_info)
++extern int vc_set_dlimit(uint32_t, void __user *);
++extern int vc_get_dlimit(uint32_t, void __user *);
+
-+#define nx_info_ncaps(n, c) (__nx_ncaps(n) & (c))
++#ifdef CONFIG_COMPAT
+
-+#define nx_ncaps(c) nx_info_ncaps(current->nx_info, c)
++extern int vc_add_dlimit_x32(uint32_t, void __user *);
++extern int vc_rem_dlimit_x32(uint32_t, void __user *);
+
++extern int vc_set_dlimit_x32(uint32_t, void __user *);
++extern int vc_get_dlimit_x32(uint32_t, void __user *);
+
-+/* context mask capabilities */
++#endif /* CONFIG_COMPAT */
+
-+#define __vx_mcaps(v) ((v) ? (v)->vx_ccaps >> 32UL : ~0 )
++#endif /* __KERNEL__ */
++#endif /* _VX_DLIMIT_CMD_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/dlimit.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/dlimit.h
+--- linux-2.6.22.18/include/linux/vserver/dlimit.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/dlimit.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,54 @@
++#ifndef _VX_DLIMIT_H
++#define _VX_DLIMIT_H
+
-+#define vx_info_mcaps(v, c) (__vx_mcaps(v) & (c))
++#include "switch.h"
+
-+#define vx_mcaps(c) vx_info_mcaps(current->vx_info, c)
+
++#ifdef __KERNEL__
+
-+/* context bcap mask */
++/* keep in sync with CDLIM_INFINITY */
+
-+#define __vx_bcaps(v) ((v) ? (v)->vx_bcaps : ~0 )
++#define DLIM_INFINITY (~0ULL)
+
-+#define vx_current_bcaps() __vx_bcaps(current->vx_info)
++#include <linux/spinlock.h>
++#include <linux/rcupdate.h>
+
-+#define vx_info_bcaps(v, c) (__vx_bcaps(v) & (c))
++struct super_block;
+
-+#define vx_bcaps(c) vx_info_bcaps(current->vx_info, c)
++struct dl_info {
++ struct hlist_node dl_hlist; /* linked list of contexts */
++ struct rcu_head dl_rcu; /* the rcu head */
++ tag_t dl_tag; /* context tag */
++ atomic_t dl_usecnt; /* usage count */
++ atomic_t dl_refcnt; /* reference count */
+
++ struct super_block *dl_sb; /* associated superblock */
+
-+#define vx_info_cap_bset(v) ((v) ? (v)->vx_cap_bset : cap_bset)
++ spinlock_t dl_lock; /* protect the values */
+
-+#define vx_current_cap_bset() vx_info_cap_bset(current->vx_info)
++ unsigned long long dl_space_used; /* used space in bytes */
++ unsigned long long dl_space_total; /* maximum space in bytes */
++ unsigned long dl_inodes_used; /* used inodes */
++ unsigned long dl_inodes_total; /* maximum inodes */
+
++ unsigned int dl_nrlmult; /* non root limit mult */
++};
+
-+#define __vx_info_mbcap(v, b) \
-+ (!vx_info_flags(v, VXF_STATE_SETUP, 0) ? \
-+ vx_info_bcaps(v, b) : (b))
++struct rcu_head;
+
-+#define vx_info_mbcap(v, b) __vx_info_mbcap(v, cap_t(b))
++extern void rcu_free_dl_info(struct rcu_head *);
++extern void unhash_dl_info(struct dl_info *);
+
-+#define task_vx_mbcap(t, b) \
-+ vx_info_mbcap((t)->vx_info, (t)->b)
++extern struct dl_info *locate_dl_info(struct super_block *, tag_t);
+
-+#define vx_mbcap(b) task_vx_mbcap(current, b)
+
-+#define vx_cap_raised(v, c, f) (vx_info_mbcap(v, c) & CAP_TO_MASK(f))
++struct kstatfs;
+
-+#define vx_capable(b, c) (capable(b) || \
-+ (cap_raised(current->cap_effective, b) && vx_ccaps(c)))
++extern void vx_vsi_statfs(struct super_block *, struct kstatfs *);
+
-+#define nx_capable(b, c) (capable(b) || \
-+ (cap_raised(current->cap_effective, b) && nx_ncaps(c)))
++typedef uint64_t dlsize_t;
+
-+#define vx_current_initpid(n) \
-+ (current->vx_info && \
-+ (current->vx_info->vx_initpid == (n)))
++#endif /* __KERNEL__ */
++#else /* _VX_DLIMIT_H */
++#warning duplicate inclusion
++#endif /* _VX_DLIMIT_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/global.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/global.h
+--- linux-2.6.22.18/include/linux/vserver/global.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/global.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,18 @@
++#ifndef _VX_GLOBAL_H
++#define _VX_GLOBAL_H
+
+
-+#define __vx_state(v) ((v) ? ((v)->vx_state) : 0)
++extern atomic_t vx_global_ctotal;
++extern atomic_t vx_global_cactive;
+
-+#define vx_info_state(v, m) (__vx_state(v) & (m))
++extern atomic_t nx_global_ctotal;
++extern atomic_t nx_global_cactive;
+
++extern atomic_t vs_global_nsproxy;
++extern atomic_t vs_global_fs;
++extern atomic_t vs_global_mnt_ns;
++extern atomic_t vs_global_uts_ns;
++extern atomic_t vs_global_ipc_ns;
+
-+#define __nx_state(n) ((n) ? ((n)->nx_state) : 0)
+
-+#define nx_info_state(n, m) (__nx_state(n) & (m))
++#endif /* _VX_GLOBAL_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/history.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/history.h
+--- linux-2.6.22.18/include/linux/vserver/history.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/history.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,197 @@
++#ifndef _VX_HISTORY_H
++#define _VX_HISTORY_H
+
-+#endif
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/cacct.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/cacct.h
---- linux-2.6.22.10/include/linux/vserver/cacct.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/cacct.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,15 @@
-+#ifndef _VX_CACCT_H
-+#define _VX_CACCT_H
+
++enum {
++ VXH_UNUSED = 0,
++ VXH_THROW_OOPS = 1,
+
-+enum sock_acc_field {
-+ VXA_SOCK_UNSPEC = 0,
-+ VXA_SOCK_UNIX,
-+ VXA_SOCK_INET,
-+ VXA_SOCK_INET6,
-+ VXA_SOCK_PACKET,
-+ VXA_SOCK_OTHER,
-+ VXA_SOCK_SIZE /* array size */
++ VXH_GET_VX_INFO,
++ VXH_PUT_VX_INFO,
++ VXH_INIT_VX_INFO,
++ VXH_SET_VX_INFO,
++ VXH_CLR_VX_INFO,
++ VXH_CLAIM_VX_INFO,
++ VXH_RELEASE_VX_INFO,
++ VXH_ALLOC_VX_INFO,
++ VXH_DEALLOC_VX_INFO,
++ VXH_HASH_VX_INFO,
++ VXH_UNHASH_VX_INFO,
++ VXH_LOC_VX_INFO,
++ VXH_LOOKUP_VX_INFO,
++ VXH_CREATE_VX_INFO,
+};
+
-+#endif /* _VX_CACCT_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/cacct_cmd.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/cacct_cmd.h
---- linux-2.6.22.10/include/linux/vserver/cacct_cmd.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/cacct_cmd.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,23 @@
-+#ifndef _VX_CACCT_CMD_H
-+#define _VX_CACCT_CMD_H
-+
++struct _vxhe_vxi {
++ struct vx_info *ptr;
++ unsigned xid;
++ unsigned usecnt;
++ unsigned tasks;
++};
+
-+/* virtual host info name commands */
++struct _vxhe_set_clr {
++ void *data;
++};
+
-+#define VCMD_sock_stat VC_CMD(VSTAT, 5, 0)
++struct _vxhe_loc_lookup {
++ unsigned arg;
++};
+
-+struct vcmd_sock_stat_v0 {
-+ uint32_t field;
-+ uint32_t count[3];
-+ uint64_t total[3];
++struct _vx_hist_entry {
++ void *loc;
++ unsigned short seq;
++ unsigned short type;
++ struct _vxhe_vxi vxi;
++ union {
++ struct _vxhe_set_clr sc;
++ struct _vxhe_loc_lookup ll;
++ };
+};
+
++#ifdef CONFIG_VSERVER_HISTORY
+
-+#ifdef __KERNEL__
++extern unsigned volatile int vxh_active;
+
-+#include <linux/compiler.h>
++struct _vx_hist_entry *vxh_advance(void *loc);
+
-+extern int vc_sock_stat(struct vx_info *, void __user *);
+
-+#endif /* __KERNEL__ */
-+#endif /* _VX_CACCT_CMD_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/cacct_def.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/cacct_def.h
---- linux-2.6.22.10/include/linux/vserver/cacct_def.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/cacct_def.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,43 @@
-+#ifndef _VX_CACCT_DEF_H
-+#define _VX_CACCT_DEF_H
++static inline
++void __vxh_copy_vxi(struct _vx_hist_entry *entry, struct vx_info *vxi)
++{
++ entry->vxi.ptr = vxi;
++ if (vxi) {
++ entry->vxi.usecnt = atomic_read(&vxi->vx_usecnt);
++ entry->vxi.tasks = atomic_read(&vxi->vx_tasks);
++ entry->vxi.xid = vxi->vx_id;
++ }
++}
+
-+#include <asm/atomic.h>
-+#include <linux/vserver/cacct.h>
+
++#define __HERE__ current_text_addr()
+
-+struct _vx_sock_acc {
-+ atomic_long_t count;
-+ atomic_long_t total;
-+};
++#define __VXH_BODY(__type, __data, __here) \
++ struct _vx_hist_entry *entry; \
++ \
++ preempt_disable(); \
++ entry = vxh_advance(__here); \
++ __data; \
++ entry->type = __type; \
++ preempt_enable();
+
-+/* context sub struct */
+
-+struct _vx_cacct {
-+ struct _vx_sock_acc sock[VXA_SOCK_SIZE][3];
-+ atomic_t slab[8];
-+ atomic_t page[6][8];
-+};
++ /* pass vxi only */
+
-+#ifdef CONFIG_VSERVER_DEBUG
++#define __VXH_SMPL \
++ __vxh_copy_vxi(entry, vxi)
+
-+static inline void __dump_vx_cacct(struct _vx_cacct *cacct)
++static inline
++void __vxh_smpl(struct vx_info *vxi, int __type, void *__here)
+{
-+ int i, j;
-+
-+ printk("\t_vx_cacct:");
-+ for (i = 0; i < 6; i++) {
-+ struct _vx_sock_acc *ptr = cacct->sock[i];
-+
-+ printk("\t [%d] =", i);
-+ for (j = 0; j < 3; j++) {
-+ printk(" [%d] = %8lu, %8lu", j,
-+ atomic_long_read(&ptr[j].count),
-+ atomic_long_read(&ptr[j].total));
-+ }
-+ printk("\n");
-+ }
++ __VXH_BODY(__type, __VXH_SMPL, __here)
+}
+
-+#endif
++ /* pass vxi and data (void *) */
+
-+#endif /* _VX_CACCT_DEF_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/cacct_int.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/cacct_int.h
---- linux-2.6.22.10/include/linux/vserver/cacct_int.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/cacct_int.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,21 @@
-+#ifndef _VX_CACCT_INT_H
-+#define _VX_CACCT_INT_H
++#define __VXH_DATA \
++ __vxh_copy_vxi(entry, vxi); \
++ entry->sc.data = data
+
++static inline
++void __vxh_data(struct vx_info *vxi, void *data,
++ int __type, void *__here)
++{
++ __VXH_BODY(__type, __VXH_DATA, __here)
++}
+
-+#ifdef __KERNEL__
++ /* pass vxi and arg (long) */
++
++#define __VXH_LONG \
++ __vxh_copy_vxi(entry, vxi); \
++ entry->ll.arg = arg
+
+static inline
-+unsigned long vx_sock_count(struct _vx_cacct *cacct, int type, int pos)
++void __vxh_long(struct vx_info *vxi, long arg,
++ int __type, void *__here)
+{
-+ return atomic_long_read(&cacct->sock[type][pos].count);
++ __VXH_BODY(__type, __VXH_LONG, __here)
+}
+
+
+static inline
-+unsigned long vx_sock_total(struct _vx_cacct *cacct, int type, int pos)
++void __vxh_throw_oops(void *__here)
+{
-+ return atomic_long_read(&cacct->sock[type][pos].total);
++ __VXH_BODY(VXH_THROW_OOPS, {}, __here);
++ /* prevent further acquisition */
++ vxh_active = 0;
+}
+
-+#endif /* __KERNEL__ */
-+#endif /* _VX_CACCT_INT_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/context.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/context.h
---- linux-2.6.22.10/include/linux/vserver/context.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/context.h 2007-10-11 01:10:22 +0200
-@@ -0,0 +1,176 @@
-+#ifndef _VX_CONTEXT_H
-+#define _VX_CONTEXT_H
-+
-+#include <linux/types.h>
-+#include <linux/capability.h>
+
++#define vxh_throw_oops() __vxh_throw_oops(__HERE__);
+
-+/* context flags */
++#define __vxh_get_vx_info(v, h) __vxh_smpl(v, VXH_GET_VX_INFO, h);
++#define __vxh_put_vx_info(v, h) __vxh_smpl(v, VXH_PUT_VX_INFO, h);
+
-+#define VXF_INFO_SCHED 0x00000002
-+#define VXF_INFO_NPROC 0x00000004
-+#define VXF_INFO_PRIVATE 0x00000008
++#define __vxh_init_vx_info(v, d, h) \
++ __vxh_data(v, d, VXH_INIT_VX_INFO, h);
++#define __vxh_set_vx_info(v, d, h) \
++ __vxh_data(v, d, VXH_SET_VX_INFO, h);
++#define __vxh_clr_vx_info(v, d, h) \
++ __vxh_data(v, d, VXH_CLR_VX_INFO, h);
+
-+#define VXF_INFO_INIT 0x00000010
-+#define VXF_INFO_HIDE 0x00000020
-+#define VXF_INFO_ULIMIT 0x00000040
-+#define VXF_INFO_NSPACE 0x00000080
++#define __vxh_claim_vx_info(v, d, h) \
++ __vxh_data(v, d, VXH_CLAIM_VX_INFO, h);
++#define __vxh_release_vx_info(v, d, h) \
++ __vxh_data(v, d, VXH_RELEASE_VX_INFO, h);
+
-+#define VXF_SCHED_HARD 0x00000100
-+#define VXF_SCHED_PRIO 0x00000200
-+#define VXF_SCHED_PAUSE 0x00000400
++#define vxh_alloc_vx_info(v) \
++ __vxh_smpl(v, VXH_ALLOC_VX_INFO, __HERE__);
++#define vxh_dealloc_vx_info(v) \
++ __vxh_smpl(v, VXH_DEALLOC_VX_INFO, __HERE__);
+
-+#define VXF_VIRT_MEM 0x00010000
-+#define VXF_VIRT_UPTIME 0x00020000
-+#define VXF_VIRT_CPU 0x00040000
-+#define VXF_VIRT_LOAD 0x00080000
-+#define VXF_VIRT_TIME 0x00100000
++#define vxh_hash_vx_info(v) \
++ __vxh_smpl(v, VXH_HASH_VX_INFO, __HERE__);
++#define vxh_unhash_vx_info(v) \
++ __vxh_smpl(v, VXH_UNHASH_VX_INFO, __HERE__);
+
-+#define VXF_HIDE_MOUNT 0x01000000
-+/* was VXF_HIDE_NETIF 0x02000000 */
-+#define VXF_HIDE_VINFO 0x04000000
++#define vxh_loc_vx_info(v, l) \
++ __vxh_long(v, l, VXH_LOC_VX_INFO, __HERE__);
++#define vxh_lookup_vx_info(v, l) \
++ __vxh_long(v, l, VXH_LOOKUP_VX_INFO, __HERE__);
++#define vxh_create_vx_info(v, l) \
++ __vxh_long(v, l, VXH_CREATE_VX_INFO, __HERE__);
+
-+#define VXF_STATE_SETUP (1ULL << 32)
-+#define VXF_STATE_INIT (1ULL << 33)
-+#define VXF_STATE_ADMIN (1ULL << 34)
++extern void vxh_dump_history(void);
+
-+#define VXF_SC_HELPER (1ULL << 36)
-+#define VXF_REBOOT_KILL (1ULL << 37)
-+#define VXF_PERSISTENT (1ULL << 38)
+
-+#define VXF_FORK_RSS (1ULL << 48)
-+#define VXF_PROLIFIC (1ULL << 49)
++#else /* CONFIG_VSERVER_HISTORY */
+
-+#define VXF_IGNEG_NICE (1ULL << 52)
++#define __HERE__ 0
+
-+#define VXF_ONE_TIME (0x0007ULL << 32)
++#define vxh_throw_oops() do { } while (0)
+
-+#define VXF_INIT_SET (VXF_STATE_SETUP | VXF_STATE_INIT | VXF_STATE_ADMIN)
++#define __vxh_get_vx_info(v, h) do { } while (0)
++#define __vxh_put_vx_info(v, h) do { } while (0)
+
++#define __vxh_init_vx_info(v, d, h) do { } while (0)
++#define __vxh_set_vx_info(v, d, h) do { } while (0)
++#define __vxh_clr_vx_info(v, d, h) do { } while (0)
+
-+/* context migration */
++#define __vxh_claim_vx_info(v, d, h) do { } while (0)
++#define __vxh_release_vx_info(v, d, h) do { } while (0)
+
-+#define VXM_SET_INIT 0x00000001
-+#define VXM_SET_REAPER 0x00000002
++#define vxh_alloc_vx_info(v) do { } while (0)
++#define vxh_dealloc_vx_info(v) do { } while (0)
+
-+/* context caps */
++#define vxh_hash_vx_info(v) do { } while (0)
++#define vxh_unhash_vx_info(v) do { } while (0)
+
-+#define VXC_CAP_MASK 0x00000000
++#define vxh_loc_vx_info(v, l) do { } while (0)
++#define vxh_lookup_vx_info(v, l) do { } while (0)
++#define vxh_create_vx_info(v, l) do { } while (0)
+
-+#define VXC_SET_UTSNAME 0x00000001
-+#define VXC_SET_RLIMIT 0x00000002
++#define vxh_dump_history() do { } while (0)
+
-+/* was VXC_RAW_ICMP 0x00000100 */
-+#define VXC_SYSLOG 0x00001000
+
-+#define VXC_SECURE_MOUNT 0x00010000
-+#define VXC_SECURE_REMOUNT 0x00020000
-+#define VXC_BINARY_MOUNT 0x00040000
++#endif /* CONFIG_VSERVER_HISTORY */
+
-+#define VXC_QUOTA_CTL 0x00100000
-+#define VXC_ADMIN_MAPPER 0x00200000
-+#define VXC_ADMIN_CLOOP 0x00400000
++#endif /* _VX_HISTORY_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/inode_cmd.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/inode_cmd.h
+--- linux-2.6.22.18/include/linux/vserver/inode_cmd.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/inode_cmd.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,59 @@
++#ifndef _VX_INODE_CMD_H
++#define _VX_INODE_CMD_H
+
-+#define VXC_KTHREAD 0x01000000
+
++/* inode vserver commands */
+
-+#ifdef __KERNEL__
++#define VCMD_get_iattr VC_CMD(INODE, 1, 1)
++#define VCMD_set_iattr VC_CMD(INODE, 2, 1)
+
-+#include <linux/list.h>
-+#include <linux/spinlock.h>
-+#include <linux/rcupdate.h>
++#define VCMD_fget_iattr VC_CMD(INODE, 3, 0)
++#define VCMD_fset_iattr VC_CMD(INODE, 4, 0)
+
-+#include "limit_def.h"
-+#include "sched_def.h"
-+#include "cvirt_def.h"
-+#include "cacct_def.h"
-+#include "device_def.h"
++struct vcmd_ctx_iattr_v1 {
++ const char __user *name;
++ uint32_t tag;
++ uint32_t flags;
++ uint32_t mask;
++};
+
-+struct _vx_info_pc {
-+ struct _vx_sched_pc sched_pc;
-+ struct _vx_cvirt_pc cvirt_pc;
++struct vcmd_ctx_fiattr_v0 {
++ uint32_t tag;
++ uint32_t flags;
++ uint32_t mask;
+};
+
-+struct vx_info {
-+ struct hlist_node vx_hlist; /* linked list of contexts */
-+ xid_t vx_id; /* context id */
-+ atomic_t vx_usecnt; /* usage count */
-+ atomic_t vx_tasks; /* tasks count */
-+ struct vx_info *vx_parent; /* parent context */
-+ int vx_state; /* context state */
+
-+ unsigned long vx_nsmask; /* assignment mask */
-+ struct nsproxy *vx_nsproxy; /* private namespace */
-+ struct fs_struct *vx_fs; /* private namespace fs */
++#ifdef __KERNEL__
+
-+ uint64_t vx_flags; /* context flags */
-+ uint64_t vx_bcaps; /* bounding caps (system) */
-+ uint64_t vx_ccaps; /* context caps (vserver) */
-+ kernel_cap_t vx_cap_bset; /* the guest's bset */
+
-+ struct task_struct *vx_reaper; /* guest reaper process */
-+ pid_t vx_initpid; /* PID of guest init */
-+ int64_t vx_badness_bias; /* OOM points bias */
++#ifdef CONFIG_COMPAT
+
-+ struct _vx_limit limit; /* vserver limits */
-+ struct _vx_sched sched; /* vserver scheduler */
-+ struct _vx_cvirt cvirt; /* virtual/bias stuff */
-+ struct _vx_cacct cacct; /* context accounting */
++#include <asm/compat.h>
+
-+ struct _vx_device dmap; /* default device map targets */
++struct vcmd_ctx_iattr_v1_x32 {
++ compat_uptr_t name_ptr;
++ uint32_t tag;
++ uint32_t flags;
++ uint32_t mask;
++};
+
-+#ifndef CONFIG_SMP
-+ struct _vx_info_pc info_pc; /* per cpu data */
-+#else
-+ struct _vx_info_pc *ptr_pc; /* per cpu array */
-+#endif
-+
-+ wait_queue_head_t vx_wait; /* context exit waitqueue */
-+ int reboot_cmd; /* last sys_reboot() cmd */
-+ int exit_code; /* last process exit code */
++#endif /* CONFIG_COMPAT */
+
-+ char vx_name[65]; /* vserver name */
-+};
++#include <linux/compiler.h>
+
-+#ifndef CONFIG_SMP
-+#define vx_ptr_pc(vxi) (&(vxi)->info_pc)
-+#define vx_per_cpu(vxi, v, id) vx_ptr_pc(vxi)->v
-+#else
-+#define vx_ptr_pc(vxi) ((vxi)->ptr_pc)
-+#define vx_per_cpu(vxi, v, id) per_cpu_ptr(vx_ptr_pc(vxi), id)->v
-+#endif
++extern int vc_get_iattr(void __user *);
++extern int vc_set_iattr(void __user *);
+
-+#define vx_cpu(vxi, v) vx_per_cpu(vxi, v, smp_processor_id())
++extern int vc_fget_iattr(uint32_t, void __user *);
++extern int vc_fset_iattr(uint32_t, void __user *);
+
++#ifdef CONFIG_COMPAT
+
-+struct vx_info_save {
-+ struct vx_info *vxi;
-+ xid_t xid;
-+};
++extern int vc_get_iattr_x32(void __user *);
++extern int vc_set_iattr_x32(void __user *);
+
++#endif /* CONFIG_COMPAT */
+
-+/* status flags */
++#endif /* __KERNEL__ */
++#endif /* _VX_INODE_CMD_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/inode.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/inode.h
+--- linux-2.6.22.18/include/linux/vserver/inode.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/inode.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,38 @@
++#ifndef _VX_INODE_H
++#define _VX_INODE_H
+
-+#define VXS_HASHED 0x0001
-+#define VXS_PAUSED 0x0010
-+#define VXS_SHUTDOWN 0x0100
-+#define VXS_HELPER 0x1000
-+#define VXS_RELEASED 0x8000
+
++#define IATTR_TAG 0x01000000
+
-+extern void claim_vx_info(struct vx_info *, struct task_struct *);
-+extern void release_vx_info(struct vx_info *, struct task_struct *);
++#define IATTR_ADMIN 0x00000001
++#define IATTR_WATCH 0x00000002
++#define IATTR_HIDE 0x00000004
++#define IATTR_FLAGS 0x00000007
+
-+extern struct vx_info *lookup_vx_info(int);
-+extern struct vx_info *lookup_or_create_vx_info(int);
++#define IATTR_BARRIER 0x00010000
++#define IATTR_IUNLINK 0x00020000
++#define IATTR_IMMUTABLE 0x00040000
+
-+extern int get_xid_list(int, unsigned int *, int);
-+extern int xid_is_hashed(xid_t);
++#ifdef __KERNEL__
+
-+extern int vx_migrate_task(struct task_struct *, struct vx_info *, int);
+
-+extern long vs_state_change(struct vx_info *, unsigned int);
++#ifdef CONFIG_VSERVER_PROC_SECURE
++#define IATTR_PROC_DEFAULT ( IATTR_ADMIN | IATTR_HIDE )
++#define IATTR_PROC_SYMLINK ( IATTR_ADMIN )
++#else
++#define IATTR_PROC_DEFAULT ( IATTR_ADMIN )
++#define IATTR_PROC_SYMLINK ( IATTR_ADMIN )
++#endif
+
++#define vx_hide_check(c, m) (((m) & IATTR_HIDE) ? vx_check(c, m) : 1)
+
+#endif /* __KERNEL__ */
-+#endif /* _VX_CONTEXT_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/context_cmd.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/context_cmd.h
---- linux-2.6.22.10/include/linux/vserver/context_cmd.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/context_cmd.h 2007-08-19 00:40:28 +0200
-@@ -0,0 +1,128 @@
-+#ifndef _VX_CONTEXT_CMD_H
-+#define _VX_CONTEXT_CMD_H
+
++/* inode ioctls */
+
-+/* vinfo commands */
++#define FIOC_GETXFLG _IOR('x', 5, long)
++#define FIOC_SETXFLG _IOW('x', 6, long)
+
-+#define VCMD_task_xid VC_CMD(VINFO, 1, 0)
++#else /* _VX_INODE_H */
++#warning duplicate inclusion
++#endif /* _VX_INODE_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/Kbuild linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/Kbuild
+--- linux-2.6.22.18/include/linux/vserver/Kbuild 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/Kbuild 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,8 @@
+
-+#ifdef __KERNEL__
-+extern int vc_task_xid(uint32_t);
++unifdef-y += context_cmd.h network_cmd.h space_cmd.h \
++ cacct_cmd.h cvirt_cmd.h limit_cmd.h dlimit_cmd.h \
++ inode_cmd.h tag_cmd.h sched_cmd.h signal_cmd.h \
++ debug_cmd.h device_cmd.h
+
-+#endif /* __KERNEL__ */
++unifdef-y += switch.h network.h monitor.h inode.h device.h
+
-+#define VCMD_vx_info VC_CMD(VINFO, 5, 0)
+diff -Nurp linux-2.6.22.18/include/linux/vserver/limit_cmd.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/limit_cmd.h
+--- linux-2.6.22.18/include/linux/vserver/limit_cmd.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/limit_cmd.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,69 @@
++#ifndef _VX_LIMIT_CMD_H
++#define _VX_LIMIT_CMD_H
+
-+struct vcmd_vx_info_v0 {
-+ uint32_t xid;
-+ uint32_t initpid;
-+ /* more to come */
-+};
+
-+#ifdef __KERNEL__
-+extern int vc_vx_info(struct vx_info *, void __user *);
++/* rlimit vserver commands */
+
-+#endif /* __KERNEL__ */
++#define VCMD_get_rlimit VC_CMD(RLIMIT, 1, 0)
++#define VCMD_set_rlimit VC_CMD(RLIMIT, 2, 0)
++#define VCMD_get_rlimit_mask VC_CMD(RLIMIT, 3, 0)
++#define VCMD_reset_minmax VC_CMD(RLIMIT, 9, 0)
+
-+#define VCMD_ctx_stat VC_CMD(VSTAT, 0, 0)
++struct vcmd_ctx_rlimit_v0 {
++ uint32_t id;
++ uint64_t minimum;
++ uint64_t softlimit;
++ uint64_t maximum;
++};
+
-+struct vcmd_ctx_stat_v0 {
-+ uint32_t usecnt;
-+ uint32_t tasks;
-+ /* more to come */
++struct vcmd_ctx_rlimit_mask_v0 {
++ uint32_t minimum;
++ uint32_t softlimit;
++ uint32_t maximum;
++};
++
++#define VCMD_rlimit_stat VC_CMD(VSTAT, 1, 0)
++
++struct vcmd_rlimit_stat_v0 {
++ uint32_t id;
++ uint32_t hits;
++ uint64_t value;
++ uint64_t minimum;
++ uint64_t maximum;
+};
+
++#define CRLIM_UNSET (0ULL)
++#define CRLIM_INFINITY (~0ULL)
++#define CRLIM_KEEP (~1ULL)
++
+#ifdef __KERNEL__
-+extern int vc_ctx_stat(struct vx_info *, void __user *);
+
-+#endif /* __KERNEL__ */
++#ifdef CONFIG_IA32_EMULATION
+
-+/* context commands */
++struct vcmd_ctx_rlimit_v0_x32 {
++ uint32_t id;
++ uint64_t minimum;
++ uint64_t softlimit;
++ uint64_t maximum;
++} __attribute__ ((aligned (4)));
+
-+#define VCMD_ctx_create_v0 VC_CMD(VPROC, 1, 0)
-+#define VCMD_ctx_create VC_CMD(VPROC, 1, 1)
++#endif /* CONFIG_IA32_EMULATION */
+
-+struct vcmd_ctx_create {
-+ uint64_t flagword;
-+};
++#include <linux/compiler.h>
+
-+#define VCMD_ctx_migrate_v0 VC_CMD(PROCMIG, 1, 0)
-+#define VCMD_ctx_migrate VC_CMD(PROCMIG, 1, 1)
++extern int vc_get_rlimit_mask(uint32_t, void __user *);
++extern int vc_get_rlimit(struct vx_info *, void __user *);
++extern int vc_set_rlimit(struct vx_info *, void __user *);
++extern int vc_reset_minmax(struct vx_info *, void __user *);
+
-+struct vcmd_ctx_migrate {
-+ uint64_t flagword;
-+};
++extern int vc_rlimit_stat(struct vx_info *, void __user *);
+
-+#ifdef __KERNEL__
-+extern int vc_ctx_create(uint32_t, void __user *);
-+extern int vc_ctx_migrate(struct vx_info *, void __user *);
++#ifdef CONFIG_IA32_EMULATION
+
-+#endif /* __KERNEL__ */
++extern int vc_get_rlimit_x32(struct vx_info *, void __user *);
++extern int vc_set_rlimit_x32(struct vx_info *, void __user *);
+
++#endif /* CONFIG_IA32_EMULATION */
+
-+/* flag commands */
++#endif /* __KERNEL__ */
++#endif /* _VX_LIMIT_CMD_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/limit_def.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/limit_def.h
+--- linux-2.6.22.18/include/linux/vserver/limit_def.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/limit_def.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,47 @@
++#ifndef _VX_LIMIT_DEF_H
++#define _VX_LIMIT_DEF_H
+
-+#define VCMD_get_cflags VC_CMD(FLAGS, 1, 0)
-+#define VCMD_set_cflags VC_CMD(FLAGS, 2, 0)
++#include <asm/atomic.h>
++#include <asm/resource.h>
+
-+struct vcmd_ctx_flags_v0 {
-+ uint64_t flagword;
-+ uint64_t mask;
-+};
++#include "limit.h"
+
-+#ifdef __KERNEL__
-+extern int vc_get_cflags(struct vx_info *, void __user *);
-+extern int vc_set_cflags(struct vx_info *, void __user *);
+
-+#endif /* __KERNEL__ */
++struct _vx_res_limit {
++ rlim_t soft; /* Context soft limit */
++ rlim_t hard; /* Context hard limit */
+
++ rlim_atomic_t rcur; /* Current value */
++ rlim_t rmin; /* Context minimum */
++ rlim_t rmax; /* Context maximum */
+
-+/* context caps commands */
++ atomic_t lhit; /* Limit hits */
++};
+
-+#define VCMD_get_ccaps VC_CMD(FLAGS, 3, 1)
-+#define VCMD_set_ccaps VC_CMD(FLAGS, 4, 1)
++/* context sub struct */
+
-+struct vcmd_ctx_caps_v1 {
-+ uint64_t ccaps;
-+ uint64_t cmask;
++struct _vx_limit {
++ struct _vx_res_limit res[NUM_LIMITS];
+};
+
-+#ifdef __KERNEL__
-+extern int vc_get_ccaps(struct vx_info *, void __user *);
-+extern int vc_set_ccaps(struct vx_info *, void __user *);
++#ifdef CONFIG_VSERVER_DEBUG
+
-+#endif /* __KERNEL__ */
++static inline void __dump_vx_limit(struct _vx_limit *limit)
++{
++ int i;
+
++ printk("\t_vx_limit:");
++ for (i = 0; i < NUM_LIMITS; i++) {
++ printk("\t [%2d] = %8lu %8lu/%8lu, %8ld/%8ld, %8d\n",
++ i, (unsigned long)__rlim_get(limit, i),
++ (unsigned long)__rlim_rmin(limit, i),
++ (unsigned long)__rlim_rmax(limit, i),
++ (long)__rlim_soft(limit, i),
++ (long)__rlim_hard(limit, i),
++ atomic_read(&__rlim_lhit(limit, i)));
++ }
++}
+
-+/* bcaps commands */
++#endif
+
-+#define VCMD_get_bcaps VC_CMD(FLAGS, 9, 0)
-+#define VCMD_set_bcaps VC_CMD(FLAGS, 10, 0)
++#endif /* _VX_LIMIT_DEF_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/limit.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/limit.h
+--- linux-2.6.22.18/include/linux/vserver/limit.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/limit.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,70 @@
++#ifndef _VX_LIMIT_H
++#define _VX_LIMIT_H
++
++#define VLIMIT_NSOCK 16
++#define VLIMIT_OPENFD 17
++#define VLIMIT_ANON 18
++#define VLIMIT_SHMEM 19
++#define VLIMIT_SEMARY 20
++#define VLIMIT_NSEMS 21
++#define VLIMIT_DENTRY 22
++#define VLIMIT_MAPPED 23
+
-+struct vcmd_bcaps {
-+ uint64_t bcaps;
-+ uint64_t bmask;
-+};
+
+#ifdef __KERNEL__
-+extern int vc_get_bcaps(struct vx_info *, void __user *);
-+extern int vc_set_bcaps(struct vx_info *, void __user *);
+
-+#endif /* __KERNEL__ */
++#define VLIM_NOCHECK ((1L << VLIMIT_DENTRY) | (1L << RLIMIT_RSS))
+
++/* keep in sync with CRLIM_INFINITY */
+
-+/* OOM badness */
++#define VLIM_INFINITY (~0ULL)
+
-+#define VCMD_get_badness VC_CMD(MEMCTRL, 5, 0)
-+#define VCMD_set_badness VC_CMD(MEMCTRL, 6, 0)
++#include <asm/atomic.h>
++#include <asm/resource.h>
+
-+struct vcmd_badness_v0 {
-+ int64_t bias;
-+};
++#ifndef RLIM_INFINITY
++#warning RLIM_INFINITY is undefined
++#endif
+
-+#ifdef __KERNEL__
-+extern int vc_get_badness(struct vx_info *, void __user *);
-+extern int vc_set_badness(struct vx_info *, void __user *);
++#define __rlim_val(l, r, v) ((l)->res[r].v)
+
-+#endif /* __KERNEL__ */
-+#endif /* _VX_CONTEXT_CMD_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/cvirt.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/cvirt.h
---- linux-2.6.22.10/include/linux/vserver/cvirt.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/cvirt.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,20 @@
-+#ifndef _VX_CVIRT_H
-+#define _VX_CVIRT_H
++#define __rlim_soft(l, r) __rlim_val(l, r, soft)
++#define __rlim_hard(l, r) __rlim_val(l, r, hard)
+
++#define __rlim_rcur(l, r) __rlim_val(l, r, rcur)
++#define __rlim_rmin(l, r) __rlim_val(l, r, rmin)
++#define __rlim_rmax(l, r) __rlim_val(l, r, rmax)
+
-+#ifdef __KERNEL__
++#define __rlim_lhit(l, r) __rlim_val(l, r, lhit)
++#define __rlim_hit(l, r) atomic_inc(&__rlim_lhit(l, r))
+
-+struct timespec;
++typedef atomic_long_t rlim_atomic_t;
++typedef unsigned long rlim_t;
+
-+void vx_vsi_uptime(struct timespec *, struct timespec *);
++#define __rlim_get(l, r) atomic_long_read(&__rlim_rcur(l, r))
++#define __rlim_set(l, r, v) atomic_long_set(&__rlim_rcur(l, r), v)
++#define __rlim_inc(l, r) atomic_long_inc(&__rlim_rcur(l, r))
++#define __rlim_dec(l, r) atomic_long_dec(&__rlim_rcur(l, r))
++#define __rlim_add(l, r, v) atomic_long_add(v, &__rlim_rcur(l, r))
++#define __rlim_sub(l, r, v) atomic_long_sub(v, &__rlim_rcur(l, r))
+
+
-+struct vx_info;
++#if (RLIM_INFINITY == VLIM_INFINITY)
++#define VX_VLIM(r) ((long long)(long)(r))
++#define VX_RLIM(v) ((rlim_t)(v))
++#else
++#define VX_VLIM(r) (((r) == RLIM_INFINITY) \
++ ? VLIM_INFINITY : (long long)(r))
++#define VX_RLIM(v) (((v) == VLIM_INFINITY) \
++ ? RLIM_INFINITY : (rlim_t)(v))
++#endif
+
-+void vx_update_load(struct vx_info *);
++struct sysinfo;
+
++void vx_vsi_meminfo(struct sysinfo *);
++void vx_vsi_swapinfo(struct sysinfo *);
+
-+int vx_do_syslog(int, char __user *, int);
++#define NUM_LIMITS 24
+
+#endif /* __KERNEL__ */
-+#endif /* _VX_CVIRT_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/cvirt_cmd.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/cvirt_cmd.h
---- linux-2.6.22.10/include/linux/vserver/cvirt_cmd.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/cvirt_cmd.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,53 @@
-+#ifndef _VX_CVIRT_CMD_H
-+#define _VX_CVIRT_CMD_H
-+
++#endif /* _VX_LIMIT_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/limit_int.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/limit_int.h
+--- linux-2.6.22.18/include/linux/vserver/limit_int.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/limit_int.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,198 @@
++#ifndef _VX_LIMIT_INT_H
++#define _VX_LIMIT_INT_H
+
-+/* virtual host info name commands */
++#include "context.h"
+
-+#define VCMD_set_vhi_name VC_CMD(VHOST, 1, 0)
-+#define VCMD_get_vhi_name VC_CMD(VHOST, 2, 0)
++#ifdef __KERNEL__
+
-+struct vcmd_vhi_name_v0 {
-+ uint32_t field;
-+ char name[65];
-+};
++#define VXD_RCRES_COND(r) VXD_CBIT(cres, r)
++#define VXD_RLIMIT_COND(r) VXD_CBIT(limit, r)
+
++extern const char *vlimit_name[NUM_LIMITS];
+
-+enum vhi_name_field {
-+ VHIN_CONTEXT = 0,
-+ VHIN_SYSNAME,
-+ VHIN_NODENAME,
-+ VHIN_RELEASE,
-+ VHIN_VERSION,
-+ VHIN_MACHINE,
-+ VHIN_DOMAINNAME,
-+};
++static inline void __vx_acc_cres(struct vx_info *vxi,
++ int res, int dir, void *_data, char *_file, int _line)
++{
++ if (VXD_RCRES_COND(res))
++ vxlprintk(1, "vx_acc_cres[%5d,%s,%2d]: %5ld%s (%p)",
++ (vxi ? vxi->vx_id : -1), vlimit_name[res], res,
++ (vxi ? (long)__rlim_get(&vxi->limit, res) : 0),
++ (dir > 0) ? "++" : "--", _data, _file, _line);
++ if (!vxi)
++ return;
+
++ if (dir > 0)
++ __rlim_inc(&vxi->limit, res);
++ else
++ __rlim_dec(&vxi->limit, res);
++}
+
-+#ifdef __KERNEL__
++static inline void __vx_add_cres(struct vx_info *vxi,
++ int res, int amount, void *_data, char *_file, int _line)
++{
++ if (VXD_RCRES_COND(res))
++ vxlprintk(1, "vx_add_cres[%5d,%s,%2d]: %5ld += %5d (%p)",
++ (vxi ? vxi->vx_id : -1), vlimit_name[res], res,
++ (vxi ? (long)__rlim_get(&vxi->limit, res) : 0),
++ amount, _data, _file, _line);
++ if (amount == 0)
++ return;
++ if (!vxi)
++ return;
++ __rlim_add(&vxi->limit, res, amount);
++}
+
-+#include <linux/compiler.h>
++static inline
++int __vx_cres_adjust_max(struct _vx_limit *limit, int res, rlim_t value)
++{
++ int cond = (value > __rlim_rmax(limit, res));
+
-+extern int vc_set_vhi_name(struct vx_info *, void __user *);
-+extern int vc_get_vhi_name(struct vx_info *, void __user *);
++ if (cond)
++ __rlim_rmax(limit, res) = value;
++ return cond;
++}
+
-+#endif /* __KERNEL__ */
++static inline
++int __vx_cres_adjust_min(struct _vx_limit *limit, int res, rlim_t value)
++{
++ int cond = (value < __rlim_rmin(limit, res));
+
-+#define VCMD_virt_stat VC_CMD(VSTAT, 3, 0)
++ if (cond)
++ __rlim_rmin(limit, res) = value;
++ return cond;
++}
+
-+struct vcmd_virt_stat_v0 {
-+ uint64_t offset;
-+ uint64_t uptime;
-+ uint32_t nr_threads;
-+ uint32_t nr_running;
-+ uint32_t nr_uninterruptible;
-+ uint32_t nr_onhold;
-+ uint32_t nr_forks;
-+ uint32_t load[3];
-+};
++static inline
++void __vx_cres_fixup(struct _vx_limit *limit, int res, rlim_t value)
++{
++ if (!__vx_cres_adjust_max(limit, res, value))
++ __vx_cres_adjust_min(limit, res, value);
++}
+
-+#ifdef __KERNEL__
-+extern int vc_virt_stat(struct vx_info *, void __user *);
+
-+#endif /* __KERNEL__ */
-+#endif /* _VX_CVIRT_CMD_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/cvirt_def.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/cvirt_def.h
---- linux-2.6.22.10/include/linux/vserver/cvirt_def.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/cvirt_def.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,81 @@
-+#ifndef _VX_CVIRT_DEF_H
-+#define _VX_CVIRT_DEF_H
++/* return values:
++ +1 ... no limit hit
++ -1 ... over soft limit
++ 0 ... over hard limit */
+
-+#include <linux/jiffies.h>
-+#include <linux/spinlock.h>
-+#include <linux/wait.h>
-+#include <linux/time.h>
-+#include <linux/utsname.h>
-+#include <asm/atomic.h>
++static inline int __vx_cres_avail(struct vx_info *vxi,
++ int res, int num, char *_file, int _line)
++{
++ struct _vx_limit *limit;
++ rlim_t value;
+
++ if (VXD_RLIMIT_COND(res))
++ vxlprintk(1, "vx_cres_avail[%5d,%s,%2d]: %5ld/%5ld > %5ld + %5d",
++ (vxi ? vxi->vx_id : -1), vlimit_name[res], res,
++ (vxi ? (long)__rlim_soft(&vxi->limit, res) : -1),
++ (vxi ? (long)__rlim_hard(&vxi->limit, res) : -1),
++ (vxi ? (long)__rlim_get(&vxi->limit, res) : 0),
++ num, _file, _line);
++ if (!vxi)
++ return 1;
+
-+struct _vx_usage_stat {
-+ uint64_t user;
-+ uint64_t nice;
-+ uint64_t system;
-+ uint64_t softirq;
-+ uint64_t irq;
-+ uint64_t idle;
-+ uint64_t iowait;
-+};
++ limit = &vxi->limit;
++ value = __rlim_get(limit, res);
+
-+struct _vx_syslog {
-+ wait_queue_head_t log_wait;
-+ spinlock_t logbuf_lock; /* lock for the log buffer */
++ if (!__vx_cres_adjust_max(limit, res, value))
++ __vx_cres_adjust_min(limit, res, value);
+
-+ unsigned long log_start; /* next char to be read by syslog() */
-+ unsigned long con_start; /* next char to be sent to consoles */
-+ unsigned long log_end; /* most-recently-written-char + 1 */
-+ unsigned long logged_chars; /* #chars since last read+clear operation */
++ if (num == 0)
++ return 1;
+
-+ char log_buf[1024];
-+};
++ if (__rlim_soft(limit, res) == RLIM_INFINITY)
++ return -1;
++ if (value + num <= __rlim_soft(limit, res))
++ return -1;
+
++ if (__rlim_hard(limit, res) == RLIM_INFINITY)
++ return 1;
++ if (value + num <= __rlim_hard(limit, res))
++ return 1;
+
-+/* context sub struct */
++ __rlim_hit(limit, res);
++ return 0;
++}
+
-+struct _vx_cvirt {
-+ atomic_t nr_threads; /* number of current threads */
-+ atomic_t nr_running; /* number of running threads */
-+ atomic_t nr_uninterruptible; /* number of uninterruptible threads */
+
-+ atomic_t nr_onhold; /* processes on hold */
-+ uint32_t onhold_last; /* jiffies when put on hold */
++static const int VLA_RSS[] = { RLIMIT_RSS, VLIMIT_ANON, VLIMIT_MAPPED, 0 };
+
-+ struct timeval bias_tv; /* time offset to the host */
-+ struct timespec bias_idle;
-+ struct timespec bias_uptime; /* context creation point */
-+ uint64_t bias_clock; /* offset in clock_t */
++static inline
++rlim_t __vx_cres_array_sum(struct _vx_limit *limit, const int *array)
++{
++ rlim_t value, sum = 0;
++ int res;
+
-+ spinlock_t load_lock; /* lock for the load averages */
-+ atomic_t load_updates; /* nr of load updates done so far */
-+ uint32_t load_last; /* last time load was calculated */
-+ uint32_t load[3]; /* load averages 1,5,15 */
++ while ((res = *array++)) {
++ value = __rlim_get(limit, res);
++ __vx_cres_fixup(limit, res, value);
++ sum += value;
++ }
++ return sum;
++}
+
-+ atomic_t total_forks; /* number of forks so far */
++static inline
++rlim_t __vx_cres_array_fixup(struct _vx_limit *limit, const int *array)
++{
++ rlim_t value = __vx_cres_array_sum(limit, array + 1);
++ int res = *array;
+
-+ struct _vx_syslog syslog;
-+};
++ if (value == __rlim_get(limit, res))
++ return value;
+
-+struct _vx_cvirt_pc {
-+ struct _vx_usage_stat cpustat;
-+};
++ __rlim_set(limit, res, value);
++ /* now adjust min/max */
++ if (!__vx_cres_adjust_max(limit, res, value))
++ __vx_cres_adjust_min(limit, res, value);
+
++ return value;
++}
+
-+#ifdef CONFIG_VSERVER_DEBUG
-+
-+static inline void __dump_vx_cvirt(struct _vx_cvirt *cvirt)
++static inline int __vx_cres_array_avail(struct vx_info *vxi,
++ const int *array, int num, char *_file, int _line)
+{
-+ printk("\t_vx_cvirt:\n");
-+ printk("\t threads: %4d, %4d, %4d, %4d\n",
-+ atomic_read(&cvirt->nr_threads),
-+ atomic_read(&cvirt->nr_running),
-+ atomic_read(&cvirt->nr_uninterruptible),
-+ atomic_read(&cvirt->nr_onhold));
-+ /* add rest here */
-+ printk("\t total_forks = %d\n", atomic_read(&cvirt->total_forks));
-+}
++ struct _vx_limit *limit;
++ rlim_t value = 0;
++ int res;
+
-+#endif
++ if (num == 0)
++ return 1;
++ if (!vxi)
++ return 1;
+
-+#endif /* _VX_CVIRT_DEF_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/debug.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/debug.h
---- linux-2.6.22.10/include/linux/vserver/debug.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/debug.h 2007-10-25 17:05:55 +0200
-@@ -0,0 +1,130 @@
-+#ifndef _VX_DEBUG_H
-+#define _VX_DEBUG_H
++ limit = &vxi->limit;
++ res = *array;
++ value = __vx_cres_array_sum(limit, array + 1);
+
++ __rlim_set(limit, res, value);
++ __vx_cres_fixup(limit, res, value);
+
-+#define VXD_CBIT(n, m) (vx_debug_ ## n & (1 << (m)))
-+#define VXD_CMIN(n, m) (vx_debug_ ## n > (m))
-+#define VXD_MASK(n, m) (vx_debug_ ## n & (m))
++ return __vx_cres_avail(vxi, res, num, _file, _line);
++}
+
-+#define VXD_DEV(d) (d), (d)->bd_inode->i_ino, \
-+ imajor((d)->bd_inode), iminor((d)->bd_inode)
-+#define VXF_DEV "%p[%lu,%d:%d]"
+
++static inline void vx_limit_fixup(struct _vx_limit *limit, int id)
++{
++ rlim_t value;
++ int res;
+
-+#define __FUNC__ __func__
++ /* complex resources first */
++ if ((id < 0) || (id == RLIMIT_RSS))
++ __vx_cres_array_fixup(limit, VLA_RSS);
+
++ for (res = 0; res < NUM_LIMITS; res++) {
++ if ((id > 0) && (res != id))
++ continue;
+
-+#define vxd_path(d, m) \
-+ ({ static char _buffer[PATH_MAX]; \
-+ d_path(d, m, _buffer, sizeof(_buffer)); })
++ value = __rlim_get(limit, res);
++ __vx_cres_fixup(limit, res, value);
+
-+#define vxd_cond_path(n) \
-+ ((n) ? vxd_path((n)->dentry, (n)->mnt) : "<null>" )
++ /* not supposed to happen, maybe warn? */
++ if (__rlim_rmax(limit, res) > __rlim_hard(limit, res))
++ __rlim_rmax(limit, res) = __rlim_hard(limit, res);
++ }
++}
+
+
-+#ifdef CONFIG_VSERVER_DEBUG
++#endif /* __KERNEL__ */
++#endif /* _VX_LIMIT_INT_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/monitor.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/monitor.h
+--- linux-2.6.22.18/include/linux/vserver/monitor.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/monitor.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,96 @@
++#ifndef _VX_MONITOR_H
++#define _VX_MONITOR_H
+
-+extern unsigned int vx_debug_switch;
-+extern unsigned int vx_debug_xid;
-+extern unsigned int vx_debug_nid;
-+extern unsigned int vx_debug_tag;
-+extern unsigned int vx_debug_net;
-+extern unsigned int vx_debug_limit;
-+extern unsigned int vx_debug_cres;
-+extern unsigned int vx_debug_dlim;
-+extern unsigned int vx_debug_quota;
-+extern unsigned int vx_debug_cvirt;
-+extern unsigned int vx_debug_space;
-+extern unsigned int vx_debug_misc;
++#include <linux/types.h>
+
++enum {
++ VXM_UNUSED = 0,
+
-+#define VX_LOGLEVEL "vxD: "
-+#define VX_PROC_FMT "%p: "
-+#define VX_PROCESS current
++ VXM_SYNC = 0x10,
+
-+#define vxdprintk(c, f, x...) \
-+ do { \
-+ if (c) \
-+ printk(VX_LOGLEVEL VX_PROC_FMT f "\n", \
-+ VX_PROCESS , ##x); \
-+ } while (0)
++ VXM_UPDATE = 0x20,
++ VXM_UPDATE_1,
++ VXM_UPDATE_2,
+
-+#define vxlprintk(c, f, x...) \
-+ do { \
-+ if (c) \
-+ printk(VX_LOGLEVEL f " @%s:%d\n", x); \
-+ } while (0)
++ VXM_RQINFO_1 = 0x24,
++ VXM_RQINFO_2,
+
-+#define vxfprintk(c, f, x...) \
-+ do { \
-+ if (c) \
-+ printk(VX_LOGLEVEL f " %s@%s:%d\n", x); \
-+ } while (0)
++ VXM_ACTIVATE = 0x40,
++ VXM_DEACTIVATE,
++ VXM_IDLE,
+
++ VXM_HOLD = 0x44,
++ VXM_UNHOLD,
+
-+struct vx_info;
++ VXM_MIGRATE = 0x48,
++ VXM_RESCHED,
+
-+void dump_vx_info(struct vx_info *, int);
-+void dump_vx_info_inactive(int);
++ /* all other bits are flags */
++ VXM_SCHED = 0x80,
++};
+
-+#else /* CONFIG_VSERVER_DEBUG */
++struct _vxm_update_1 {
++ uint32_t tokens_max;
++ uint32_t fill_rate;
++ uint32_t interval;
++};
+
-+#define vx_debug_switch 0
-+#define vx_debug_xid 0
-+#define vx_debug_nid 0
-+#define vx_debug_tag 0
-+#define vx_debug_net 0
-+#define vx_debug_limit 0
-+#define vx_debug_cres 0
-+#define vx_debug_dlim 0
-+#define vx_debug_cvirt 0
++struct _vxm_update_2 {
++ uint32_t tokens_min;
++ uint32_t fill_rate;
++ uint32_t interval;
++};
+
-+#define vxdprintk(x...) do { } while (0)
-+#define vxlprintk(x...) do { } while (0)
-+#define vxfprintk(x...) do { } while (0)
++struct _vxm_rqinfo_1 {
++ uint16_t running;
++ uint16_t onhold;
++ uint16_t iowait;
++ uint16_t uintr;
++ uint32_t idle_tokens;
++};
+
-+#endif /* CONFIG_VSERVER_DEBUG */
++struct _vxm_rqinfo_2 {
++ uint32_t norm_time;
++ uint32_t idle_time;
++ uint32_t idle_skip;
++};
+
++struct _vxm_sched {
++ uint32_t tokens;
++ uint32_t norm_time;
++ uint32_t idle_time;
++};
+
-+#ifdef CONFIG_VSERVER_WARN
++struct _vxm_task {
++ uint16_t pid;
++ uint16_t state;
++};
+
-+#define VX_WARNLEVEL KERN_WARNING "vxW: "
-+#define VX_WARN_TASK "[»%s«,%u:#%u|%u|%u] "
-+#define VX_WARN_XID "[xid #%u] "
-+#define VX_WARN_NID "[nid #%u] "
-+#define VX_WARN_TAG "[tag #%u] "
++struct _vxm_event {
++ uint32_t jif;
++ union {
++ uint32_t seq;
++ uint32_t sec;
++ };
++ union {
++ uint32_t tokens;
++ uint32_t nsec;
++ struct _vxm_task tsk;
++ };
++};
+
-+#define vxwprintk(c, f, x...) \
-+ do { \
-+ if (c) \
-+ printk(VX_WARNLEVEL f "\n", ##x); \
-+ } while (0)
++struct _vx_mon_entry {
++ uint16_t type;
++ uint16_t xid;
++ union {
++ struct _vxm_event ev;
++ struct _vxm_sched sd;
++ struct _vxm_update_1 u1;
++ struct _vxm_update_2 u2;
++ struct _vxm_rqinfo_1 q1;
++ struct _vxm_rqinfo_2 q2;
++ };
++};
+
-+#else /* CONFIG_VSERVER_WARN */
+
-+#define vxwprintk(x...) do { } while (0)
++#endif /* _VX_MONITOR_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/network_cmd.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/network_cmd.h
+--- linux-2.6.22.18/include/linux/vserver/network_cmd.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/network_cmd.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,150 @@
++#ifndef _VX_NETWORK_CMD_H
++#define _VX_NETWORK_CMD_H
+
-+#endif /* CONFIG_VSERVER_WARN */
+
-+#define vxwprintk_task(c, f, x...) \
-+ vxwprintk(c, VX_WARN_TASK f, \
-+ current->comm, current->pid, \
-+ current->xid, current->nid, current->tag, ##x)
-+#define vxwprintk_xid(c, f, x...) \
-+ vxwprintk(c, VX_WARN_XID f, current->xid, x)
-+#define vxwprintk_nid(c, f, x...) \
-+ vxwprintk(c, VX_WARN_NID f, current->nid, x)
-+#define vxwprintk_tag(c, f, x...) \
-+ vxwprintk(c, VX_WARN_TAG f, current->tag, x)
++/* vinfo commands */
+
-+#ifdef CONFIG_VSERVER_DEBUG
-+#define vxd_assert_lock(l) assert_spin_locked(l)
-+#define vxd_assert(c, f, x...) vxlprintk(!(c), \
-+ "assertion [" f "] failed.", ##x, __FILE__, __LINE__)
-+#else
-+#define vxd_assert_lock(l) do { } while (0)
-+#define vxd_assert(c, f, x...) do { } while (0)
-+#endif
++#define VCMD_task_nid VC_CMD(VINFO, 2, 0)
+
++#ifdef __KERNEL__
++extern int vc_task_nid(uint32_t);
+
-+#endif /* _VX_DEBUG_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/debug_cmd.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/debug_cmd.h
---- linux-2.6.22.10/include/linux/vserver/debug_cmd.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/debug_cmd.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,58 @@
-+#ifndef _VX_DEBUG_CMD_H
-+#define _VX_DEBUG_CMD_H
++#endif /* __KERNEL__ */
+
++#define VCMD_nx_info VC_CMD(VINFO, 6, 0)
+
-+/* debug commands */
++struct vcmd_nx_info_v0 {
++ uint32_t nid;
++ /* more to come */
++};
+
-+#define VCMD_dump_history VC_CMD(DEBUG, 1, 0)
++#ifdef __KERNEL__
++extern int vc_nx_info(struct nx_info *, void __user *);
+
-+#define VCMD_read_history VC_CMD(DEBUG, 5, 0)
-+#define VCMD_read_monitor VC_CMD(DEBUG, 6, 0)
++#endif /* __KERNEL__ */
+
-+struct vcmd_read_history_v0 {
-+ uint32_t index;
-+ uint32_t count;
-+ char __user *data;
-+};
++#include <linux/in.h>
++#include <linux/in6.h>
+
-+struct vcmd_read_monitor_v0 {
-+ uint32_t index;
-+ uint32_t count;
-+ char __user *data;
++#define VCMD_net_create_v0 VC_CMD(VNET, 1, 0)
++#define VCMD_net_create VC_CMD(VNET, 1, 1)
++
++struct vcmd_net_create {
++ uint64_t flagword;
+};
+
++#define VCMD_net_migrate VC_CMD(NETMIG, 1, 0)
+
-+#ifdef __KERNEL__
++#define VCMD_net_add VC_CMD(NETALT, 1, 0)
++#define VCMD_net_remove VC_CMD(NETALT, 2, 0)
+
-+#ifdef CONFIG_COMPAT
++struct vcmd_net_addr_v0 {
++ uint16_t type;
++ uint16_t count;
++ struct in_addr ip[4];
++ struct in_addr mask[4];
++};
+
-+#include <asm/compat.h>
++#define VCMD_net_add_ipv4 VC_CMD(NETALT, 1, 1)
++#define VCMD_net_remove_ipv4 VC_CMD(NETALT, 2, 1)
+
-+struct vcmd_read_history_v0_x32 {
-+ uint32_t index;
-+ uint32_t count;
-+ compat_uptr_t data_ptr;
++struct vcmd_net_addr_ipv4_v1 {
++ uint16_t type;
++ uint16_t flags;
++ struct in_addr ip;
++ struct in_addr mask;
+};
+
-+struct vcmd_read_monitor_v0_x32 {
-+ uint32_t index;
-+ uint32_t count;
-+ compat_uptr_t data_ptr;
-+};
++#define VCMD_net_add_ipv6 VC_CMD(NETALT, 3, 1)
++#define VCMD_net_remove_ipv6 VC_CMD(NETALT, 4, 1)
+
-+#endif /* CONFIG_COMPAT */
++struct vcmd_net_addr_ipv6_v1 {
++ uint16_t type;
++ uint16_t flags;
++ uint32_t prefix;
++ struct in6_addr ip;
++ struct in6_addr mask;
++};
+
-+extern int vc_dump_history(uint32_t);
++#define VCMD_add_match_ipv4 VC_CMD(NETALT, 5, 0)
++#define VCMD_get_match_ipv4 VC_CMD(NETALT, 6, 0)
+
-+extern int vc_read_history(uint32_t, void __user *);
-+extern int vc_read_monitor(uint32_t, void __user *);
++struct vcmd_match_ipv4_v0 {
++ uint16_t type;
++ uint16_t flags;
++ uint16_t parent;
++ uint16_t prefix;
++ struct in_addr ip;
++ struct in_addr ip2;
++ struct in_addr mask;
++};
+
-+#ifdef CONFIG_COMPAT
++#define VCMD_add_match_ipv6 VC_CMD(NETALT, 7, 0)
++#define VCMD_get_match_ipv6 VC_CMD(NETALT, 8, 0)
+
-+extern int vc_read_history_x32(uint32_t, void __user *);
-+extern int vc_read_monitor_x32(uint32_t, void __user *);
++struct vcmd_match_ipv6_v0 {
++ uint16_t type;
++ uint16_t flags;
++ uint16_t parent;
++ uint16_t prefix;
++ struct in6_addr ip;
++ struct in6_addr ip2;
++ struct in6_addr mask;
++};
+
-+#endif /* CONFIG_COMPAT */
+
-+#endif /* __KERNEL__ */
-+#endif /* _VX_DEBUG_CMD_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/device.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/device.h
---- linux-2.6.22.10/include/linux/vserver/device.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/device.h 2007-10-11 01:10:22 +0200
-@@ -0,0 +1,15 @@
-+#ifndef _VX_DEVICE_H
-+#define _VX_DEVICE_H
++#ifdef __KERNEL__
++extern int vc_net_create(uint32_t, void __user *);
++extern int vc_net_migrate(struct nx_info *, void __user *);
+
++extern int vc_net_add(struct nx_info *, void __user *);
++extern int vc_net_remove(struct nx_info *, void __user *);
+
-+#define DATTR_CREATE 0x00000001
-+#define DATTR_OPEN 0x00000002
++extern int vc_net_add_ipv4(struct nx_info *, void __user *);
++extern int vc_net_remove_ipv4(struct nx_info *, void __user *);
+
-+#define DATTR_REMAP 0x00000010
++extern int vc_net_add_ipv6(struct nx_info *, void __user *);
++extern int vc_net_remove_ipv6(struct nx_info *, void __user *);
+
-+#define DATTR_MASK 0x00000013
++extern int vc_add_match_ipv4(struct nx_info *, void __user *);
++extern int vc_get_match_ipv4(struct nx_info *, void __user *);
+
++extern int vc_add_match_ipv6(struct nx_info *, void __user *);
++extern int vc_get_match_ipv6(struct nx_info *, void __user *);
+
-+#else /* _VX_DEVICE_H */
-+#warning duplicate inclusion
-+#endif /* _VX_DEVICE_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/device_cmd.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/device_cmd.h
---- linux-2.6.22.10/include/linux/vserver/device_cmd.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/device_cmd.h 2007-10-11 01:10:22 +0200
-@@ -0,0 +1,44 @@
-+#ifndef _VX_DEVICE_CMD_H
-+#define _VX_DEVICE_CMD_H
++#endif /* __KERNEL__ */
+
+
-+/* device vserver commands */
++/* flag commands */
+
-+#define VCMD_set_mapping VC_CMD(DEVICE, 1, 0)
-+#define VCMD_unset_mapping VC_CMD(DEVICE, 2, 0)
++#define VCMD_get_nflags VC_CMD(FLAGS, 5, 0)
++#define VCMD_set_nflags VC_CMD(FLAGS, 6, 0)
+
-+struct vcmd_set_mapping_v0 {
-+ const char __user *device;
-+ const char __user *target;
-+ uint32_t flags;
++struct vcmd_net_flags_v0 {
++ uint64_t flagword;
++ uint64_t mask;
+};
+
-+
+#ifdef __KERNEL__
++extern int vc_get_nflags(struct nx_info *, void __user *);
++extern int vc_set_nflags(struct nx_info *, void __user *);
+
-+#ifdef CONFIG_COMPAT
-+
-+#include <asm/compat.h>
-+
-+struct vcmd_set_mapping_v0_x32 {
-+ compat_uptr_t device_ptr;
-+ compat_uptr_t target_ptr;
-+ uint32_t flags;
-+};
-+
-+#endif /* CONFIG_COMPAT */
++#endif /* __KERNEL__ */
+
-+#include <linux/compiler.h>
+
-+extern int vc_set_mapping(struct vx_info *, void __user *);
-+extern int vc_unset_mapping(struct vx_info *, void __user *);
++/* network caps commands */
+
-+#ifdef CONFIG_COMPAT
++#define VCMD_get_ncaps VC_CMD(FLAGS, 7, 0)
++#define VCMD_set_ncaps VC_CMD(FLAGS, 8, 0)
+
-+extern int vc_set_mapping_x32(struct vx_info *, void __user *);
-+extern int vc_unset_mapping_x32(struct vx_info *, void __user *);
++struct vcmd_net_caps_v0 {
++ uint64_t ncaps;
++ uint64_t cmask;
++};
+
-+#endif /* CONFIG_COMPAT */
++#ifdef __KERNEL__
++extern int vc_get_ncaps(struct nx_info *, void __user *);
++extern int vc_set_ncaps(struct nx_info *, void __user *);
+
+#endif /* __KERNEL__ */
-+#endif /* _VX_DEVICE_CMD_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/device_def.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/device_def.h
---- linux-2.6.22.10/include/linux/vserver/device_def.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/device_def.h 2007-10-11 01:10:22 +0200
-@@ -0,0 +1,17 @@
-+#ifndef _VX_DEVICE_DEF_H
-+#define _VX_DEVICE_DEF_H
++#endif /* _VX_CONTEXT_CMD_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/network.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/network.h
+--- linux-2.6.22.18/include/linux/vserver/network.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/network.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,143 @@
++#ifndef _VX_NETWORK_H
++#define _VX_NETWORK_H
+
+#include <linux/types.h>
+
-+struct vx_dmap_target {
-+ dev_t target;
-+ uint32_t flags;
-+};
+
-+struct _vx_device {
-+#ifdef CONFIG_VSERVER_DEVICE
-+ struct vx_dmap_target targets[2];
-+#endif
-+};
++#define MAX_N_CONTEXT 65535 /* Arbitrary limit */
+
-+#endif /* _VX_DEVICE_DEF_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/dlimit.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/dlimit.h
---- linux-2.6.22.10/include/linux/vserver/dlimit.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/dlimit.h 2007-08-15 22:03:58 +0200
-@@ -0,0 +1,54 @@
-+#ifndef _VX_DLIMIT_H
-+#define _VX_DLIMIT_H
+
-+#include "switch.h"
++/* network flags */
+
++#define NXF_INFO_PRIVATE 0x00000008
+
-+#ifdef __KERNEL__
++#define NXF_SINGLE_IP 0x00000100
++#define NXF_LBACK_REMAP 0x00000200
+
-+/* keep in sync with CDLIM_INFINITY */
++#define NXF_HIDE_NETIF 0x02000000
++#define NXF_HIDE_LBACK 0x04000000
+
-+#define DLIM_INFINITY (~0ULL)
++#define NXF_STATE_SETUP (1ULL << 32)
++#define NXF_STATE_ADMIN (1ULL << 34)
+
-+#include <linux/spinlock.h>
-+#include <linux/rcupdate.h>
++#define NXF_SC_HELPER (1ULL << 36)
++#define NXF_PERSISTENT (1ULL << 38)
+
-+struct super_block;
++#define NXF_ONE_TIME (0x0005ULL << 32)
+
-+struct dl_info {
-+ struct hlist_node dl_hlist; /* linked list of contexts */
-+ struct rcu_head dl_rcu; /* the rcu head */
-+ tag_t dl_tag; /* context tag */
-+ atomic_t dl_usecnt; /* usage count */
-+ atomic_t dl_refcnt; /* reference count */
+
-+ struct super_block *dl_sb; /* associated superblock */
++#define NXF_INIT_SET (__nxf_init_set())
+
-+ spinlock_t dl_lock; /* protect the values */
++static inline uint64_t __nxf_init_set(void) {
++ return NXF_STATE_ADMIN
++#ifdef CONFIG_VSERVER_AUTO_LBACK
++ | NXF_LBACK_REMAP
++ | NXF_HIDE_LBACK
++#endif
++#ifdef CONFIG_VSERVER_AUTO_SINGLE
++ | NXF_SINGLE_IP
++#endif
++ | NXF_HIDE_NETIF;
++}
+
-+ unsigned long long dl_space_used; /* used space in bytes */
-+ unsigned long long dl_space_total; /* maximum space in bytes */
-+ unsigned long dl_inodes_used; /* used inodes */
-+ unsigned long dl_inodes_total; /* maximum inodes */
+
-+ unsigned int dl_nrlmult; /* non root limit mult */
-+};
++/* network caps */
+
-+struct rcu_head;
++#define NXC_RAW_ICMP 0x00000100
+
-+extern void rcu_free_dl_info(struct rcu_head *);
-+extern void unhash_dl_info(struct dl_info *);
+
-+extern struct dl_info *locate_dl_info(struct super_block *, tag_t);
++/* address types */
+
++#define NXA_TYPE_IPV4 0x0001
++#define NXA_TYPE_IPV6 0x0002
+
-+struct kstatfs;
++#define NXA_TYPE_NONE 0x0000
++#define NXA_TYPE_ANY 0x00FF
+
-+extern void vx_vsi_statfs(struct super_block *, struct kstatfs *);
++#define NXA_TYPE_ADDR 0x0010
++#define NXA_TYPE_MASK 0x0020
++#define NXA_TYPE_RANGE 0x0040
+
-+typedef uint64_t dlsize_t;
++#define NXA_MASK_ALL (NXA_TYPE_ADDR | NXA_TYPE_MASK | NXA_TYPE_RANGE)
+
-+#endif /* __KERNEL__ */
-+#else /* _VX_DLIMIT_H */
-+#warning duplicate inclusion
-+#endif /* _VX_DLIMIT_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/dlimit_cmd.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/dlimit_cmd.h
---- linux-2.6.22.10/include/linux/vserver/dlimit_cmd.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/dlimit_cmd.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,74 @@
-+#ifndef _VX_DLIMIT_CMD_H
-+#define _VX_DLIMIT_CMD_H
++#define NXA_MOD_BCAST 0x0100
++#define NXA_MOD_LBACK 0x0200
+
++#define NXA_LOOPBACK 0x1000
+
-+/* dlimit vserver commands */
++#define NXA_MASK_BIND (NXA_MASK_ALL | NXA_MOD_BCAST | NXA_MOD_LBACK)
++#define NXA_MASK_SHOW (NXA_MASK_ALL | NXA_LOOPBACK)
+
-+#define VCMD_add_dlimit VC_CMD(DLIMIT, 1, 0)
-+#define VCMD_rem_dlimit VC_CMD(DLIMIT, 2, 0)
++#ifdef __KERNEL__
+
-+#define VCMD_set_dlimit VC_CMD(DLIMIT, 5, 0)
-+#define VCMD_get_dlimit VC_CMD(DLIMIT, 6, 0)
++#include <linux/list.h>
++#include <linux/spinlock.h>
++#include <linux/rcupdate.h>
++#include <linux/in.h>
++#include <linux/in6.h>
++#include <asm/atomic.h>
+
-+struct vcmd_ctx_dlimit_base_v0 {
-+ const char __user *name;
-+ uint32_t flags;
++struct nx_addr_v4 {
++ struct nx_addr_v4 *next;
++ struct in_addr ip[2];
++ struct in_addr mask;
++ uint16_t type;
++ uint16_t flags;
+};
+
-+struct vcmd_ctx_dlimit_v0 {
-+ const char __user *name;
-+ uint32_t space_used; /* used space in kbytes */
-+ uint32_t space_total; /* maximum space in kbytes */
-+ uint32_t inodes_used; /* used inodes */
-+ uint32_t inodes_total; /* maximum inodes */
-+ uint32_t reserved; /* reserved for root in % */
-+ uint32_t flags;
++struct nx_addr_v6 {
++ struct nx_addr_v6 *next;
++ struct in6_addr ip;
++ struct in6_addr mask;
++ uint32_t prefix;
++ uint16_t type;
++ uint16_t flags;
+};
+
-+#define CDLIM_UNSET ((uint32_t)0UL)
-+#define CDLIM_INFINITY ((uint32_t)~0UL)
-+#define CDLIM_KEEP ((uint32_t)~1UL)
-+
-+#ifdef __KERNEL__
-+
-+#ifdef CONFIG_COMPAT
++struct nx_info {
++ struct hlist_node nx_hlist; /* linked list of nxinfos */
++ nid_t nx_id; /* vnet id */
++ atomic_t nx_usecnt; /* usage count */
++ atomic_t nx_tasks; /* tasks count */
++ int nx_state; /* context state */
+
-+#include <asm/compat.h>
++ uint64_t nx_flags; /* network flag word */
++ uint64_t nx_ncaps; /* network capabilities */
+
-+struct vcmd_ctx_dlimit_base_v0_x32 {
-+ compat_uptr_t name_ptr;
-+ uint32_t flags;
++ struct in_addr v4_lback; /* Loopback address */
++ struct in_addr v4_bcast; /* Broadcast address */
++ struct nx_addr_v4 v4; /* First/Single ipv4 address */
++#ifdef CONFIG_IPV6
++ struct nx_addr_v6 v6; /* First/Single ipv6 address */
++#endif
++ char nx_name[65]; /* network context name */
+};
+
-+struct vcmd_ctx_dlimit_v0_x32 {
-+ compat_uptr_t name_ptr;
-+ uint32_t space_used; /* used space in kbytes */
-+ uint32_t space_total; /* maximum space in kbytes */
-+ uint32_t inodes_used; /* used inodes */
-+ uint32_t inodes_total; /* maximum inodes */
-+ uint32_t reserved; /* reserved for root in % */
-+ uint32_t flags;
-+};
+
-+#endif /* CONFIG_COMPAT */
++/* status flags */
+
-+#include <linux/compiler.h>
++#define NXS_HASHED 0x0001
++#define NXS_SHUTDOWN 0x0100
++#define NXS_RELEASED 0x8000
+
-+extern int vc_add_dlimit(uint32_t, void __user *);
-+extern int vc_rem_dlimit(uint32_t, void __user *);
++extern struct nx_info *lookup_nx_info(int);
+
-+extern int vc_set_dlimit(uint32_t, void __user *);
-+extern int vc_get_dlimit(uint32_t, void __user *);
++extern int get_nid_list(int, unsigned int *, int);
++extern int nid_is_hashed(nid_t);
+
-+#ifdef CONFIG_COMPAT
++extern int nx_migrate_task(struct task_struct *, struct nx_info *);
+
-+extern int vc_add_dlimit_x32(uint32_t, void __user *);
-+extern int vc_rem_dlimit_x32(uint32_t, void __user *);
++extern long vs_net_change(struct nx_info *, unsigned int);
+
-+extern int vc_set_dlimit_x32(uint32_t, void __user *);
-+extern int vc_get_dlimit_x32(uint32_t, void __user *);
++struct sock;
+
-+#endif /* CONFIG_COMPAT */
+
-+#endif /* __KERNEL__ */
-+#endif /* _VX_DLIMIT_CMD_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/global.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/global.h
---- linux-2.6.22.10/include/linux/vserver/global.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/global.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,18 @@
-+#ifndef _VX_GLOBAL_H
-+#define _VX_GLOBAL_H
++#define NX_IPV4(n) ((n)->v4.type != NXA_TYPE_NONE)
++#ifdef CONFIG_IPV6
++#define NX_IPV6(n) ((n)->v6.type != NXA_TYPE_NONE)
++#else
++#define NX_IPV6(n) (0)
++#endif
+
++#endif /* __KERNEL__ */
++#endif /* _VX_NETWORK_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/percpu.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/percpu.h
+--- linux-2.6.22.18/include/linux/vserver/percpu.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/percpu.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,14 @@
++#ifndef _VX_PERCPU_H
++#define _VX_PERCPU_H
+
-+extern atomic_t vx_global_ctotal;
-+extern atomic_t vx_global_cactive;
++#include "cvirt_def.h"
++#include "sched_def.h"
+
-+extern atomic_t nx_global_ctotal;
-+extern atomic_t nx_global_cactive;
++struct _vx_percpu {
++ struct _vx_cvirt_pc cvirt;
++ struct _vx_sched_pc sched;
++};
+
-+extern atomic_t vs_global_nsproxy;
-+extern atomic_t vs_global_fs;
-+extern atomic_t vs_global_mnt_ns;
-+extern atomic_t vs_global_uts_ns;
-+extern atomic_t vs_global_ipc_ns;
++#define PERCPU_PERCTX (sizeof(struct _vx_percpu))
+
++#endif /* _VX_PERCPU_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/sched_cmd.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/sched_cmd.h
+--- linux-2.6.22.18/include/linux/vserver/sched_cmd.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/sched_cmd.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,108 @@
++#ifndef _VX_SCHED_CMD_H
++#define _VX_SCHED_CMD_H
+
-+#endif /* _VX_GLOBAL_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/history.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/history.h
---- linux-2.6.22.10/include/linux/vserver/history.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/history.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,197 @@
-+#ifndef _VX_HISTORY_H
-+#define _VX_HISTORY_H
+
++/* sched vserver commands */
+
-+enum {
-+ VXH_UNUSED = 0,
-+ VXH_THROW_OOPS = 1,
++#define VCMD_set_sched_v2 VC_CMD(SCHED, 1, 2)
++#define VCMD_set_sched_v3 VC_CMD(SCHED, 1, 3)
++#define VCMD_set_sched_v4 VC_CMD(SCHED, 1, 4)
+
-+ VXH_GET_VX_INFO,
-+ VXH_PUT_VX_INFO,
-+ VXH_INIT_VX_INFO,
-+ VXH_SET_VX_INFO,
-+ VXH_CLR_VX_INFO,
-+ VXH_CLAIM_VX_INFO,
-+ VXH_RELEASE_VX_INFO,
-+ VXH_ALLOC_VX_INFO,
-+ VXH_DEALLOC_VX_INFO,
-+ VXH_HASH_VX_INFO,
-+ VXH_UNHASH_VX_INFO,
-+ VXH_LOC_VX_INFO,
-+ VXH_LOOKUP_VX_INFO,
-+ VXH_CREATE_VX_INFO,
++struct vcmd_set_sched_v2 {
++ int32_t fill_rate;
++ int32_t interval;
++ int32_t tokens;
++ int32_t tokens_min;
++ int32_t tokens_max;
++ uint64_t cpu_mask;
+};
+
-+struct _vxhe_vxi {
-+ struct vx_info *ptr;
-+ unsigned xid;
-+ unsigned usecnt;
-+ unsigned tasks;
++struct vcmd_set_sched_v3 {
++ uint32_t set_mask;
++ int32_t fill_rate;
++ int32_t interval;
++ int32_t tokens;
++ int32_t tokens_min;
++ int32_t tokens_max;
++ int32_t priority_bias;
+};
+
-+struct _vxhe_set_clr {
-+ void *data;
++struct vcmd_set_sched_v4 {
++ uint32_t set_mask;
++ int32_t fill_rate;
++ int32_t interval;
++ int32_t tokens;
++ int32_t tokens_min;
++ int32_t tokens_max;
++ int32_t prio_bias;
++ int32_t cpu_id;
++ int32_t bucket_id;
+};
+
-+struct _vxhe_loc_lookup {
-+ unsigned arg;
-+};
++#define VCMD_set_sched VC_CMD(SCHED, 1, 5)
++#define VCMD_get_sched VC_CMD(SCHED, 2, 5)
+
-+struct _vx_hist_entry {
-+ void *loc;
-+ unsigned short seq;
-+ unsigned short type;
-+ struct _vxhe_vxi vxi;
-+ union {
-+ struct _vxhe_set_clr sc;
-+ struct _vxhe_loc_lookup ll;
-+ };
++struct vcmd_sched_v5 {
++ uint32_t mask;
++ int32_t cpu_id;
++ int32_t bucket_id;
++ int32_t fill_rate[2];
++ int32_t interval[2];
++ int32_t tokens;
++ int32_t tokens_min;
++ int32_t tokens_max;
++ int32_t prio_bias;
+};
+
-+#ifdef CONFIG_VSERVER_HISTORY
-+
-+extern unsigned volatile int vxh_active;
-+
-+struct _vx_hist_entry *vxh_advance(void *loc);
++#define VXSM_FILL_RATE 0x0001
++#define VXSM_INTERVAL 0x0002
++#define VXSM_FILL_RATE2 0x0004
++#define VXSM_INTERVAL2 0x0008
++#define VXSM_TOKENS 0x0010
++#define VXSM_TOKENS_MIN 0x0020
++#define VXSM_TOKENS_MAX 0x0040
++#define VXSM_PRIO_BIAS 0x0100
+
++#define VXSM_IDLE_TIME 0x0200
++#define VXSM_FORCE 0x0400
+
-+static inline
-+void __vxh_copy_vxi(struct _vx_hist_entry *entry, struct vx_info *vxi)
-+{
-+ entry->vxi.ptr = vxi;
-+ if (vxi) {
-+ entry->vxi.usecnt = atomic_read(&vxi->vx_usecnt);
-+ entry->vxi.tasks = atomic_read(&vxi->vx_tasks);
-+ entry->vxi.xid = vxi->vx_id;
-+ }
-+}
++#define VXSM_V3_MASK 0x0173
++#define VXSM_SET_MASK 0x01FF
+
++#define VXSM_CPU_ID 0x1000
++#define VXSM_BUCKET_ID 0x2000
+
-+#define __HERE__ current_text_addr()
++#define VXSM_MSEC 0x4000
+
-+#define __VXH_BODY(__type, __data, __here) \
-+ struct _vx_hist_entry *entry; \
-+ \
-+ preempt_disable(); \
-+ entry = vxh_advance(__here); \
-+ __data; \
-+ entry->type = __type; \
-+ preempt_enable();
++#define SCHED_KEEP (-2) /* only for v2 */
+
++#ifdef __KERNEL__
+
-+ /* pass vxi only */
++#include <linux/compiler.h>
+
-+#define __VXH_SMPL \
-+ __vxh_copy_vxi(entry, vxi)
++extern int vc_set_sched_v2(struct vx_info *, void __user *);
++extern int vc_set_sched_v3(struct vx_info *, void __user *);
++extern int vc_set_sched_v4(struct vx_info *, void __user *);
++extern int vc_set_sched(struct vx_info *, void __user *);
++extern int vc_get_sched(struct vx_info *, void __user *);
+
-+static inline
-+void __vxh_smpl(struct vx_info *vxi, int __type, void *__here)
-+{
-+ __VXH_BODY(__type, __VXH_SMPL, __here)
-+}
++#endif /* __KERNEL__ */
+
-+ /* pass vxi and data (void *) */
++#define VCMD_sched_info VC_CMD(SCHED, 3, 0)
+
-+#define __VXH_DATA \
-+ __vxh_copy_vxi(entry, vxi); \
-+ entry->sc.data = data
-+
-+static inline
-+void __vxh_data(struct vx_info *vxi, void *data,
-+ int __type, void *__here)
-+{
-+ __VXH_BODY(__type, __VXH_DATA, __here)
-+}
-+
-+ /* pass vxi and arg (long) */
-+
-+#define __VXH_LONG \
-+ __vxh_copy_vxi(entry, vxi); \
-+ entry->ll.arg = arg
-+
-+static inline
-+void __vxh_long(struct vx_info *vxi, long arg,
-+ int __type, void *__here)
-+{
-+ __VXH_BODY(__type, __VXH_LONG, __here)
-+}
-+
-+
-+static inline
-+void __vxh_throw_oops(void *__here)
-+{
-+ __VXH_BODY(VXH_THROW_OOPS, {}, __here);
-+ /* prevent further acquisition */
-+ vxh_active = 0;
-+}
++struct vcmd_sched_info {
++ int32_t cpu_id;
++ int32_t bucket_id;
++ uint64_t user_msec;
++ uint64_t sys_msec;
++ uint64_t hold_msec;
++ uint32_t token_usec;
++ int32_t vavavoom;
++};
+
++#ifdef __KERNEL__
+
-+#define vxh_throw_oops() __vxh_throw_oops(__HERE__);
++extern int vc_sched_info(struct vx_info *, void __user *);
+
-+#define __vxh_get_vx_info(v, h) __vxh_smpl(v, VXH_GET_VX_INFO, h);
-+#define __vxh_put_vx_info(v, h) __vxh_smpl(v, VXH_PUT_VX_INFO, h);
++#endif /* __KERNEL__ */
++#endif /* _VX_SCHED_CMD_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/sched_def.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/sched_def.h
+--- linux-2.6.22.18/include/linux/vserver/sched_def.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/sched_def.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,68 @@
++#ifndef _VX_SCHED_DEF_H
++#define _VX_SCHED_DEF_H
+
-+#define __vxh_init_vx_info(v, d, h) \
-+ __vxh_data(v, d, VXH_INIT_VX_INFO, h);
-+#define __vxh_set_vx_info(v, d, h) \
-+ __vxh_data(v, d, VXH_SET_VX_INFO, h);
-+#define __vxh_clr_vx_info(v, d, h) \
-+ __vxh_data(v, d, VXH_CLR_VX_INFO, h);
++#include <linux/spinlock.h>
++#include <linux/jiffies.h>
++#include <linux/cpumask.h>
++#include <asm/atomic.h>
++#include <asm/param.h>
+
-+#define __vxh_claim_vx_info(v, d, h) \
-+ __vxh_data(v, d, VXH_CLAIM_VX_INFO, h);
-+#define __vxh_release_vx_info(v, d, h) \
-+ __vxh_data(v, d, VXH_RELEASE_VX_INFO, h);
+
-+#define vxh_alloc_vx_info(v) \
-+ __vxh_smpl(v, VXH_ALLOC_VX_INFO, __HERE__);
-+#define vxh_dealloc_vx_info(v) \
-+ __vxh_smpl(v, VXH_DEALLOC_VX_INFO, __HERE__);
++/* context sub struct */
+
-+#define vxh_hash_vx_info(v) \
-+ __vxh_smpl(v, VXH_HASH_VX_INFO, __HERE__);
-+#define vxh_unhash_vx_info(v) \
-+ __vxh_smpl(v, VXH_UNHASH_VX_INFO, __HERE__);
++struct _vx_sched {
++ spinlock_t tokens_lock; /* lock for token bucket */
+
-+#define vxh_loc_vx_info(v, l) \
-+ __vxh_long(v, l, VXH_LOC_VX_INFO, __HERE__);
-+#define vxh_lookup_vx_info(v, l) \
-+ __vxh_long(v, l, VXH_LOOKUP_VX_INFO, __HERE__);
-+#define vxh_create_vx_info(v, l) \
-+ __vxh_long(v, l, VXH_CREATE_VX_INFO, __HERE__);
++ int tokens; /* number of CPU tokens */
++ int fill_rate[2]; /* Fill rate: add X tokens... */
++ int interval[2]; /* Divisor: per Y jiffies */
++ int tokens_min; /* Limit: minimum for unhold */
++ int tokens_max; /* Limit: no more than N tokens */
+
-+extern void vxh_dump_history(void);
++ int prio_bias; /* bias offset for priority */
+
++ unsigned update_mask; /* which features should be updated */
++ cpumask_t update; /* CPUs which should update */
++};
+
-+#else /* CONFIG_VSERVER_HISTORY */
++struct _vx_sched_pc {
++ int tokens; /* number of CPU tokens */
++ int flags; /* bucket flags */
+
-+#define __HERE__ 0
++ int fill_rate[2]; /* Fill rate: add X tokens... */
++ int interval[2]; /* Divisor: per Y jiffies */
++ int tokens_min; /* Limit: minimum for unhold */
++ int tokens_max; /* Limit: no more than N tokens */
+
-+#define vxh_throw_oops() do { } while (0)
++ int prio_bias; /* bias offset for priority */
++ int vavavoom; /* last calculated vavavoom */
+
-+#define __vxh_get_vx_info(v, h) do { } while (0)
-+#define __vxh_put_vx_info(v, h) do { } while (0)
++ unsigned long norm_time; /* last time accounted */
++ unsigned long idle_time; /* non linear time for fair sched */
++ unsigned long token_time; /* token time for accounting */
++ unsigned long onhold; /* jiffies when put on hold */
+
-+#define __vxh_init_vx_info(v, d, h) do { } while (0)
-+#define __vxh_set_vx_info(v, d, h) do { } while (0)
-+#define __vxh_clr_vx_info(v, d, h) do { } while (0)
++ uint64_t user_ticks; /* token tick events */
++ uint64_t sys_ticks; /* token tick events */
++ uint64_t hold_ticks; /* token ticks paused */
++};
+
-+#define __vxh_claim_vx_info(v, d, h) do { } while (0)
-+#define __vxh_release_vx_info(v, d, h) do { } while (0)
+
-+#define vxh_alloc_vx_info(v) do { } while (0)
-+#define vxh_dealloc_vx_info(v) do { } while (0)
++#define VXSF_ONHOLD 0x0001
++#define VXSF_IDLE_TIME 0x0100
+
-+#define vxh_hash_vx_info(v) do { } while (0)
-+#define vxh_unhash_vx_info(v) do { } while (0)
++#ifdef CONFIG_VSERVER_DEBUG
+
-+#define vxh_loc_vx_info(v, l) do { } while (0)
-+#define vxh_lookup_vx_info(v, l) do { } while (0)
-+#define vxh_create_vx_info(v, l) do { } while (0)
++static inline void __dump_vx_sched(struct _vx_sched *sched)
++{
++ printk("\t_vx_sched:\n");
++ printk("\t tokens: %4d/%4d, %4d/%4d, %4d, %4d\n",
++ sched->fill_rate[0], sched->interval[0],
++ sched->fill_rate[1], sched->interval[1],
++ sched->tokens_min, sched->tokens_max);
++ printk("\t priority = %4d\n", sched->prio_bias);
++}
+
-+#define vxh_dump_history() do { } while (0)
++#endif
+
++#endif /* _VX_SCHED_DEF_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/sched.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/sched.h
+--- linux-2.6.22.18/include/linux/vserver/sched.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/sched.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,26 @@
++#ifndef _VX_SCHED_H
++#define _VX_SCHED_H
+
-+#endif /* CONFIG_VSERVER_HISTORY */
+
-+#endif /* _VX_HISTORY_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/inode.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/inode.h
---- linux-2.6.22.10/include/linux/vserver/inode.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/inode.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,38 @@
-+#ifndef _VX_INODE_H
-+#define _VX_INODE_H
++#ifdef __KERNEL__
+
++struct timespec;
+
-+#define IATTR_TAG 0x01000000
++void vx_vsi_uptime(struct timespec *, struct timespec *);
+
-+#define IATTR_ADMIN 0x00000001
-+#define IATTR_WATCH 0x00000002
-+#define IATTR_HIDE 0x00000004
-+#define IATTR_FLAGS 0x00000007
+
-+#define IATTR_BARRIER 0x00010000
-+#define IATTR_IUNLINK 0x00020000
-+#define IATTR_IMMUTABLE 0x00040000
++struct vx_info;
+
-+#ifdef __KERNEL__
++void vx_update_load(struct vx_info *);
+
+
-+#ifdef CONFIG_VSERVER_PROC_SECURE
-+#define IATTR_PROC_DEFAULT ( IATTR_ADMIN | IATTR_HIDE )
-+#define IATTR_PROC_SYMLINK ( IATTR_ADMIN )
-+#else
-+#define IATTR_PROC_DEFAULT ( IATTR_ADMIN )
-+#define IATTR_PROC_SYMLINK ( IATTR_ADMIN )
-+#endif
++int vx_tokens_recalc(struct _vx_sched_pc *,
++ unsigned long *, unsigned long *, int [2]);
+
-+#define vx_hide_check(c, m) (((m) & IATTR_HIDE) ? vx_check(c, m) : 1)
++void vx_update_sched_param(struct _vx_sched *sched,
++ struct _vx_sched_pc *sched_pc);
+
+#endif /* __KERNEL__ */
-+
-+/* inode ioctls */
-+
-+#define FIOC_GETXFLG _IOR('x', 5, long)
-+#define FIOC_SETXFLG _IOW('x', 6, long)
-+
-+#else /* _VX_INODE_H */
++#else /* _VX_SCHED_H */
+#warning duplicate inclusion
-+#endif /* _VX_INODE_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/inode_cmd.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/inode_cmd.h
---- linux-2.6.22.10/include/linux/vserver/inode_cmd.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/inode_cmd.h 2007-08-15 18:08:31 +0200
-@@ -0,0 +1,59 @@
-+#ifndef _VX_INODE_CMD_H
-+#define _VX_INODE_CMD_H
-+
++#endif /* _VX_SCHED_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/signal_cmd.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/signal_cmd.h
+--- linux-2.6.22.18/include/linux/vserver/signal_cmd.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/signal_cmd.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,43 @@
++#ifndef _VX_SIGNAL_CMD_H
++#define _VX_SIGNAL_CMD_H
+
-+/* inode vserver commands */
+
-+#define VCMD_get_iattr VC_CMD(INODE, 1, 1)
-+#define VCMD_set_iattr VC_CMD(INODE, 2, 1)
++/* signalling vserver commands */
+
-+#define VCMD_fget_iattr VC_CMD(INODE, 3, 0)
-+#define VCMD_fset_iattr VC_CMD(INODE, 4, 0)
++#define VCMD_ctx_kill VC_CMD(PROCTRL, 1, 0)
++#define VCMD_wait_exit VC_CMD(EVENT, 99, 0)
+
-+struct vcmd_ctx_iattr_v1 {
-+ const char __user *name;
-+ uint32_t tag;
-+ uint32_t flags;
-+ uint32_t mask;
++struct vcmd_ctx_kill_v0 {
++ int32_t pid;
++ int32_t sig;
+};
+
-+struct vcmd_ctx_fiattr_v0 {
-+ uint32_t tag;
-+ uint32_t flags;
-+ uint32_t mask;
++struct vcmd_wait_exit_v0 {
++ int32_t reboot_cmd;
++ int32_t exit_code;
+};
+
-+
+#ifdef __KERNEL__
+
++extern int vc_ctx_kill(struct vx_info *, void __user *);
++extern int vc_wait_exit(struct vx_info *, void __user *);
+
-+#ifdef CONFIG_COMPAT
++#endif /* __KERNEL__ */
+
-+#include <asm/compat.h>
++/* process alteration commands */
+
-+struct vcmd_ctx_iattr_v1_x32 {
-+ compat_uptr_t name_ptr;
-+ uint32_t tag;
-+ uint32_t flags;
++#define VCMD_get_pflags VC_CMD(PROCALT, 5, 0)
++#define VCMD_set_pflags VC_CMD(PROCALT, 6, 0)
++
++struct vcmd_pflags_v0 {
++ uint32_t flagword;
+ uint32_t mask;
+};
+
-+#endif /* CONFIG_COMPAT */
++#ifdef __KERNEL__
+
-+#include <linux/compiler.h>
++extern int vc_get_pflags(uint32_t pid, void __user *);
++extern int vc_set_pflags(uint32_t pid, void __user *);
+
-+extern int vc_get_iattr(void __user *);
-+extern int vc_set_iattr(void __user *);
++#endif /* __KERNEL__ */
++#endif /* _VX_SIGNAL_CMD_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/signal.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/signal.h
+--- linux-2.6.22.18/include/linux/vserver/signal.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/signal.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,14 @@
++#ifndef _VX_SIGNAL_H
++#define _VX_SIGNAL_H
+
-+extern int vc_fget_iattr(uint32_t, void __user *);
-+extern int vc_fset_iattr(uint32_t, void __user *);
+
-+#ifdef CONFIG_COMPAT
++#ifdef __KERNEL__
+
-+extern int vc_get_iattr_x32(void __user *);
-+extern int vc_set_iattr_x32(void __user *);
++struct vx_info;
+
-+#endif /* CONFIG_COMPAT */
++int vx_info_kill(struct vx_info *, int, int);
+
+#endif /* __KERNEL__ */
-+#endif /* _VX_INODE_CMD_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/limit.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/limit.h
---- linux-2.6.22.10/include/linux/vserver/limit.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/limit.h 2007-08-15 22:27:29 +0200
-@@ -0,0 +1,70 @@
-+#ifndef _VX_LIMIT_H
-+#define _VX_LIMIT_H
++#else /* _VX_SIGNAL_H */
++#warning duplicate inclusion
++#endif /* _VX_SIGNAL_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/space_cmd.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/space_cmd.h
+--- linux-2.6.22.18/include/linux/vserver/space_cmd.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/space_cmd.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,26 @@
++#ifndef _VX_SPACE_CMD_H
++#define _VX_SPACE_CMD_H
+
-+#define VLIMIT_NSOCK 16
-+#define VLIMIT_OPENFD 17
-+#define VLIMIT_ANON 18
-+#define VLIMIT_SHMEM 19
-+#define VLIMIT_SEMARY 20
-+#define VLIMIT_NSEMS 21
-+#define VLIMIT_DENTRY 22
-+#define VLIMIT_MAPPED 23
+
++#define VCMD_enter_space_v0 VC_CMD(PROCALT, 1, 0)
++#define VCMD_enter_space VC_CMD(PROCALT, 1, 1)
+
-+#ifdef __KERNEL__
++#define VCMD_set_space_v0 VC_CMD(PROCALT, 3, 0)
++#define VCMD_set_space VC_CMD(PROCALT, 3, 1)
+
-+#define VLIM_NOCHECK ((1L << VLIMIT_DENTRY) | (1L << RLIMIT_RSS))
++#define VCMD_get_space_mask VC_CMD(PROCALT, 4, 0)
+
-+/* keep in sync with CRLIM_INFINITY */
+
-+#define VLIM_INFINITY (~0ULL)
++struct vcmd_space_mask {
++ uint64_t mask;
++};
+
-+#include <asm/atomic.h>
-+#include <asm/resource.h>
+
-+#ifndef RLIM_INFINITY
-+#warning RLIM_INFINITY is undefined
-+#endif
++#ifdef __KERNEL__
+
-+#define __rlim_val(l, r, v) ((l)->res[r].v)
++extern int vc_enter_space(struct vx_info *, void __user *);
++extern int vc_set_space(struct vx_info *, void __user *);
++extern int vc_get_space_mask(struct vx_info *, void __user *);
+
-+#define __rlim_soft(l, r) __rlim_val(l, r, soft)
-+#define __rlim_hard(l, r) __rlim_val(l, r, hard)
++#endif /* __KERNEL__ */
++#endif /* _VX_SPACE_CMD_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/space.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/space.h
+--- linux-2.6.22.18/include/linux/vserver/space.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/space.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,13 @@
++#ifndef _VX_SPACE_H
++#define _VX_SPACE_H
+
-+#define __rlim_rcur(l, r) __rlim_val(l, r, rcur)
-+#define __rlim_rmin(l, r) __rlim_val(l, r, rmin)
-+#define __rlim_rmax(l, r) __rlim_val(l, r, rmax)
+
-+#define __rlim_lhit(l, r) __rlim_val(l, r, lhit)
-+#define __rlim_hit(l, r) atomic_inc(&__rlim_lhit(l, r))
++#include <linux/types.h>
+
-+typedef atomic_long_t rlim_atomic_t;
-+typedef unsigned long rlim_t;
++struct vx_info;
+
-+#define __rlim_get(l, r) atomic_long_read(&__rlim_rcur(l, r))
-+#define __rlim_set(l, r, v) atomic_long_set(&__rlim_rcur(l, r), v)
-+#define __rlim_inc(l, r) atomic_long_inc(&__rlim_rcur(l, r))
-+#define __rlim_dec(l, r) atomic_long_dec(&__rlim_rcur(l, r))
-+#define __rlim_add(l, r, v) atomic_long_add(v, &__rlim_rcur(l, r))
-+#define __rlim_sub(l, r, v) atomic_long_sub(v, &__rlim_rcur(l, r))
++int vx_set_space(struct vx_info *vxi, unsigned long mask);
+
++#else /* _VX_SPACE_H */
++#warning duplicate inclusion
++#endif /* _VX_SPACE_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/switch.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/switch.h
+--- linux-2.6.22.18/include/linux/vserver/switch.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/switch.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,99 @@
++#ifndef _VX_SWITCH_H
++#define _VX_SWITCH_H
+
-+#if (RLIM_INFINITY == VLIM_INFINITY)
-+#define VX_VLIM(r) ((long long)(long)(r))
-+#define VX_RLIM(v) ((rlim_t)(v))
-+#else
-+#define VX_VLIM(r) (((r) == RLIM_INFINITY) \
-+ ? VLIM_INFINITY : (long long)(r))
-+#define VX_RLIM(v) (((v) == VLIM_INFINITY) \
-+ ? RLIM_INFINITY : (rlim_t)(v))
-+#endif
++#include <linux/types.h>
+
-+struct sysinfo;
+
-+void vx_vsi_meminfo(struct sysinfo *);
-+void vx_vsi_swapinfo(struct sysinfo *);
++#define VC_CATEGORY(c) (((c) >> 24) & 0x3F)
++#define VC_COMMAND(c) (((c) >> 16) & 0xFF)
++#define VC_VERSION(c) ((c) & 0xFFF)
+
-+#define NUM_LIMITS 24
++#define VC_CMD(c, i, v) ((((VC_CAT_ ## c) & 0x3F) << 24) \
++ | (((i) & 0xFF) << 16) | ((v) & 0xFFF))
+
-+#endif /* __KERNEL__ */
-+#endif /* _VX_LIMIT_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/limit_cmd.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/limit_cmd.h
---- linux-2.6.22.10/include/linux/vserver/limit_cmd.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/limit_cmd.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,69 @@
-+#ifndef _VX_LIMIT_CMD_H
-+#define _VX_LIMIT_CMD_H
++/*
+
++ Syscall Matrix V2.8
+
-+/* rlimit vserver commands */
++ |VERSION|CREATE |MODIFY |MIGRATE|CONTROL|EXPERIM| |SPECIAL|SPECIAL|
++ |STATS |DESTROY|ALTER |CHANGE |LIMIT |TEST | | | |
++ |INFO |SETUP | |MOVE | | | | | |
++ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
++ SYSTEM |VERSION|VSETUP |VHOST | | | | |DEVICE | |
++ HOST | 00| 01| 02| 03| 04| 05| | 06| 07|
++ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
++ CPU | |VPROC |PROCALT|PROCMIG|PROCTRL| | |SCHED. | |
++ PROCESS| 08| 09| 10| 11| 12| 13| | 14| 15|
++ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
++ MEMORY | | | | |MEMCTRL| | |SWAP | |
++ | 16| 17| 18| 19| 20| 21| | 22| 23|
++ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
++ NETWORK| |VNET |NETALT |NETMIG |NETCTL | | |SERIAL | |
++ | 24| 25| 26| 27| 28| 29| | 30| 31|
++ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
++ DISK | | | |TAGMIG |DLIMIT | | |INODE | |
++ VFS | 32| 33| 34| 35| 36| 37| | 38| 39|
++ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
++ OTHER |VSTAT | | | | | | |VINFO | |
++ | 40| 41| 42| 43| 44| 45| | 46| 47|
++ =======+=======+=======+=======+=======+=======+=======+ +=======+=======+
++ SPECIAL|EVENT | | | |FLAGS | | | | |
++ | 48| 49| 50| 51| 52| 53| | 54| 55|
++ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
++ SPECIAL|DEBUG | | | |RLIMIT |SYSCALL| | |COMPAT |
++ | 56| 57| 58| 59| 60|TEST 61| | 62| 63|
++ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
+
-+#define VCMD_get_rlimit VC_CMD(RLIMIT, 1, 0)
-+#define VCMD_set_rlimit VC_CMD(RLIMIT, 2, 0)
-+#define VCMD_get_rlimit_mask VC_CMD(RLIMIT, 3, 0)
-+#define VCMD_reset_minmax VC_CMD(RLIMIT, 9, 0)
++*/
+
-+struct vcmd_ctx_rlimit_v0 {
-+ uint32_t id;
-+ uint64_t minimum;
-+ uint64_t softlimit;
-+ uint64_t maximum;
-+};
++#define VC_CAT_VERSION 0
+
-+struct vcmd_ctx_rlimit_mask_v0 {
-+ uint32_t minimum;
-+ uint32_t softlimit;
-+ uint32_t maximum;
-+};
++#define VC_CAT_VSETUP 1
++#define VC_CAT_VHOST 2
+
-+#define VCMD_rlimit_stat VC_CMD(VSTAT, 1, 0)
++#define VC_CAT_DEVICE 6
+
-+struct vcmd_rlimit_stat_v0 {
-+ uint32_t id;
-+ uint32_t hits;
-+ uint64_t value;
-+ uint64_t minimum;
-+ uint64_t maximum;
-+};
++#define VC_CAT_VPROC 9
++#define VC_CAT_PROCALT 10
++#define VC_CAT_PROCMIG 11
++#define VC_CAT_PROCTRL 12
+
-+#define CRLIM_UNSET (0ULL)
-+#define CRLIM_INFINITY (~0ULL)
-+#define CRLIM_KEEP (~1ULL)
++#define VC_CAT_SCHED 14
++#define VC_CAT_MEMCTRL 20
+
-+#ifdef __KERNEL__
++#define VC_CAT_VNET 25
++#define VC_CAT_NETALT 26
++#define VC_CAT_NETMIG 27
++#define VC_CAT_NETCTRL 28
+
-+#ifdef CONFIG_IA32_EMULATION
++#define VC_CAT_TAGMIG 35
++#define VC_CAT_DLIMIT 36
++#define VC_CAT_INODE 38
+
-+struct vcmd_ctx_rlimit_v0_x32 {
-+ uint32_t id;
-+ uint64_t minimum;
-+ uint64_t softlimit;
-+ uint64_t maximum;
-+} __attribute__ ((aligned (4)));
++#define VC_CAT_VSTAT 40
++#define VC_CAT_VINFO 46
++#define VC_CAT_EVENT 48
+
-+#endif /* CONFIG_IA32_EMULATION */
++#define VC_CAT_FLAGS 52
++#define VC_CAT_DEBUG 56
++#define VC_CAT_RLIMIT 60
+
-+#include <linux/compiler.h>
++#define VC_CAT_SYSTEST 61
++#define VC_CAT_COMPAT 63
+
-+extern int vc_get_rlimit_mask(uint32_t, void __user *);
-+extern int vc_get_rlimit(struct vx_info *, void __user *);
-+extern int vc_set_rlimit(struct vx_info *, void __user *);
-+extern int vc_reset_minmax(struct vx_info *, void __user *);
++/* query version */
+
-+extern int vc_rlimit_stat(struct vx_info *, void __user *);
++#define VCMD_get_version VC_CMD(VERSION, 0, 0)
++#define VCMD_get_vci VC_CMD(VERSION, 1, 0)
+
-+#ifdef CONFIG_IA32_EMULATION
+
-+extern int vc_get_rlimit_x32(struct vx_info *, void __user *);
-+extern int vc_set_rlimit_x32(struct vx_info *, void __user *);
++#ifdef __KERNEL__
++
++#include <linux/errno.h>
+
-+#endif /* CONFIG_IA32_EMULATION */
+
++#else /* __KERNEL__ */
++#define __user
+#endif /* __KERNEL__ */
-+#endif /* _VX_LIMIT_CMD_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/limit_def.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/limit_def.h
---- linux-2.6.22.10/include/linux/vserver/limit_def.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/limit_def.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,47 @@
-+#ifndef _VX_LIMIT_DEF_H
-+#define _VX_LIMIT_DEF_H
+
-+#include <asm/atomic.h>
-+#include <asm/resource.h>
++#endif /* _VX_SWITCH_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/tag_cmd.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/tag_cmd.h
+--- linux-2.6.22.18/include/linux/vserver/tag_cmd.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/tag_cmd.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,22 @@
++#ifndef _VX_TAG_CMD_H
++#define _VX_TAG_CMD_H
+
-+#include "limit.h"
+
++/* vinfo commands */
+
-+struct _vx_res_limit {
-+ rlim_t soft; /* Context soft limit */
-+ rlim_t hard; /* Context hard limit */
++#define VCMD_task_tag VC_CMD(VINFO, 3, 0)
+
-+ rlim_atomic_t rcur; /* Current value */
-+ rlim_t rmin; /* Context minimum */
-+ rlim_t rmax; /* Context maximum */
++#ifdef __KERNEL__
++extern int vc_task_tag(uint32_t);
+
-+ atomic_t lhit; /* Limit hits */
-+};
++#endif /* __KERNEL__ */
+
-+/* context sub struct */
++/* context commands */
+
-+struct _vx_limit {
-+ struct _vx_res_limit res[NUM_LIMITS];
-+};
++#define VCMD_tag_migrate VC_CMD(TAGMIG, 1, 0)
+
-+#ifdef CONFIG_VSERVER_DEBUG
++#ifdef __KERNEL__
++extern int vc_tag_migrate(uint32_t);
+
-+static inline void __dump_vx_limit(struct _vx_limit *limit)
-+{
-+ int i;
++#endif /* __KERNEL__ */
++#endif /* _VX_TAG_CMD_H */
+diff -Nurp linux-2.6.22.18/include/linux/vserver/tag.h linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/tag.h
+--- linux-2.6.22.18/include/linux/vserver/tag.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vserver/tag.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,143 @@
++#ifndef _DX_TAG_H
++#define _DX_TAG_H
+
-+ printk("\t_vx_limit:");
-+ for (i = 0; i < NUM_LIMITS; i++) {
-+ printk("\t [%2d] = %8lu %8lu/%8lu, %8ld/%8ld, %8d\n",
-+ i, (unsigned long)__rlim_get(limit, i),
-+ (unsigned long)__rlim_rmin(limit, i),
-+ (unsigned long)__rlim_rmax(limit, i),
-+ (long)__rlim_soft(limit, i),
-+ (long)__rlim_hard(limit, i),
-+ atomic_read(&__rlim_lhit(limit, i)));
-+ }
-+}
++#include <linux/types.h>
+
-+#endif
+
-+#endif /* _VX_LIMIT_DEF_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/limit_int.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/limit_int.h
---- linux-2.6.22.10/include/linux/vserver/limit_int.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/limit_int.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,198 @@
-+#ifndef _VX_LIMIT_INT_H
-+#define _VX_LIMIT_INT_H
-+
-+#include "context.h"
-+
-+#ifdef __KERNEL__
++#define DX_TAG(in) (IS_TAGGED(in))
+
-+#define VXD_RCRES_COND(r) VXD_CBIT(cres, r)
-+#define VXD_RLIMIT_COND(r) VXD_CBIT(limit, r)
+
-+extern const char *vlimit_name[NUM_LIMITS];
++#ifdef CONFIG_DX_TAG_NFSD
++#define DX_TAG_NFSD 1
++#else
++#define DX_TAG_NFSD 0
++#endif
+
-+static inline void __vx_acc_cres(struct vx_info *vxi,
-+ int res, int dir, void *_data, char *_file, int _line)
-+{
-+ if (VXD_RCRES_COND(res))
-+ vxlprintk(1, "vx_acc_cres[%5d,%s,%2d]: %5ld%s (%p)",
-+ (vxi ? vxi->vx_id : -1), vlimit_name[res], res,
-+ (vxi ? (long)__rlim_get(&vxi->limit, res) : 0),
-+ (dir > 0) ? "++" : "--", _data, _file, _line);
-+ if (!vxi)
-+ return;
+
-+ if (dir > 0)
-+ __rlim_inc(&vxi->limit, res);
-+ else
-+ __rlim_dec(&vxi->limit, res);
-+}
++#ifdef CONFIG_TAGGING_NONE
+
-+static inline void __vx_add_cres(struct vx_info *vxi,
-+ int res, int amount, void *_data, char *_file, int _line)
-+{
-+ if (VXD_RCRES_COND(res))
-+ vxlprintk(1, "vx_add_cres[%5d,%s,%2d]: %5ld += %5d (%p)",
-+ (vxi ? vxi->vx_id : -1), vlimit_name[res], res,
-+ (vxi ? (long)__rlim_get(&vxi->limit, res) : 0),
-+ amount, _data, _file, _line);
-+ if (amount == 0)
-+ return;
-+ if (!vxi)
-+ return;
-+ __rlim_add(&vxi->limit, res, amount);
-+}
++#define MAX_UID 0xFFFFFFFF
++#define MAX_GID 0xFFFFFFFF
+
-+static inline
-+int __vx_cres_adjust_max(struct _vx_limit *limit, int res, rlim_t value)
-+{
-+ int cond = (value > __rlim_rmax(limit, res));
++#define INOTAG_TAG(cond, uid, gid, tag) (0)
+
-+ if (cond)
-+ __rlim_rmax(limit, res) = value;
-+ return cond;
-+}
++#define TAGINO_UID(cond, uid, tag) (uid)
++#define TAGINO_GID(cond, gid, tag) (gid)
+
-+static inline
-+int __vx_cres_adjust_min(struct _vx_limit *limit, int res, rlim_t value)
-+{
-+ int cond = (value < __rlim_rmin(limit, res));
++#endif
+
-+ if (cond)
-+ __rlim_rmin(limit, res) = value;
-+ return cond;
-+}
+
-+static inline
-+void __vx_cres_fixup(struct _vx_limit *limit, int res, rlim_t value)
-+{
-+ if (!__vx_cres_adjust_max(limit, res, value))
-+ __vx_cres_adjust_min(limit, res, value);
-+}
++#ifdef CONFIG_TAGGING_GID16
+
++#define MAX_UID 0xFFFFFFFF
++#define MAX_GID 0x0000FFFF
+
-+/* return values:
-+ +1 ... no limit hit
-+ -1 ... over soft limit
-+ 0 ... over hard limit */
++#define INOTAG_TAG(cond, uid, gid, tag) \
++ ((cond) ? (((gid) >> 16) & 0xFFFF) : 0)
+
-+static inline int __vx_cres_avail(struct vx_info *vxi,
-+ int res, int num, char *_file, int _line)
-+{
-+ struct _vx_limit *limit;
-+ rlim_t value;
++#define TAGINO_UID(cond, uid, tag) (uid)
++#define TAGINO_GID(cond, gid, tag) \
++ ((cond) ? (((gid) & 0xFFFF) | ((tag) << 16)) : (gid))
+
-+ if (VXD_RLIMIT_COND(res))
-+ vxlprintk(1, "vx_cres_avail[%5d,%s,%2d]: %5ld/%5ld > %5ld + %5d",
-+ (vxi ? vxi->vx_id : -1), vlimit_name[res], res,
-+ (vxi ? (long)__rlim_soft(&vxi->limit, res) : -1),
-+ (vxi ? (long)__rlim_hard(&vxi->limit, res) : -1),
-+ (vxi ? (long)__rlim_get(&vxi->limit, res) : 0),
-+ num, _file, _line);
-+ if (!vxi)
-+ return 1;
++#endif
+
-+ limit = &vxi->limit;
-+ value = __rlim_get(limit, res);
+
-+ if (!__vx_cres_adjust_max(limit, res, value))
-+ __vx_cres_adjust_min(limit, res, value);
++#ifdef CONFIG_TAGGING_ID24
+
-+ if (num == 0)
-+ return 1;
++#define MAX_UID 0x00FFFFFF
++#define MAX_GID 0x00FFFFFF
+
-+ if (__rlim_soft(limit, res) == RLIM_INFINITY)
-+ return -1;
-+ if (value + num <= __rlim_soft(limit, res))
-+ return -1;
++#define INOTAG_TAG(cond, uid, gid, tag) \
++ ((cond) ? ((((uid) >> 16) & 0xFF00) | (((gid) >> 24) & 0xFF)) : 0)
+
-+ if (__rlim_hard(limit, res) == RLIM_INFINITY)
-+ return 1;
-+ if (value + num <= __rlim_hard(limit, res))
-+ return 1;
++#define TAGINO_UID(cond, uid, tag) \
++ ((cond) ? (((uid) & 0xFFFFFF) | (((tag) & 0xFF00) << 16)) : (uid))
++#define TAGINO_GID(cond, gid, tag) \
++ ((cond) ? (((gid) & 0xFFFFFF) | (((tag) & 0x00FF) << 24)) : (gid))
+
-+ __rlim_hit(limit, res);
-+ return 0;
-+}
++#endif
+
+
-+static const int VLA_RSS[] = { RLIMIT_RSS, VLIMIT_ANON, VLIMIT_MAPPED, 0 };
++#ifdef CONFIG_TAGGING_UID16
+
-+static inline
-+rlim_t __vx_cres_array_sum(struct _vx_limit *limit, const int *array)
-+{
-+ rlim_t value, sum = 0;
-+ int res;
++#define MAX_UID 0x0000FFFF
++#define MAX_GID 0xFFFFFFFF
+
-+ while ((res = *array++)) {
-+ value = __rlim_get(limit, res);
-+ __vx_cres_fixup(limit, res, value);
-+ sum += value;
-+ }
-+ return sum;
-+}
++#define INOTAG_TAG(cond, uid, gid, tag) \
++ ((cond) ? (((uid) >> 16) & 0xFFFF) : 0)
+
-+static inline
-+rlim_t __vx_cres_array_fixup(struct _vx_limit *limit, const int *array)
-+{
-+ rlim_t value = __vx_cres_array_sum(limit, array + 1);
-+ int res = *array;
++#define TAGINO_UID(cond, uid, tag) \
++ ((cond) ? (((uid) & 0xFFFF) | ((tag) << 16)) : (uid))
++#define TAGINO_GID(cond, gid, tag) (gid)
+
-+ if (value == __rlim_get(limit, res))
-+ return value;
++#endif
+
-+ __rlim_set(limit, res, value);
-+ /* now adjust min/max */
-+ if (!__vx_cres_adjust_max(limit, res, value))
-+ __vx_cres_adjust_min(limit, res, value);
+
-+ return value;
-+}
++#ifdef CONFIG_TAGGING_INTERN
+
-+static inline int __vx_cres_array_avail(struct vx_info *vxi,
-+ const int *array, int num, char *_file, int _line)
-+{
-+ struct _vx_limit *limit;
-+ rlim_t value = 0;
-+ int res;
++#define MAX_UID 0xFFFFFFFF
++#define MAX_GID 0xFFFFFFFF
+
-+ if (num == 0)
-+ return 1;
-+ if (!vxi)
-+ return 1;
++#define INOTAG_TAG(cond, uid, gid, tag) \
++ ((cond) ? (tag) : 0)
+
-+ limit = &vxi->limit;
-+ res = *array;
-+ value = __vx_cres_array_sum(limit, array + 1);
++#define TAGINO_UID(cond, uid, tag) (uid)
++#define TAGINO_GID(cond, gid, tag) (gid)
+
-+ __rlim_set(limit, res, value);
-+ __vx_cres_fixup(limit, res, value);
++#endif
+
-+ return __vx_cres_avail(vxi, res, num, _file, _line);
-+}
+
++#ifndef CONFIG_TAGGING_NONE
++#define dx_current_fstag(sb) \
++ ((sb)->s_flags & MS_TAGGED ? dx_current_tag() : 0)
++#else
++#define dx_current_fstag(sb) (0)
++#endif
+
-+static inline void vx_limit_fixup(struct _vx_limit *limit, int id)
-+{
-+ rlim_t value;
-+ int res;
++#ifndef CONFIG_TAGGING_INTERN
++#define TAGINO_TAG(cond, tag) (0)
++#else
++#define TAGINO_TAG(cond, tag) ((cond) ? (tag) : 0)
++#endif
+
-+ /* complex resources first */
-+ if ((id < 0) || (id == RLIMIT_RSS))
-+ __vx_cres_array_fixup(limit, VLA_RSS);
++#define INOTAG_UID(cond, uid, gid) \
++ ((cond) ? ((uid) & MAX_UID) : (uid))
++#define INOTAG_GID(cond, uid, gid) \
++ ((cond) ? ((gid) & MAX_GID) : (gid))
+
-+ for (res = 0; res < NUM_LIMITS; res++) {
-+ if ((id > 0) && (res != id))
-+ continue;
+
-+ value = __rlim_get(limit, res);
-+ __vx_cres_fixup(limit, res, value);
++static inline uid_t dx_map_uid(uid_t uid)
++{
++ if ((uid > MAX_UID) && (uid != -1))
++ uid = -2;
++ return (uid & MAX_UID);
++}
+
-+ /* not supposed to happen, maybe warn? */
-+ if (__rlim_rmax(limit, res) > __rlim_hard(limit, res))
-+ __rlim_rmax(limit, res) = __rlim_hard(limit, res);
-+ }
++static inline gid_t dx_map_gid(gid_t gid)
++{
++ if ((gid > MAX_GID) && (gid != -1))
++ gid = -2;
++ return (gid & MAX_GID);
+}
+
++struct peer_tag {
++ int32_t xid;
++ int32_t nid;
++};
+
-+#endif /* __KERNEL__ */
-+#endif /* _VX_LIMIT_INT_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/monitor.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/monitor.h
---- linux-2.6.22.10/include/linux/vserver/monitor.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/monitor.h 2007-08-15 23:16:12 +0200
-@@ -0,0 +1,96 @@
-+#ifndef _VX_MONITOR_H
-+#define _VX_MONITOR_H
++#define dx_notagcheck(nd) \
++ ((nd) && (nd)->mnt && ((nd)->mnt->mnt_flags & MNT_NOTAGCHECK))
+
-+#include <linux/types.h>
++int dx_parse_tag(char *string, tag_t *tag, int remove);
+
-+enum {
-+ VXM_UNUSED = 0,
++#ifdef CONFIG_PROPAGATE
+
-+ VXM_SYNC = 0x10,
++void __dx_propagate_tag(struct nameidata *nd, struct inode *inode);
+
-+ VXM_UPDATE = 0x20,
-+ VXM_UPDATE_1,
-+ VXM_UPDATE_2,
++#define dx_propagate_tag(n, i) __dx_propagate_tag(n, i)
+
-+ VXM_RQINFO_1 = 0x24,
-+ VXM_RQINFO_2,
++#else
++#define dx_propagate_tag(n, i) do { } while (0)
++#endif
+
-+ VXM_ACTIVATE = 0x40,
-+ VXM_DEACTIVATE,
-+ VXM_IDLE,
-+
-+ VXM_HOLD = 0x44,
-+ VXM_UNHOLD,
++#endif /* _DX_TAG_H */
+diff -Nurp linux-2.6.22.18/include/linux/vs_inet6.h linux-2.6.22.18-vs2.3.0.32/include/linux/vs_inet6.h
+--- linux-2.6.22.18/include/linux/vs_inet6.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vs_inet6.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,228 @@
++#ifndef _VS_INET6_H
++#define _VS_INET6_H
+
-+ VXM_MIGRATE = 0x48,
-+ VXM_RESCHED,
++#include <net/ipv6.h>
++#include "vserver/base.h"
++#include "vserver/network.h"
++#include "vserver/debug.h"
+
-+ /* all other bits are flags */
-+ VXM_SCHED = 0x80,
-+};
++#define NXAV6(a) NIP6((a)->ip), NIP6((a)->mask), (a)->prefix, (a)->type
++#define NXAV6_FMT "[" NIP6_FMT "/" NIP6_FMT "/%d:%04x]"
+
-+struct _vxm_update_1 {
-+ uint32_t tokens_max;
-+ uint32_t fill_rate;
-+ uint32_t interval;
-+};
+
-+struct _vxm_update_2 {
-+ uint32_t tokens_min;
-+ uint32_t fill_rate;
-+ uint32_t interval;
-+};
++#ifdef CONFIG_IPV6
+
-+struct _vxm_rqinfo_1 {
-+ uint16_t running;
-+ uint16_t onhold;
-+ uint16_t iowait;
-+ uint16_t uintr;
-+ uint32_t idle_tokens;
-+};
++static inline
++int v6_addr_match(struct nx_addr_v6 *nxa,
++ const struct in6_addr *addr, uint16_t mask)
++{
++ switch (nxa->type & mask) {
++ case NXA_TYPE_MASK:
++ return ipv6_masked_addr_cmp(&nxa->ip, &nxa->mask, addr);
++ case NXA_TYPE_ADDR:
++ return ipv6_addr_equal(&nxa->ip, addr);
++ case NXA_TYPE_ANY:
++ return 1;
++ default:
++ return 0;
++ }
++}
+
-+struct _vxm_rqinfo_2 {
-+ uint32_t norm_time;
-+ uint32_t idle_time;
-+ uint32_t idle_skip;
-+};
++static inline
++int v6_addr_in_nx_info(struct nx_info *nxi,
++ const struct in6_addr *addr, uint16_t mask)
++{
++ struct nx_addr_v6 *nxa;
+
-+struct _vxm_sched {
-+ uint32_t tokens;
-+ uint32_t norm_time;
-+ uint32_t idle_time;
-+};
++ if (!nxi)
++ return 1;
++ for (nxa = &nxi->v6; nxa; nxa = nxa->next)
++ if (v6_addr_match(nxa, addr, mask))
++ return 1;
++ return 0;
++}
+
-+struct _vxm_task {
-+ uint16_t pid;
-+ uint16_t state;
-+};
++static inline
++int v6_nx_addr_match(struct nx_addr_v6 *nxa, struct nx_addr_v6 *addr, uint16_t mask)
++{
++ /* FIXME: needs full range checks */
++ return v6_addr_match(nxa, &addr->ip, mask);
++}
+
-+struct _vxm_event {
-+ uint32_t jif;
-+ union {
-+ uint32_t seq;
-+ uint32_t sec;
-+ };
-+ union {
-+ uint32_t tokens;
-+ uint32_t nsec;
-+ struct _vxm_task tsk;
-+ };
-+};
++static inline
++int v6_nx_addr_in_nx_info(struct nx_info *nxi, struct nx_addr_v6 *nxa, uint16_t mask)
++{
++ struct nx_addr_v6 *ptr;
+
-+struct _vx_mon_entry {
-+ uint16_t type;
-+ uint16_t xid;
-+ union {
-+ struct _vxm_event ev;
-+ struct _vxm_sched sd;
-+ struct _vxm_update_1 u1;
-+ struct _vxm_update_2 u2;
-+ struct _vxm_rqinfo_1 q1;
-+ struct _vxm_rqinfo_2 q2;
-+ };
-+};
++ for (ptr = &nxi->v6; ptr; ptr = ptr->next)
++ if (v6_nx_addr_match(ptr, nxa, mask))
++ return 1;
++ return 0;
++}
+
+
-+#endif /* _VX_MONITOR_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/network.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/network.h
---- linux-2.6.22.10/include/linux/vserver/network.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/network.h 2007-10-05 12:29:05 +0200
-@@ -0,0 +1,143 @@
-+#ifndef _VX_NETWORK_H
-+#define _VX_NETWORK_H
++/*
++ * Check if a given address matches for a socket
++ *
++ * nxi: the socket's nx_info if any
++ * addr: to be verified address
++ */
++static inline
++int v6_sock_addr_match (
++ struct nx_info *nxi,
++ struct inet_sock *inet,
++ struct in6_addr *addr)
++{
++ struct sock *sk = &inet->sk;
++ struct in6_addr *saddr = inet6_rcv_saddr(sk);
+
-+#include <linux/types.h>
++ if (!ipv6_addr_any(addr) &&
++ ipv6_addr_equal(saddr, addr))
++ return 1;
++ if (ipv6_addr_any(saddr))
++ return v6_addr_in_nx_info(nxi, addr, -1);
++ return 0;
++}
+
++/*
++ * check if address is covered by socket
++ *
++ * sk: the socket to check against
++ * addr: the address in question (must be != 0)
++ */
+
-+#define MAX_N_CONTEXT 65535 /* Arbitrary limit */
++static inline
++int __v6_addr_match_socket(const struct sock *sk, struct nx_addr_v6 *nxa)
++{
++ struct nx_info *nxi = sk->sk_nx_info;
++ struct in6_addr *saddr = inet6_rcv_saddr(sk);
+
++ vxdprintk(VXD_CBIT(net, 5),
++ "__v6_addr_in_socket(%p," NXAV6_FMT ") %p:" NIP6_FMT " %p;%lx",
++ sk, NXAV6(nxa), nxi, NIP6(*saddr), sk->sk_socket,
++ (sk->sk_socket?sk->sk_socket->flags:0));
+
-+/* network flags */
++ if (!ipv6_addr_any(saddr)) { /* direct address match */
++ return v6_addr_match(nxa, saddr, -1);
++ } else if (nxi) { /* match against nx_info */
++ return v6_nx_addr_in_nx_info(nxi, nxa, -1);
++ } else { /* unrestricted any socket */
++ return 1;
++ }
++}
+
-+#define NXF_INFO_PRIVATE 0x00000008
+
-+#define NXF_SINGLE_IP 0x00000100
-+#define NXF_LBACK_REMAP 0x00000200
++/* inet related checks and helpers */
+
-+#define NXF_HIDE_NETIF 0x02000000
-+#define NXF_HIDE_LBACK 0x04000000
+
-+#define NXF_STATE_SETUP (1ULL << 32)
-+#define NXF_STATE_ADMIN (1ULL << 34)
++struct in_ifaddr;
++struct net_device;
++struct sock;
+
-+#define NXF_SC_HELPER (1ULL << 36)
-+#define NXF_PERSISTENT (1ULL << 38)
+
-+#define NXF_ONE_TIME (0x0005ULL << 32)
++#include <linux/netdevice.h>
++#include <linux/inetdevice.h>
++#include <net/inet_timewait_sock.h>
+
+
-+#define NXF_INIT_SET (__nxf_init_set())
++int dev_in_nx_info(struct net_device *, struct nx_info *);
++int v6_dev_in_nx_info(struct net_device *, struct nx_info *);
++int nx_v6_addr_conflict(struct nx_info *, struct nx_info *);
+
-+static inline uint64_t __nxf_init_set(void) {
-+ return NXF_STATE_ADMIN
-+#ifdef CONFIG_VSERVER_AUTO_LBACK
-+ | NXF_LBACK_REMAP
-+ | NXF_HIDE_LBACK
-+#endif
-+#ifdef CONFIG_VSERVER_AUTO_SINGLE
-+ | NXF_SINGLE_IP
-+#endif
-+ | NXF_HIDE_NETIF;
-+}
+
+
-+/* network caps */
++static inline
++int v6_ifa_in_nx_info(struct inet6_ifaddr *ifa, struct nx_info *nxi)
++{
++ if (!nxi)
++ return 1;
++ if (!ifa)
++ return 0;
++ return v6_addr_in_nx_info(nxi, &ifa->addr, -1);
++}
+
-+#define NXC_RAW_ICMP 0x00000100
++static inline
++int nx_v6_ifa_visible(struct nx_info *nxi, struct inet6_ifaddr *ifa)
++{
++ if (!nx_info_flags(nxi, NXF_HIDE_NETIF, 0))
++ return 1;
++ if (v6_ifa_in_nx_info(ifa, nxi))
++ return 1;
++ return 0;
++}
+
+
-+/* address types */
++struct nx_v6_sock_addr {
++ struct in6_addr saddr; /* Address used for validation */
++ struct in6_addr baddr; /* Address used for socket bind */
++};
+
-+#define NXA_TYPE_IPV4 0x0001
-+#define NXA_TYPE_IPV6 0x0002
++static inline
++int v6_map_sock_addr(struct inet_sock *inet, struct sockaddr_in6 *addr,
++ struct nx_v6_sock_addr *nsa)
++{
++ // struct sock *sk = &inet->sk;
++ // struct nx_info *nxi = sk->sk_nx_info;
++ struct in6_addr saddr = addr->sin6_addr;
++ struct in6_addr baddr = saddr;
+
-+#define NXA_TYPE_NONE 0x0000
-+#define NXA_TYPE_ANY 0x00FF
++ nsa->saddr = saddr;
++ nsa->baddr = baddr;
++ return 0;
++}
+
-+#define NXA_TYPE_ADDR 0x0010
-+#define NXA_TYPE_MASK 0x0020
-+#define NXA_TYPE_RANGE 0x0040
++static inline
++void v6_set_sock_addr(struct inet_sock *inet, struct nx_v6_sock_addr *nsa)
++{
++ // struct sock *sk = &inet->sk;
++ // struct in6_addr *saddr = inet6_rcv_saddr(sk);
+
-+#define NXA_MASK_ALL (NXA_TYPE_ADDR | NXA_TYPE_MASK | NXA_TYPE_RANGE)
++ // *saddr = nsa->baddr;
++ // inet->saddr = nsa->baddr;
++}
+
-+#define NXA_MOD_BCAST 0x0100
-+#define NXA_MOD_LBACK 0x0200
++static inline
++int nx_info_has_v6(struct nx_info *nxi)
++{
++ if (!nxi)
++ return 1;
++ if (NX_IPV6(nxi))
++ return 1;
++ return 0;
++}
+
-+#define NXA_LOOPBACK 0x1000
++#else /* CONFIG_IPV6 */
+
-+#define NXA_MASK_BIND (NXA_MASK_ALL | NXA_MOD_BCAST | NXA_MOD_LBACK)
-+#define NXA_MASK_SHOW (NXA_MASK_ALL | NXA_LOOPBACK)
++static inline
++int nx_v6_dev_visible(struct nx_info *n, struct net_device *d)
++{
++ return 1;
++}
+
-+#ifdef __KERNEL__
+
-+#include <linux/list.h>
-+#include <linux/spinlock.h>
-+#include <linux/rcupdate.h>
-+#include <linux/in.h>
-+#include <linux/in6.h>
-+#include <asm/atomic.h>
++static inline
++int nx_v6_addr_conflict(struct nx_info *n, uint32_t a, const struct sock *s)
++{
++ return 1;
++}
+
-+struct nx_addr_v4 {
-+ struct nx_addr_v4 *next;
-+ struct in_addr ip[2];
-+ struct in_addr mask;
-+ uint16_t type;
-+ uint16_t flags;
-+};
++static inline
++int v6_ifa_in_nx_info(struct in_ifaddr *a, struct nx_info *n)
++{
++ return 1;
++}
+
-+struct nx_addr_v6 {
-+ struct nx_addr_v6 *next;
-+ struct in6_addr ip;
-+ struct in6_addr mask;
-+ uint32_t prefix;
-+ uint16_t type;
-+ uint16_t flags;
-+};
++static inline
++int nx_info_has_v6(struct nx_info *nxi)
++{
++ return 0;
++}
+
-+struct nx_info {
-+ struct hlist_node nx_hlist; /* linked list of nxinfos */
-+ nid_t nx_id; /* vnet id */
-+ atomic_t nx_usecnt; /* usage count */
-+ atomic_t nx_tasks; /* tasks count */
-+ int nx_state; /* context state */
++#endif /* CONFIG_IPV6 */
+
-+ uint64_t nx_flags; /* network flag word */
-+ uint64_t nx_ncaps; /* network capabilities */
++#define current_nx_info_has_v6() \
++ nx_info_has_v6(current_nx_info())
+
-+ struct in_addr v4_lback; /* Loopback address */
-+ struct in_addr v4_bcast; /* Broadcast address */
-+ struct nx_addr_v4 v4; /* First/Single ipv4 address */
-+#ifdef CONFIG_IPV6
-+ struct nx_addr_v6 v6; /* First/Single ipv6 address */
++#else
++#warning duplicate inclusion
+#endif
-+ char nx_name[65]; /* network context name */
-+};
+diff -Nurp linux-2.6.22.18/include/linux/vs_inet.h linux-2.6.22.18-vs2.3.0.32/include/linux/vs_inet.h
+--- linux-2.6.22.18/include/linux/vs_inet.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vs_inet.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,341 @@
++#ifndef _VS_INET_H
++#define _VS_INET_H
+
++#include "vserver/base.h"
++#include "vserver/network.h"
++#include "vserver/debug.h"
+
-+/* status flags */
++#define IPI_LOOPBACK htonl(INADDR_LOOPBACK)
+
-+#define NXS_HASHED 0x0001
-+#define NXS_SHUTDOWN 0x0100
-+#define NXS_RELEASED 0x8000
++#define NXAV4(a) NIPQUAD((a)->ip[0]), NIPQUAD((a)->ip[1]), \
++ NIPQUAD((a)->mask), (a)->type
++#define NXAV4_FMT "[" NIPQUAD_FMT "-" NIPQUAD_FMT "/" NIPQUAD_FMT ":%04x]"
+
-+extern struct nx_info *lookup_nx_info(int);
+
-+extern int get_nid_list(int, unsigned int *, int);
-+extern int nid_is_hashed(nid_t);
++static inline
++int v4_addr_match(struct nx_addr_v4 *nxa, __be32 addr, uint16_t tmask)
++{
++ __be32 ip = nxa->ip[0].s_addr;
++ __be32 mask = nxa->mask.s_addr;
++ __be32 bcast = ip | ~mask;
++ int ret = 0;
+
-+extern int nx_migrate_task(struct task_struct *, struct nx_info *);
++ switch (nxa->type & tmask) {
++ case NXA_TYPE_MASK:
++ ret = (ip == (addr & mask));
++ break;
++ case NXA_TYPE_ADDR:
++ ret = 3;
++ if (addr == ip)
++ break;
++ /* fall through to broadcast */
++ case NXA_MOD_BCAST:
++ ret = ((tmask & NXA_MOD_BCAST) && (addr == bcast));
++ break;
++ case NXA_TYPE_RANGE:
++ ret = ((nxa->ip[0].s_addr <= addr) &&
++ (nxa->ip[1].s_addr > addr));
++ break;
++ case NXA_TYPE_ANY:
++ ret = 2;
++ break;
++ }
+
-+extern long vs_net_change(struct nx_info *, unsigned int);
++ vxdprintk(VXD_CBIT(net, 0),
++ "v4_addr_match(%p" NXAV4_FMT "," NIPQUAD_FMT ",%04x) = %d",
++ nxa, NXAV4(nxa), NIPQUAD(addr), tmask, ret);
++ return ret;
++}
+
-+struct sock;
++static inline
++int v4_addr_in_nx_info(struct nx_info *nxi, __be32 addr, uint16_t tmask)
++{
++ struct nx_addr_v4 *nxa;
++ int ret = 1;
+
++ if (!nxi)
++ goto out;
+
-+#define NX_IPV4(n) ((n)->v4.type != NXA_TYPE_NONE)
-+#ifdef CONFIG_IPV6
-+#define NX_IPV6(n) ((n)->v6.type != NXA_TYPE_NONE)
-+#else
-+#define NX_IPV6(n) (0)
-+#endif
++ ret = 2;
++ /* allow 127.0.0.1 when remapping lback */
++ if ((tmask & NXA_LOOPBACK) &&
++ (addr == IPI_LOOPBACK) &&
++ nx_info_flags(nxi, NXF_LBACK_REMAP, 0))
++ goto out;
++ ret = 3;
++ /* check for lback address */
++ if ((tmask & NXA_MOD_LBACK) &&
++ (nxi->v4_lback.s_addr == addr))
++ goto out;
++ ret = 4;
++ /* check for broadcast address */
++ if ((tmask & NXA_MOD_BCAST) &&
++ (nxi->v4_bcast.s_addr == addr))
++ goto out;
++ ret = 5;
++ /* check for v4 addresses */
++ for (nxa = &nxi->v4; nxa; nxa = nxa->next)
++ if (v4_addr_match(nxa, addr, tmask))
++ goto out;
++ ret = 0;
++out:
++ vxdprintk(VXD_CBIT(net, 0),
++ "v4_addr_in_nx_info(%p[#%u]," NIPQUAD_FMT ",%04x) = %d",
++ nxi, nxi ? nxi->nx_id : 0, NIPQUAD(addr), tmask, ret);
++ return ret;
++}
+
-+#endif /* __KERNEL__ */
-+#endif /* _VX_NETWORK_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/network_cmd.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/network_cmd.h
---- linux-2.6.22.10/include/linux/vserver/network_cmd.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/network_cmd.h 2007-08-15 20:08:10 +0200
-@@ -0,0 +1,150 @@
-+#ifndef _VX_NETWORK_CMD_H
-+#define _VX_NETWORK_CMD_H
++static inline
++int v4_nx_addr_match(struct nx_addr_v4 *nxa, struct nx_addr_v4 *addr, uint16_t mask)
++{
++ /* FIXME: needs full range checks */
++ return v4_addr_match(nxa, addr->ip[0].s_addr, mask);
++}
+
++static inline
++int v4_nx_addr_in_nx_info(struct nx_info *nxi, struct nx_addr_v4 *nxa, uint16_t mask)
++{
++ struct nx_addr_v4 *ptr;
+
-+/* vinfo commands */
++ for (ptr = &nxi->v4; ptr; ptr = ptr->next)
++ if (v4_nx_addr_match(ptr, nxa, mask))
++ return 1;
++ return 0;
++}
+
-+#define VCMD_task_nid VC_CMD(VINFO, 2, 0)
++#include <net/inet_sock.h>
+
-+#ifdef __KERNEL__
-+extern int vc_task_nid(uint32_t);
++/*
++ * Check if a given address matches for a socket
++ *
++ * nxi: the socket's nx_info if any
++ * addr: to be verified address
++ */
++static inline
++int v4_sock_addr_match (
++ struct nx_info *nxi,
++ struct inet_sock *inet,
++ __be32 addr)
++{
++ __be32 saddr = inet->rcv_saddr;
++ __be32 bcast = nxi ? nxi->v4_bcast.s_addr : INADDR_BROADCAST;
+
-+#endif /* __KERNEL__ */
++ if (addr && (saddr == addr || bcast == addr))
++ return 1;
++ if (!saddr)
++ return v4_addr_in_nx_info(nxi, addr, NXA_MASK_BIND);
++ return 0;
++}
+
-+#define VCMD_nx_info VC_CMD(VINFO, 6, 0)
+
-+struct vcmd_nx_info_v0 {
-+ uint32_t nid;
-+ /* more to come */
-+};
++/* inet related checks and helpers */
+
-+#ifdef __KERNEL__
-+extern int vc_nx_info(struct nx_info *, void __user *);
+
-+#endif /* __KERNEL__ */
++struct in_ifaddr;
++struct net_device;
++struct sock;
+
-+#include <linux/in.h>
-+#include <linux/in6.h>
++#ifdef CONFIG_INET
+
-+#define VCMD_net_create_v0 VC_CMD(VNET, 1, 0)
-+#define VCMD_net_create VC_CMD(VNET, 1, 1)
++#include <linux/netdevice.h>
++#include <linux/inetdevice.h>
++#include <net/inet_timewait_sock.h>
+
-+struct vcmd_net_create {
-+ uint64_t flagword;
-+};
+
-+#define VCMD_net_migrate VC_CMD(NETMIG, 1, 0)
++int dev_in_nx_info(struct net_device *, struct nx_info *);
++int v4_dev_in_nx_info(struct net_device *, struct nx_info *);
++int nx_v4_addr_conflict(struct nx_info *, struct nx_info *);
+
-+#define VCMD_net_add VC_CMD(NETALT, 1, 0)
-+#define VCMD_net_remove VC_CMD(NETALT, 2, 0)
+
-+struct vcmd_net_addr_v0 {
-+ uint16_t type;
-+ uint16_t count;
-+ struct in_addr ip[4];
-+ struct in_addr mask[4];
-+};
++/*
++ * check if address is covered by socket
++ *
++ * sk: the socket to check against
++ * addr: the address in question (must be != 0)
++ */
+
-+#define VCMD_net_add_ipv4 VC_CMD(NETALT, 1, 1)
-+#define VCMD_net_remove_ipv4 VC_CMD(NETALT, 2, 1)
-+
-+struct vcmd_net_addr_ipv4_v1 {
-+ uint16_t type;
-+ uint16_t flags;
-+ struct in_addr ip;
-+ struct in_addr mask;
-+};
++static inline
++int __v4_addr_match_socket(const struct sock *sk, struct nx_addr_v4 *nxa)
++{
++ struct nx_info *nxi = sk->sk_nx_info;
++ __be32 saddr = inet_rcv_saddr(sk);
+
-+#define VCMD_net_add_ipv6 VC_CMD(NETALT, 3, 1)
-+#define VCMD_net_remove_ipv6 VC_CMD(NETALT, 4, 1)
++ vxdprintk(VXD_CBIT(net, 5),
++ "__v4_addr_in_socket(%p," NXAV4_FMT ") %p:" NIPQUAD_FMT " %p;%lx",
++ sk, NXAV4(nxa), nxi, NIPQUAD(saddr), sk->sk_socket,
++ (sk->sk_socket?sk->sk_socket->flags:0));
+
-+struct vcmd_net_addr_ipv6_v1 {
-+ uint16_t type;
-+ uint16_t flags;
-+ uint32_t prefix;
-+ struct in6_addr ip;
-+ struct in6_addr mask;
-+};
++ if (saddr) { /* direct address match */
++ return v4_addr_match(nxa, saddr, -1);
++ } else if (nxi) { /* match against nx_info */
++ return v4_nx_addr_in_nx_info(nxi, nxa, -1);
++ } else { /* unrestricted any socket */
++ return 1;
++ }
++}
+
-+#define VCMD_add_match_ipv4 VC_CMD(NETALT, 5, 0)
-+#define VCMD_get_match_ipv4 VC_CMD(NETALT, 6, 0)
+
-+struct vcmd_match_ipv4_v0 {
-+ uint16_t type;
-+ uint16_t flags;
-+ uint16_t parent;
-+ uint16_t prefix;
-+ struct in_addr ip;
-+ struct in_addr ip2;
-+ struct in_addr mask;
-+};
+
-+#define VCMD_add_match_ipv6 VC_CMD(NETALT, 7, 0)
-+#define VCMD_get_match_ipv6 VC_CMD(NETALT, 8, 0)
++static inline
++int nx_dev_visible(struct nx_info *nxi, struct net_device *dev)
++{
++ vxdprintk(VXD_CBIT(net, 1), "nx_dev_visible(%p[#%u],%p »%s«) %d",
++ nxi, nxi ? nxi->nx_id : 0, dev, dev->name,
++ nxi ? dev_in_nx_info(dev, nxi) : 0);
+
-+struct vcmd_match_ipv6_v0 {
-+ uint16_t type;
-+ uint16_t flags;
-+ uint16_t parent;
-+ uint16_t prefix;
-+ struct in6_addr ip;
-+ struct in6_addr ip2;
-+ struct in6_addr mask;
-+};
++ if (!nx_info_flags(nxi, NXF_HIDE_NETIF, 0))
++ return 1;
++ if (dev_in_nx_info(dev, nxi))
++ return 1;
++ return 0;
++}
+
+
-+#ifdef __KERNEL__
-+extern int vc_net_create(uint32_t, void __user *);
-+extern int vc_net_migrate(struct nx_info *, void __user *);
++static inline
++int v4_ifa_in_nx_info(struct in_ifaddr *ifa, struct nx_info *nxi)
++{
++ if (!nxi)
++ return 1;
++ if (!ifa)
++ return 0;
++ return v4_addr_in_nx_info(nxi, ifa->ifa_local, NXA_MASK_SHOW);
++}
+
-+extern int vc_net_add(struct nx_info *, void __user *);
-+extern int vc_net_remove(struct nx_info *, void __user *);
++static inline
++int nx_v4_ifa_visible(struct nx_info *nxi, struct in_ifaddr *ifa)
++{
++ vxdprintk(VXD_CBIT(net, 1), "nx_v4_ifa_visible(%p[#%u],%p) %d",
++ nxi, nxi ? nxi->nx_id : 0, ifa,
++ nxi ? v4_ifa_in_nx_info(ifa, nxi) : 0);
+
-+extern int vc_net_add_ipv4(struct nx_info *, void __user *);
-+extern int vc_net_remove_ipv4(struct nx_info *, void __user *);
++ if (!nx_info_flags(nxi, NXF_HIDE_NETIF, 0))
++ return 1;
++ if (v4_ifa_in_nx_info(ifa, nxi))
++ return 1;
++ return 0;
++}
+
-+extern int vc_net_add_ipv6(struct nx_info *, void __user *);
-+extern int vc_net_remove_ipv6(struct nx_info *, void __user *);
+
-+extern int vc_add_match_ipv4(struct nx_info *, void __user *);
-+extern int vc_get_match_ipv4(struct nx_info *, void __user *);
++struct nx_v4_sock_addr {
++ __be32 saddr; /* Address used for validation */
++ __be32 baddr; /* Address used for socket bind */
++};
+
-+extern int vc_add_match_ipv6(struct nx_info *, void __user *);
-+extern int vc_get_match_ipv6(struct nx_info *, void __user *);
++static inline
++int v4_map_sock_addr(struct inet_sock *inet, struct sockaddr_in *addr,
++ struct nx_v4_sock_addr *nsa)
++{
++ struct sock *sk = &inet->sk;
++ struct nx_info *nxi = sk->sk_nx_info;
++ __be32 saddr = addr->sin_addr.s_addr;
++ __be32 baddr = saddr;
+
-+#endif /* __KERNEL__ */
++ vxdprintk(VXD_CBIT(net, 3),
++ "inet_bind(%p)* %p,%p;%lx " NIPQUAD_FMT,
++ sk, sk->sk_nx_info, sk->sk_socket,
++ (sk->sk_socket ? sk->sk_socket->flags : 0),
++ NIPQUAD(saddr));
+
++ if (nxi) {
++ if (saddr == INADDR_ANY) {
++ if (nx_info_flags(nxi, NXF_SINGLE_IP, 0))
++ baddr = nxi->v4.ip[0].s_addr;
++ } else if (saddr == IPI_LOOPBACK) {
++ if (nx_info_flags(nxi, NXF_LBACK_REMAP, 0))
++ baddr = nxi->v4_lback.s_addr;
++ } else { /* normal address bind */
++ if (!v4_addr_in_nx_info(nxi, saddr, NXA_MASK_BIND))
++ return -EADDRNOTAVAIL;
++ }
++ }
+
-+/* flag commands */
++ vxdprintk(VXD_CBIT(net, 3),
++ "inet_bind(%p) " NIPQUAD_FMT ", " NIPQUAD_FMT,
++ sk, NIPQUAD(saddr), NIPQUAD(baddr));
+
-+#define VCMD_get_nflags VC_CMD(FLAGS, 5, 0)
-+#define VCMD_set_nflags VC_CMD(FLAGS, 6, 0)
++ nsa->saddr = saddr;
++ nsa->baddr = baddr;
++ return 0;
++}
+
-+struct vcmd_net_flags_v0 {
-+ uint64_t flagword;
-+ uint64_t mask;
-+};
++static inline
++void v4_set_sock_addr(struct inet_sock *inet, struct nx_v4_sock_addr *nsa)
++{
++ inet->saddr = nsa->baddr;
++ inet->rcv_saddr = nsa->baddr;
++}
+
-+#ifdef __KERNEL__
-+extern int vc_get_nflags(struct nx_info *, void __user *);
-+extern int vc_set_nflags(struct nx_info *, void __user *);
+
-+#endif /* __KERNEL__ */
++/*
++ * helper to simplify inet_lookup_listener
++ *
++ * nxi: the socket's nx_info if any
++ * addr: to be verified address
++ * saddr: socket address
++ */
++static inline int v4_inet_addr_match (
++ struct nx_info *nxi,
++ __be32 addr,
++ __be32 saddr)
++{
++ if (addr && (saddr == addr))
++ return 1;
++ if (!saddr)
++ return nxi ? v4_addr_in_nx_info(nxi, addr, NXA_MASK_BIND) : 1;
++ return 0;
++}
+
++static inline __be32 nx_map_sock_lback(struct nx_info *nxi, __be32 addr)
++{
++ if (nx_info_flags(nxi, NXF_HIDE_LBACK, 0) &&
++ (addr == nxi->v4_lback.s_addr))
++ return IPI_LOOPBACK;
++ return addr;
++}
+
-+/* network caps commands */
++static inline
++int nx_info_has_v4(struct nx_info *nxi)
++{
++ if (!nxi)
++ return 1;
++ if (NX_IPV4(nxi))
++ return 1;
++ if (nx_info_flags(nxi, NXF_LBACK_REMAP, 0))
++ return 1;
++ return 0;
++}
+
-+#define VCMD_get_ncaps VC_CMD(FLAGS, 7, 0)
-+#define VCMD_set_ncaps VC_CMD(FLAGS, 8, 0)
++#else /* CONFIG_INET */
+
-+struct vcmd_net_caps_v0 {
-+ uint64_t ncaps;
-+ uint64_t cmask;
-+};
++static inline
++int nx_dev_visible(struct nx_info *n, struct net_device *d)
++{
++ return 1;
++}
+
-+#ifdef __KERNEL__
-+extern int vc_get_ncaps(struct nx_info *, void __user *);
-+extern int vc_set_ncaps(struct nx_info *, void __user *);
++static inline
++int nx_v4_addr_conflict(struct nx_info *n, uint32_t a, const struct sock *s)
++{
++ return 1;
++}
+
-+#endif /* __KERNEL__ */
-+#endif /* _VX_CONTEXT_CMD_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/percpu.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/percpu.h
---- linux-2.6.22.10/include/linux/vserver/percpu.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/percpu.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,14 @@
-+#ifndef _VX_PERCPU_H
-+#define _VX_PERCPU_H
++static inline
++int v4_ifa_in_nx_info(struct in_ifaddr *a, struct nx_info *n)
++{
++ return 1;
++}
+
-+#include "cvirt_def.h"
-+#include "sched_def.h"
++static inline
++int nx_info_has_v4(struct nx_info *nxi)
++{
++ return 0;
++}
+
-+struct _vx_percpu {
-+ struct _vx_cvirt_pc cvirt;
-+ struct _vx_sched_pc sched;
-+};
++#endif /* CONFIG_INET */
+
-+#define PERCPU_PERCTX (sizeof(struct _vx_percpu))
++#define current_nx_info_has_v4() \
++ nx_info_has_v4(current_nx_info())
+
-+#endif /* _VX_PERCPU_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/sched.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/sched.h
---- linux-2.6.22.10/include/linux/vserver/sched.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/sched.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,26 @@
-+#ifndef _VX_SCHED_H
-+#define _VX_SCHED_H
++#else
++#warning duplicate inclusion
++#endif
+diff -Nurp linux-2.6.22.18/include/linux/vs_limit.h linux-2.6.22.18-vs2.3.0.32/include/linux/vs_limit.h
+--- linux-2.6.22.18/include/linux/vs_limit.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vs_limit.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,140 @@
++#ifndef _VS_LIMIT_H
++#define _VS_LIMIT_H
+
++#include "vserver/limit.h"
++#include "vserver/base.h"
++#include "vserver/context.h"
++#include "vserver/debug.h"
++#include "vserver/context.h"
++#include "vserver/limit_int.h"
+
-+#ifdef __KERNEL__
+
-+struct timespec;
++#define vx_acc_cres(v, d, p, r) \
++ __vx_acc_cres(v, r, d, p, __FILE__, __LINE__)
+
-+void vx_vsi_uptime(struct timespec *, struct timespec *);
++#define vx_acc_cres_cond(x, d, p, r) \
++ __vx_acc_cres(((x) == vx_current_xid()) ? current->vx_info : 0, \
++ r, d, p, __FILE__, __LINE__)
+
+
-+struct vx_info;
++#define vx_add_cres(v, a, p, r) \
++ __vx_add_cres(v, r, a, p, __FILE__, __LINE__)
++#define vx_sub_cres(v, a, p, r) vx_add_cres(v, -(a), p, r)
+
-+void vx_update_load(struct vx_info *);
++#define vx_add_cres_cond(x, a, p, r) \
++ __vx_add_cres(((x) == vx_current_xid()) ? current->vx_info : 0, \
++ r, a, p, __FILE__, __LINE__)
++#define vx_sub_cres_cond(x, a, p, r) vx_add_cres_cond(x, -(a), p, r)
+
+
-+int vx_tokens_recalc(struct _vx_sched_pc *,
-+ unsigned long *, unsigned long *, int [2]);
++/* process and file limits */
+
-+void vx_update_sched_param(struct _vx_sched *sched,
-+ struct _vx_sched_pc *sched_pc);
++#define vx_nproc_inc(p) \
++ vx_acc_cres((p)->vx_info, 1, p, RLIMIT_NPROC)
+
-+#endif /* __KERNEL__ */
-+#else /* _VX_SCHED_H */
-+#warning duplicate inclusion
-+#endif /* _VX_SCHED_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/sched_cmd.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/sched_cmd.h
---- linux-2.6.22.10/include/linux/vserver/sched_cmd.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/sched_cmd.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,108 @@
-+#ifndef _VX_SCHED_CMD_H
-+#define _VX_SCHED_CMD_H
++#define vx_nproc_dec(p) \
++ vx_acc_cres((p)->vx_info,-1, p, RLIMIT_NPROC)
+
++#define vx_files_inc(f) \
++ vx_acc_cres_cond((f)->f_xid, 1, f, RLIMIT_NOFILE)
+
-+/* sched vserver commands */
++#define vx_files_dec(f) \
++ vx_acc_cres_cond((f)->f_xid,-1, f, RLIMIT_NOFILE)
+
-+#define VCMD_set_sched_v2 VC_CMD(SCHED, 1, 2)
-+#define VCMD_set_sched_v3 VC_CMD(SCHED, 1, 3)
-+#define VCMD_set_sched_v4 VC_CMD(SCHED, 1, 4)
++#define vx_locks_inc(l) \
++ vx_acc_cres_cond((l)->fl_xid, 1, l, RLIMIT_LOCKS)
+
-+struct vcmd_set_sched_v2 {
-+ int32_t fill_rate;
-+ int32_t interval;
-+ int32_t tokens;
-+ int32_t tokens_min;
-+ int32_t tokens_max;
-+ uint64_t cpu_mask;
-+};
++#define vx_locks_dec(l) \
++ vx_acc_cres_cond((l)->fl_xid,-1, l, RLIMIT_LOCKS)
+
-+struct vcmd_set_sched_v3 {
-+ uint32_t set_mask;
-+ int32_t fill_rate;
-+ int32_t interval;
-+ int32_t tokens;
-+ int32_t tokens_min;
-+ int32_t tokens_max;
-+ int32_t priority_bias;
-+};
++#define vx_openfd_inc(f) \
++ vx_acc_cres(current->vx_info, 1, (void *)(long)(f), VLIMIT_OPENFD)
+
-+struct vcmd_set_sched_v4 {
-+ uint32_t set_mask;
-+ int32_t fill_rate;
-+ int32_t interval;
-+ int32_t tokens;
-+ int32_t tokens_min;
-+ int32_t tokens_max;
-+ int32_t prio_bias;
-+ int32_t cpu_id;
-+ int32_t bucket_id;
-+};
++#define vx_openfd_dec(f) \
++ vx_acc_cres(current->vx_info,-1, (void *)(long)(f), VLIMIT_OPENFD)
+
-+#define VCMD_set_sched VC_CMD(SCHED, 1, 5)
-+#define VCMD_get_sched VC_CMD(SCHED, 2, 5)
+
-+struct vcmd_sched_v5 {
-+ uint32_t mask;
-+ int32_t cpu_id;
-+ int32_t bucket_id;
-+ int32_t fill_rate[2];
-+ int32_t interval[2];
-+ int32_t tokens;
-+ int32_t tokens_min;
-+ int32_t tokens_max;
-+ int32_t prio_bias;
-+};
++#define vx_cres_avail(v, n, r) \
++ __vx_cres_avail(v, r, n, __FILE__, __LINE__)
+
-+#define VXSM_FILL_RATE 0x0001
-+#define VXSM_INTERVAL 0x0002
-+#define VXSM_FILL_RATE2 0x0004
-+#define VXSM_INTERVAL2 0x0008
-+#define VXSM_TOKENS 0x0010
-+#define VXSM_TOKENS_MIN 0x0020
-+#define VXSM_TOKENS_MAX 0x0040
-+#define VXSM_PRIO_BIAS 0x0100
+
-+#define VXSM_IDLE_TIME 0x0200
-+#define VXSM_FORCE 0x0400
++#define vx_nproc_avail(n) \
++ vx_cres_avail(current->vx_info, n, RLIMIT_NPROC)
+
-+#define VXSM_V3_MASK 0x0173
-+#define VXSM_SET_MASK 0x01FF
++#define vx_files_avail(n) \
++ vx_cres_avail(current->vx_info, n, RLIMIT_NOFILE)
+
-+#define VXSM_CPU_ID 0x1000
-+#define VXSM_BUCKET_ID 0x2000
++#define vx_locks_avail(n) \
++ vx_cres_avail(current->vx_info, n, RLIMIT_LOCKS)
+
-+#define VXSM_MSEC 0x4000
++#define vx_openfd_avail(n) \
++ vx_cres_avail(current->vx_info, n, VLIMIT_OPENFD)
+
-+#define SCHED_KEEP (-2) /* only for v2 */
+
-+#ifdef __KERNEL__
++/* dentry limits */
+
-+#include <linux/compiler.h>
++#define vx_dentry_inc(d) do { \
++ if (atomic_read(&d->d_count) == 1) \
++ vx_acc_cres(current->vx_info, 1, d, VLIMIT_DENTRY); \
++ } while (0)
+
-+extern int vc_set_sched_v2(struct vx_info *, void __user *);
-+extern int vc_set_sched_v3(struct vx_info *, void __user *);
-+extern int vc_set_sched_v4(struct vx_info *, void __user *);
-+extern int vc_set_sched(struct vx_info *, void __user *);
-+extern int vc_get_sched(struct vx_info *, void __user *);
++#define vx_dentry_dec(d) do { \
++ if (atomic_read(&d->d_count) == 0) \
++ vx_acc_cres(current->vx_info,-1, d, VLIMIT_DENTRY); \
++ } while (0)
+
-+#endif /* __KERNEL__ */
++#define vx_dentry_avail(n) \
++ vx_cres_avail(current->vx_info, n, VLIMIT_DENTRY)
+
-+#define VCMD_sched_info VC_CMD(SCHED, 3, 0)
+
-+struct vcmd_sched_info {
-+ int32_t cpu_id;
-+ int32_t bucket_id;
-+ uint64_t user_msec;
-+ uint64_t sys_msec;
-+ uint64_t hold_msec;
-+ uint32_t token_usec;
-+ int32_t vavavoom;
-+};
++/* socket limits */
+
-+#ifdef __KERNEL__
++#define vx_sock_inc(s) \
++ vx_acc_cres((s)->sk_vx_info, 1, s, VLIMIT_NSOCK)
+
-+extern int vc_sched_info(struct vx_info *, void __user *);
++#define vx_sock_dec(s) \
++ vx_acc_cres((s)->sk_vx_info,-1, s, VLIMIT_NSOCK)
+
-+#endif /* __KERNEL__ */
-+#endif /* _VX_SCHED_CMD_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/sched_def.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/sched_def.h
---- linux-2.6.22.10/include/linux/vserver/sched_def.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/sched_def.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,68 @@
-+#ifndef _VX_SCHED_DEF_H
-+#define _VX_SCHED_DEF_H
++#define vx_sock_avail(n) \
++ vx_cres_avail(current->vx_info, n, VLIMIT_NSOCK)
+
-+#include <linux/spinlock.h>
-+#include <linux/jiffies.h>
-+#include <linux/cpumask.h>
-+#include <asm/atomic.h>
-+#include <asm/param.h>
+
++/* ipc resource limits */
+
-+/* context sub struct */
++#define vx_ipcmsg_add(v, u, a) \
++ vx_add_cres(v, a, u, RLIMIT_MSGQUEUE)
+
-+struct _vx_sched {
-+ spinlock_t tokens_lock; /* lock for token bucket */
++#define vx_ipcmsg_sub(v, u, a) \
++ vx_sub_cres(v, a, u, RLIMIT_MSGQUEUE)
+
-+ int tokens; /* number of CPU tokens */
-+ int fill_rate[2]; /* Fill rate: add X tokens... */
-+ int interval[2]; /* Divisor: per Y jiffies */
-+ int tokens_min; /* Limit: minimum for unhold */
-+ int tokens_max; /* Limit: no more than N tokens */
++#define vx_ipcmsg_avail(v, a) \
++ vx_cres_avail(v, a, RLIMIT_MSGQUEUE)
+
-+ int prio_bias; /* bias offset for priority */
+
-+ unsigned update_mask; /* which features should be updated */
-+ cpumask_t update; /* CPUs which should update */
-+};
++#define vx_ipcshm_add(v, k, a) \
++ vx_add_cres(v, a, (void *)(long)(k), VLIMIT_SHMEM)
+
-+struct _vx_sched_pc {
-+ int tokens; /* number of CPU tokens */
-+ int flags; /* bucket flags */
++#define vx_ipcshm_sub(v, k, a) \
++ vx_sub_cres(v, a, (void *)(long)(k), VLIMIT_SHMEM)
+
-+ int fill_rate[2]; /* Fill rate: add X tokens... */
-+ int interval[2]; /* Divisor: per Y jiffies */
-+ int tokens_min; /* Limit: minimum for unhold */
-+ int tokens_max; /* Limit: no more than N tokens */
++#define vx_ipcshm_avail(v, a) \
++ vx_cres_avail(v, a, VLIMIT_SHMEM)
+
-+ int prio_bias; /* bias offset for priority */
-+ int vavavoom; /* last calculated vavavoom */
+
-+ unsigned long norm_time; /* last time accounted */
-+ unsigned long idle_time; /* non linear time for fair sched */
-+ unsigned long token_time; /* token time for accounting */
-+ unsigned long onhold; /* jiffies when put on hold */
++#define vx_semary_inc(a) \
++ vx_acc_cres(current->vx_info, 1, a, VLIMIT_SEMARY)
+
-+ uint64_t user_ticks; /* token tick events */
-+ uint64_t sys_ticks; /* token tick events */
-+ uint64_t hold_ticks; /* token ticks paused */
-+};
++#define vx_semary_dec(a) \
++ vx_acc_cres(current->vx_info, -1, a, VLIMIT_SEMARY)
+
+
-+#define VXSF_ONHOLD 0x0001
-+#define VXSF_IDLE_TIME 0x0100
++#define vx_nsems_add(a,n) \
++ vx_add_cres(current->vx_info, n, a, VLIMIT_NSEMS)
+
-+#ifdef CONFIG_VSERVER_DEBUG
++#define vx_nsems_sub(a,n) \
++ vx_sub_cres(current->vx_info, n, a, VLIMIT_NSEMS)
+
-+static inline void __dump_vx_sched(struct _vx_sched *sched)
-+{
-+ printk("\t_vx_sched:\n");
-+ printk("\t tokens: %4d/%4d, %4d/%4d, %4d, %4d\n",
-+ sched->fill_rate[0], sched->interval[0],
-+ sched->fill_rate[1], sched->interval[1],
-+ sched->tokens_min, sched->tokens_max);
-+ printk("\t priority = %4d\n", sched->prio_bias);
-+}
+
++#else
++#warning duplicate inclusion
+#endif
+diff -Nurp linux-2.6.22.18/include/linux/vs_memory.h linux-2.6.22.18-vs2.3.0.32/include/linux/vs_memory.h
+--- linux-2.6.22.18/include/linux/vs_memory.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vs_memory.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,159 @@
++#ifndef _VS_MEMORY_H
++#define _VS_MEMORY_H
+
-+#endif /* _VX_SCHED_DEF_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/signal.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/signal.h
---- linux-2.6.22.10/include/linux/vserver/signal.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/signal.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,14 @@
-+#ifndef _VX_SIGNAL_H
-+#define _VX_SIGNAL_H
++#include "vserver/limit.h"
++#include "vserver/base.h"
++#include "vserver/context.h"
++#include "vserver/debug.h"
++#include "vserver/context.h"
++#include "vserver/limit_int.h"
+
+
-+#ifdef __KERNEL__
++#define __acc_add_long(a, v) (*(v) += (a))
++#define __acc_inc_long(v) (++*(v))
++#define __acc_dec_long(v) (--*(v))
+
-+struct vx_info;
++#if NR_CPUS >= CONFIG_SPLIT_PTLOCK_CPUS
++#define __acc_add_atomic(a, v) atomic_long_add(a, v)
++#define __acc_inc_atomic(v) atomic_long_inc(v)
++#define __acc_dec_atomic(v) atomic_long_dec(v)
++#else /* NR_CPUS < CONFIG_SPLIT_PTLOCK_CPUS */
++#define __acc_add_atomic(a, v) __acc_add_long(a, v)
++#define __acc_inc_atomic(v) __acc_inc_long(v)
++#define __acc_dec_atomic(v) __acc_dec_long(v)
++#endif /* NR_CPUS < CONFIG_SPLIT_PTLOCK_CPUS */
+
-+int vx_info_kill(struct vx_info *, int, int);
-+
-+#endif /* __KERNEL__ */
-+#else /* _VX_SIGNAL_H */
-+#warning duplicate inclusion
-+#endif /* _VX_SIGNAL_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/signal_cmd.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/signal_cmd.h
---- linux-2.6.22.10/include/linux/vserver/signal_cmd.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/signal_cmd.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,43 @@
-+#ifndef _VX_SIGNAL_CMD_H
-+#define _VX_SIGNAL_CMD_H
+
++#define vx_acc_page(m, d, v, r) do { \
++ if ((d) > 0) \
++ __acc_inc_long(&(m)->v); \
++ else \
++ __acc_dec_long(&(m)->v); \
++ __vx_acc_cres(m->mm_vx_info, r, d, m, __FILE__, __LINE__); \
++} while (0)
+
-+/* signalling vserver commands */
++#define vx_acc_page_atomic(m, d, v, r) do { \
++ if ((d) > 0) \
++ __acc_inc_atomic(&(m)->v); \
++ else \
++ __acc_dec_atomic(&(m)->v); \
++ __vx_acc_cres(m->mm_vx_info, r, d, m, __FILE__, __LINE__); \
++} while (0)
+
-+#define VCMD_ctx_kill VC_CMD(PROCTRL, 1, 0)
-+#define VCMD_wait_exit VC_CMD(EVENT, 99, 0)
+
-+struct vcmd_ctx_kill_v0 {
-+ int32_t pid;
-+ int32_t sig;
-+};
++#define vx_acc_pages(m, p, v, r) do { \
++ unsigned long __p = (p); \
++ __acc_add_long(__p, &(m)->v); \
++ __vx_add_cres(m->mm_vx_info, r, __p, m, __FILE__, __LINE__); \
++} while (0)
+
-+struct vcmd_wait_exit_v0 {
-+ int32_t reboot_cmd;
-+ int32_t exit_code;
-+};
++#define vx_acc_pages_atomic(m, p, v, r) do { \
++ unsigned long __p = (p); \
++ __acc_add_atomic(__p, &(m)->v); \
++ __vx_add_cres(m->mm_vx_info, r, __p, m, __FILE__, __LINE__); \
++} while (0)
+
-+#ifdef __KERNEL__
+
-+extern int vc_ctx_kill(struct vx_info *, void __user *);
-+extern int vc_wait_exit(struct vx_info *, void __user *);
+
-+#endif /* __KERNEL__ */
++#define vx_acc_vmpage(m, d) \
++ vx_acc_page(m, d, total_vm, RLIMIT_AS)
++#define vx_acc_vmlpage(m, d) \
++ vx_acc_page(m, d, locked_vm, RLIMIT_MEMLOCK)
++#define vx_acc_file_rsspage(m, d) \
++ vx_acc_page_atomic(m, d, _file_rss, VLIMIT_MAPPED)
++#define vx_acc_anon_rsspage(m, d) \
++ vx_acc_page_atomic(m, d, _anon_rss, VLIMIT_ANON)
+
-+/* process alteration commands */
++#define vx_acc_vmpages(m, p) \
++ vx_acc_pages(m, p, total_vm, RLIMIT_AS)
++#define vx_acc_vmlpages(m, p) \
++ vx_acc_pages(m, p, locked_vm, RLIMIT_MEMLOCK)
++#define vx_acc_file_rsspages(m, p) \
++ vx_acc_pages_atomic(m, p, _file_rss, VLIMIT_MAPPED)
++#define vx_acc_anon_rsspages(m, p) \
++ vx_acc_pages_atomic(m, p, _anon_rss, VLIMIT_ANON)
+
-+#define VCMD_get_pflags VC_CMD(PROCALT, 5, 0)
-+#define VCMD_set_pflags VC_CMD(PROCALT, 6, 0)
++#define vx_pages_add(s, r, p) __vx_add_cres(s, r, p, 0, __FILE__, __LINE__)
++#define vx_pages_sub(s, r, p) vx_pages_add(s, r, -(p))
+
-+struct vcmd_pflags_v0 {
-+ uint32_t flagword;
-+ uint32_t mask;
-+};
++#define vx_vmpages_inc(m) vx_acc_vmpage(m, 1)
++#define vx_vmpages_dec(m) vx_acc_vmpage(m, -1)
++#define vx_vmpages_add(m, p) vx_acc_vmpages(m, p)
++#define vx_vmpages_sub(m, p) vx_acc_vmpages(m, -(p))
+
-+#ifdef __KERNEL__
++#define vx_vmlocked_inc(m) vx_acc_vmlpage(m, 1)
++#define vx_vmlocked_dec(m) vx_acc_vmlpage(m, -1)
++#define vx_vmlocked_add(m, p) vx_acc_vmlpages(m, p)
++#define vx_vmlocked_sub(m, p) vx_acc_vmlpages(m, -(p))
+
-+extern int vc_get_pflags(uint32_t pid, void __user *);
-+extern int vc_set_pflags(uint32_t pid, void __user *);
++#define vx_file_rsspages_inc(m) vx_acc_file_rsspage(m, 1)
++#define vx_file_rsspages_dec(m) vx_acc_file_rsspage(m, -1)
++#define vx_file_rsspages_add(m, p) vx_acc_file_rsspages(m, p)
++#define vx_file_rsspages_sub(m, p) vx_acc_file_rsspages(m, -(p))
+
-+#endif /* __KERNEL__ */
-+#endif /* _VX_SIGNAL_CMD_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/space.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/space.h
---- linux-2.6.22.10/include/linux/vserver/space.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/space.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,13 @@
-+#ifndef _VX_SPACE_H
-+#define _VX_SPACE_H
++#define vx_anon_rsspages_inc(m) vx_acc_anon_rsspage(m, 1)
++#define vx_anon_rsspages_dec(m) vx_acc_anon_rsspage(m, -1)
++#define vx_anon_rsspages_add(m, p) vx_acc_anon_rsspages(m, p)
++#define vx_anon_rsspages_sub(m, p) vx_acc_anon_rsspages(m, -(p))
+
+
-+#include <linux/types.h>
++#define vx_pages_avail(m, p, r) \
++ __vx_cres_avail((m)->mm_vx_info, r, p, __FILE__, __LINE__)
+
-+struct vx_info;
++#define vx_vmpages_avail(m, p) vx_pages_avail(m, p, RLIMIT_AS)
++#define vx_vmlocked_avail(m, p) vx_pages_avail(m, p, RLIMIT_MEMLOCK)
++#define vx_anon_avail(m, p) vx_pages_avail(m, p, VLIMIT_ANON)
++#define vx_mapped_avail(m, p) vx_pages_avail(m, p, VLIMIT_MAPPED)
+
-+int vx_set_space(struct vx_info *vxi, unsigned long mask);
++#define vx_rss_avail(m, p) \
++ __vx_cres_array_avail((m)->mm_vx_info, VLA_RSS, p, __FILE__, __LINE__)
+
-+#else /* _VX_SPACE_H */
-+#warning duplicate inclusion
-+#endif /* _VX_SPACE_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/space_cmd.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/space_cmd.h
---- linux-2.6.22.10/include/linux/vserver/space_cmd.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/space_cmd.h 2007-08-05 20:53:13 +0200
-@@ -0,0 +1,26 @@
-+#ifndef _VX_SPACE_CMD_H
-+#define _VX_SPACE_CMD_H
+
++enum {
++ VXPT_UNKNOWN = 0,
++ VXPT_ANON,
++ VXPT_NONE,
++ VXPT_FILE,
++ VXPT_SWAP,
++ VXPT_WRITE
++};
+
-+#define VCMD_enter_space_v0 VC_CMD(PROCALT, 1, 0)
-+#define VCMD_enter_space VC_CMD(PROCALT, 1, 1)
++#if 0
++#define vx_page_fault(mm, vma, type, ret)
++#else
+
-+#define VCMD_set_space_v0 VC_CMD(PROCALT, 3, 0)
-+#define VCMD_set_space VC_CMD(PROCALT, 3, 1)
++static inline
++void __vx_page_fault(struct mm_struct *mm,
++ struct vm_area_struct *vma, int type, int ret)
++{
++ struct vx_info *vxi = mm->mm_vx_info;
++ int what;
++/*
++ static char *page_type[6] =
++ { "UNKNOWN", "ANON", "NONE", "FILE", "SWAP", "WRITE" };
++ static char *page_what[4] =
++ { "FAULT_OOM", "FAULT_SIGBUS", "FAULT_MINOR", "FAULT_MAJOR" };
++*/
+
-+#define VCMD_get_space_mask VC_CMD(PROCALT, 4, 0)
++ if (!vxi)
++ return;
+
++ what = (ret & 0x3);
+
-+struct vcmd_space_mask {
-+ uint64_t mask;
-+};
++/* printk("[%d] page[%d][%d] %2x %s %s\n", vxi->vx_id,
++ type, what, ret, page_type[type], page_what[what]);
++*/
++ if (ret & VM_FAULT_WRITE)
++ what |= 0x4;
++ atomic_inc(&vxi->cacct.page[type][what]);
++}
+
++#define vx_page_fault(mm, vma, type, ret) __vx_page_fault(mm, vma, type, ret)
++#endif
+
-+#ifdef __KERNEL__
+
-+extern int vc_enter_space(struct vx_info *, void __user *);
-+extern int vc_set_space(struct vx_info *, void __user *);
-+extern int vc_get_space_mask(struct vx_info *, void __user *);
++extern unsigned long vx_badness(struct task_struct *task, struct mm_struct *mm);
+
-+#endif /* __KERNEL__ */
-+#endif /* _VX_SPACE_CMD_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/switch.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/switch.h
---- linux-2.6.22.10/include/linux/vserver/switch.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/switch.h 2007-10-11 01:10:22 +0200
-@@ -0,0 +1,99 @@
-+#ifndef _VX_SWITCH_H
-+#define _VX_SWITCH_H
++#else
++#warning duplicate inclusion
++#endif
+diff -Nurp linux-2.6.22.18/include/linux/vs_network.h linux-2.6.22.18-vs2.3.0.32/include/linux/vs_network.h
+--- linux-2.6.22.18/include/linux/vs_network.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vs_network.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,166 @@
++#ifndef _NX_VS_NETWORK_H
++#define _NX_VS_NETWORK_H
+
-+#include <linux/types.h>
++#include "vserver/context.h"
++#include "vserver/network.h"
++#include "vserver/base.h"
++#include "vserver/debug.h"
+
+
-+#define VC_CATEGORY(c) (((c) >> 24) & 0x3F)
-+#define VC_COMMAND(c) (((c) >> 16) & 0xFF)
-+#define VC_VERSION(c) ((c) & 0xFFF)
++#define get_nx_info(i) __get_nx_info(i, __FILE__, __LINE__)
+
-+#define VC_CMD(c, i, v) ((((VC_CAT_ ## c) & 0x3F) << 24) \
-+ | (((i) & 0xFF) << 16) | ((v) & 0xFFF))
++static inline struct nx_info *__get_nx_info(struct nx_info *nxi,
++ const char *_file, int _line)
++{
++ if (!nxi)
++ return NULL;
+
-+/*
++ vxlprintk(VXD_CBIT(nid, 2), "get_nx_info(%p[#%d.%d])",
++ nxi, nxi ? nxi->nx_id : 0,
++ nxi ? atomic_read(&nxi->nx_usecnt) : 0,
++ _file, _line);
+
-+ Syscall Matrix V2.8
++ atomic_inc(&nxi->nx_usecnt);
++ return nxi;
++}
+
-+ |VERSION|CREATE |MODIFY |MIGRATE|CONTROL|EXPERIM| |SPECIAL|SPECIAL|
-+ |STATS |DESTROY|ALTER |CHANGE |LIMIT |TEST | | | |
-+ |INFO |SETUP | |MOVE | | | | | |
-+ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
-+ SYSTEM |VERSION|VSETUP |VHOST | | | | |DEVICE | |
-+ HOST | 00| 01| 02| 03| 04| 05| | 06| 07|
-+ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
-+ CPU | |VPROC |PROCALT|PROCMIG|PROCTRL| | |SCHED. | |
-+ PROCESS| 08| 09| 10| 11| 12| 13| | 14| 15|
-+ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
-+ MEMORY | | | | |MEMCTRL| | |SWAP | |
-+ | 16| 17| 18| 19| 20| 21| | 22| 23|
-+ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
-+ NETWORK| |VNET |NETALT |NETMIG |NETCTL | | |SERIAL | |
-+ | 24| 25| 26| 27| 28| 29| | 30| 31|
-+ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
-+ DISK | | | |TAGMIG |DLIMIT | | |INODE | |
-+ VFS | 32| 33| 34| 35| 36| 37| | 38| 39|
-+ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
-+ OTHER |VSTAT | | | | | | |VINFO | |
-+ | 40| 41| 42| 43| 44| 45| | 46| 47|
-+ =======+=======+=======+=======+=======+=======+=======+ +=======+=======+
-+ SPECIAL|EVENT | | | |FLAGS | | | | |
-+ | 48| 49| 50| 51| 52| 53| | 54| 55|
-+ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
-+ SPECIAL|DEBUG | | | |RLIMIT |SYSCALL| | |COMPAT |
-+ | 56| 57| 58| 59| 60|TEST 61| | 62| 63|
-+ -------+-------+-------+-------+-------+-------+-------+ +-------+-------+
+
-+*/
++extern void free_nx_info(struct nx_info *);
+
-+#define VC_CAT_VERSION 0
++#define put_nx_info(i) __put_nx_info(i, __FILE__, __LINE__)
+
-+#define VC_CAT_VSETUP 1
-+#define VC_CAT_VHOST 2
++static inline void __put_nx_info(struct nx_info *nxi, const char *_file, int _line)
++{
++ if (!nxi)
++ return;
+
-+#define VC_CAT_DEVICE 6
++ vxlprintk(VXD_CBIT(nid, 2), "put_nx_info(%p[#%d.%d])",
++ nxi, nxi ? nxi->nx_id : 0,
++ nxi ? atomic_read(&nxi->nx_usecnt) : 0,
++ _file, _line);
+
-+#define VC_CAT_VPROC 9
-+#define VC_CAT_PROCALT 10
-+#define VC_CAT_PROCMIG 11
-+#define VC_CAT_PROCTRL 12
++ if (atomic_dec_and_test(&nxi->nx_usecnt))
++ free_nx_info(nxi);
++}
+
-+#define VC_CAT_SCHED 14
-+#define VC_CAT_MEMCTRL 20
+
-+#define VC_CAT_VNET 25
-+#define VC_CAT_NETALT 26
-+#define VC_CAT_NETMIG 27
-+#define VC_CAT_NETCTRL 28
++#define init_nx_info(p, i) __init_nx_info(p, i, __FILE__, __LINE__)
+
-+#define VC_CAT_TAGMIG 35
-+#define VC_CAT_DLIMIT 36
-+#define VC_CAT_INODE 38
++static inline void __init_nx_info(struct nx_info **nxp, struct nx_info *nxi,
++ const char *_file, int _line)
++{
++ if (nxi) {
++ vxlprintk(VXD_CBIT(nid, 3),
++ "init_nx_info(%p[#%d.%d])",
++ nxi, nxi ? nxi->nx_id : 0,
++ nxi ? atomic_read(&nxi->nx_usecnt) : 0,
++ _file, _line);
+
-+#define VC_CAT_VSTAT 40
-+#define VC_CAT_VINFO 46
-+#define VC_CAT_EVENT 48
++ atomic_inc(&nxi->nx_usecnt);
++ }
++ *nxp = nxi;
++}
+
-+#define VC_CAT_FLAGS 52
-+#define VC_CAT_DEBUG 56
-+#define VC_CAT_RLIMIT 60
+
-+#define VC_CAT_SYSTEST 61
-+#define VC_CAT_COMPAT 63
++#define set_nx_info(p, i) __set_nx_info(p, i, __FILE__, __LINE__)
+
-+/* query version */
++static inline void __set_nx_info(struct nx_info **nxp, struct nx_info *nxi,
++ const char *_file, int _line)
++{
++ struct nx_info *nxo;
+
-+#define VCMD_get_version VC_CMD(VERSION, 0, 0)
-+#define VCMD_get_vci VC_CMD(VERSION, 1, 0)
++ if (!nxi)
++ return;
+
++ vxlprintk(VXD_CBIT(nid, 3), "set_nx_info(%p[#%d.%d])",
++ nxi, nxi ? nxi->nx_id : 0,
++ nxi ? atomic_read(&nxi->nx_usecnt) : 0,
++ _file, _line);
+
-+#ifdef __KERNEL__
++ atomic_inc(&nxi->nx_usecnt);
++ nxo = xchg(nxp, nxi);
++ BUG_ON(nxo);
++}
+
-+#include <linux/errno.h>
++#define clr_nx_info(p) __clr_nx_info(p, __FILE__, __LINE__)
+
++static inline void __clr_nx_info(struct nx_info **nxp,
++ const char *_file, int _line)
++{
++ struct nx_info *nxo;
+
-+#else /* __KERNEL__ */
-+#define __user
-+#endif /* __KERNEL__ */
++ nxo = xchg(nxp, NULL);
++ if (!nxo)
++ return;
+
-+#endif /* _VX_SWITCH_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/tag.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/tag.h
---- linux-2.6.22.10/include/linux/vserver/tag.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/tag.h 2007-10-10 19:05:04 +0200
-@@ -0,0 +1,143 @@
-+#ifndef _DX_TAG_H
-+#define _DX_TAG_H
++ vxlprintk(VXD_CBIT(nid, 3), "clr_nx_info(%p[#%d.%d])",
++ nxo, nxo ? nxo->nx_id : 0,
++ nxo ? atomic_read(&nxo->nx_usecnt) : 0,
++ _file, _line);
+
-+#include <linux/types.h>
++ if (atomic_dec_and_test(&nxo->nx_usecnt))
++ free_nx_info(nxo);
++}
+
+
-+#define DX_TAG(in) (IS_TAGGED(in))
++#define claim_nx_info(v, p) __claim_nx_info(v, p, __FILE__, __LINE__)
+
++static inline void __claim_nx_info(struct nx_info *nxi,
++ struct task_struct *task, const char *_file, int _line)
++{
++ vxlprintk(VXD_CBIT(nid, 3), "claim_nx_info(%p[#%d.%d.%d]) %p",
++ nxi, nxi ? nxi->nx_id : 0,
++ nxi?atomic_read(&nxi->nx_usecnt):0,
++ nxi?atomic_read(&nxi->nx_tasks):0,
++ task, _file, _line);
+
-+#ifdef CONFIG_DX_TAG_NFSD
-+#define DX_TAG_NFSD 1
-+#else
-+#define DX_TAG_NFSD 0
-+#endif
++ atomic_inc(&nxi->nx_tasks);
++}
+
+
-+#ifdef CONFIG_TAGGING_NONE
++extern void unhash_nx_info(struct nx_info *);
+
-+#define MAX_UID 0xFFFFFFFF
-+#define MAX_GID 0xFFFFFFFF
++#define release_nx_info(v, p) __release_nx_info(v, p, __FILE__, __LINE__)
+
-+#define INOTAG_TAG(cond, uid, gid, tag) (0)
++static inline void __release_nx_info(struct nx_info *nxi,
++ struct task_struct *task, const char *_file, int _line)
++{
++ vxlprintk(VXD_CBIT(nid, 3), "release_nx_info(%p[#%d.%d.%d]) %p",
++ nxi, nxi ? nxi->nx_id : 0,
++ nxi ? atomic_read(&nxi->nx_usecnt) : 0,
++ nxi ? atomic_read(&nxi->nx_tasks) : 0,
++ task, _file, _line);
+
-+#define TAGINO_UID(cond, uid, tag) (uid)
-+#define TAGINO_GID(cond, gid, tag) (gid)
++ might_sleep();
+
-+#endif
++ if (atomic_dec_and_test(&nxi->nx_tasks))
++ unhash_nx_info(nxi);
++}
+
+
-+#ifdef CONFIG_TAGGING_GID16
++#define task_get_nx_info(i) __task_get_nx_info(i, __FILE__, __LINE__)
+
-+#define MAX_UID 0xFFFFFFFF
-+#define MAX_GID 0x0000FFFF
++static __inline__ struct nx_info *__task_get_nx_info(struct task_struct *p,
++ const char *_file, int _line)
++{
++ struct nx_info *nxi;
+
-+#define INOTAG_TAG(cond, uid, gid, tag) \
-+ ((cond) ? (((gid) >> 16) & 0xFFFF) : 0)
++ task_lock(p);
++ vxlprintk(VXD_CBIT(nid, 5), "task_get_nx_info(%p)",
++ p, _file, _line);
++ nxi = __get_nx_info(p->nx_info, _file, _line);
++ task_unlock(p);
++ return nxi;
++}
+
-+#define TAGINO_UID(cond, uid, tag) (uid)
-+#define TAGINO_GID(cond, gid, tag) \
-+ ((cond) ? (((gid) & 0xFFFF) | ((tag) << 16)) : (gid))
+
++static inline void exit_nx_info(struct task_struct *p)
++{
++ if (p->nx_info)
++ release_nx_info(p->nx_info, p);
++}
++
++
++#else
++#warning duplicate inclusion
+#endif
+diff -Nurp linux-2.6.22.18/include/linux/vs_pid.h linux-2.6.22.18-vs2.3.0.32/include/linux/vs_pid.h
+--- linux-2.6.22.18/include/linux/vs_pid.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vs_pid.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,133 @@
++#ifndef _VS_PID_H
++#define _VS_PID_H
+
++#include "vserver/base.h"
++#include "vserver/context.h"
++#include "vserver/debug.h"
++#include <linux/pid_namespace.h>
+
-+#ifdef CONFIG_TAGGING_ID24
+
-+#define MAX_UID 0x00FFFFFF
-+#define MAX_GID 0x00FFFFFF
++/* pid faking stuff */
+
-+#define INOTAG_TAG(cond, uid, gid, tag) \
-+ ((cond) ? ((((uid) >> 16) & 0xFF00) | (((gid) >> 24) & 0xFF)) : 0)
+
-+#define TAGINO_UID(cond, uid, tag) \
-+ ((cond) ? (((uid) & 0xFFFFFF) | (((tag) & 0xFF00) << 16)) : (uid))
-+#define TAGINO_GID(cond, gid, tag) \
-+ ((cond) ? (((gid) & 0xFFFFFF) | (((tag) & 0x00FF) << 24)) : (gid))
++#define vx_info_map_pid(v, p) \
++ __vx_info_map_pid((v), (p), __FUNC__, __FILE__, __LINE__)
++#define vx_info_map_tgid(v,p) vx_info_map_pid(v,p)
++#define vx_map_pid(p) vx_info_map_pid(current->vx_info, p)
++#define vx_map_tgid(p) vx_map_pid(p)
+
-+#endif
++static inline int __vx_info_map_pid(struct vx_info *vxi, int pid,
++ const char *func, const char *file, int line)
++{
++ if (vx_info_flags(vxi, VXF_INFO_INIT, 0)) {
++ vxfprintk(VXD_CBIT(cvirt, 2),
++ "vx_map_tgid: %p/%llx: %d -> %d",
++ vxi, (long long)vxi->vx_flags, pid,
++ (pid && pid == vxi->vx_initpid) ? 1 : pid,
++ func, file, line);
++ if (pid == 0)
++ return 0;
++ if (pid == vxi->vx_initpid)
++ return 1;
++ }
++ return pid;
++}
+
++#define vx_info_rmap_pid(v, p) \
++ __vx_info_rmap_pid((v), (p), __FUNC__, __FILE__, __LINE__)
++#define vx_rmap_pid(p) vx_info_rmap_pid(current->vx_info, p)
++#define vx_rmap_tgid(p) vx_rmap_pid(p)
+
-+#ifdef CONFIG_TAGGING_UID16
++static inline int __vx_info_rmap_pid(struct vx_info *vxi, int pid,
++ const char *func, const char *file, int line)
++{
++ if (vx_info_flags(vxi, VXF_INFO_INIT, 0)) {
++ vxfprintk(VXD_CBIT(cvirt, 2),
++ "vx_rmap_tgid: %p/%llx: %d -> %d",
++ vxi, (long long)vxi->vx_flags, pid,
++ (pid == 1) ? vxi->vx_initpid : pid,
++ func, file, line);
++ if ((pid == 1) && vxi->vx_initpid)
++ return vxi->vx_initpid;
++ if (pid == vxi->vx_initpid)
++ return ~0U;
++ }
++ return pid;
++}
+
-+#define MAX_UID 0x0000FFFF
-+#define MAX_GID 0xFFFFFFFF
+
-+#define INOTAG_TAG(cond, uid, gid, tag) \
-+ ((cond) ? (((uid) >> 16) & 0xFFFF) : 0)
++#define VXF_FAKE_INIT (VXF_INFO_INIT | VXF_STATE_INIT)
+
-+#define TAGINO_UID(cond, uid, tag) \
-+ ((cond) ? (((uid) & 0xFFFF) | ((tag) << 16)) : (uid))
-+#define TAGINO_GID(cond, gid, tag) (gid)
++static inline
++int vx_proc_task_visible(struct task_struct *task)
++{
++ if ((task->pid == 1) &&
++ !vx_flags(VXF_FAKE_INIT, VXF_FAKE_INIT))
++ /* show a blend through init */
++ goto visible;
++ if (vx_check(vx_task_xid(task), VS_WATCH | VS_IDENT))
++ goto visible;
++ return 0;
++visible:
++ return 1;
++}
+
-+#endif
++static inline
++struct task_struct *vx_find_proc_task_by_pid(int pid)
++{
++ struct task_struct *task = find_task_by_pid(pid);
+
++ if (task && !vx_proc_task_visible(task)) {
++ vxdprintk(VXD_CBIT(misc, 6),
++ "dropping task (find) %p[#%u,%u] for %p[#%u,%u]",
++ task, task->xid, task->pid,
++ current, current->xid, current->pid);
++ task = NULL;
++ }
++ return task;
++}
+
-+#ifdef CONFIG_TAGGING_INTERN
++static inline
++struct task_struct *vx_get_proc_task(struct inode *inode, struct pid *pid)
++{
++ struct task_struct *task = get_pid_task(pid, PIDTYPE_PID);
+
-+#define MAX_UID 0xFFFFFFFF
-+#define MAX_GID 0xFFFFFFFF
++ if (task && !vx_proc_task_visible(task)) {
++ vxdprintk(VXD_CBIT(misc, 6),
++ "dropping task (get) %p[#%u,%u] for %p[#%u,%u]",
++ task, task->xid, task->pid,
++ current, current->xid, current->pid);
++ put_task_struct(task);
++ task = NULL;
++ }
++ return task;
++}
+
-+#define INOTAG_TAG(cond, uid, gid, tag) \
-+ ((cond) ? (tag) : 0)
+
-+#define TAGINO_UID(cond, uid, tag) (uid)
-+#define TAGINO_GID(cond, gid, tag) (gid)
++static inline
++struct task_struct *vx_child_reaper(struct task_struct *p)
++{
++ struct vx_info *vxi = p->vx_info;
++ struct task_struct *reaper = child_reaper(p);
+
-+#endif
++ if (!vxi)
++ goto out;
++
++ BUG_ON(!p->vx_info->vx_reaper);
++
++ /* child reaper for the guest reaper */
++ if (vxi->vx_reaper == p)
++ goto out;
++
++ reaper = vxi->vx_reaper;
++out:
++ vxdprintk(VXD_CBIT(xid, 7),
++ "vx_child_reaper(%p[#%u,%u]) = %p[#%u,%u]",
++ p, p->xid, p->pid, reaper, reaper->xid, reaper->pid);
++ return reaper;
++}
+
+
-+#ifndef CONFIG_TAGGING_NONE
-+#define dx_current_fstag(sb) \
-+ ((sb)->s_flags & MS_TAGGED ? dx_current_tag() : 0)
+#else
-+#define dx_current_fstag(sb) (0)
++#warning duplicate inclusion
+#endif
+diff -Nurp linux-2.6.22.18/include/linux/vs_sched.h linux-2.6.22.18-vs2.3.0.32/include/linux/vs_sched.h
+--- linux-2.6.22.18/include/linux/vs_sched.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vs_sched.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,110 @@
++#ifndef _VS_SCHED_H
++#define _VS_SCHED_H
++
++#include "vserver/base.h"
++#include "vserver/context.h"
++#include "vserver/sched.h"
++
++
++#define VAVAVOOM_RATIO 50
++
++#define MAX_PRIO_BIAS 20
++#define MIN_PRIO_BIAS -20
++
++
++#ifdef CONFIG_VSERVER_HARDCPU
++
++/*
++ * effective_prio - return the priority that is based on the static
++ * priority but is modified by bonuses/penalties.
++ *
++ * We scale the actual sleep average [0 .... MAX_SLEEP_AVG]
++ * into a -4 ... 0 ... +4 bonus/penalty range.
++ *
++ * Additionally, we scale another amount based on the number of
++ * CPU tokens currently held by the context, if the process is
++ * part of a context (and the appropriate SCHED flag is set).
++ * This ranges from -5 ... 0 ... +15, quadratically.
++ *
++ * So, the total bonus is -9 .. 0 .. +19
++ * We use ~50% of the full 0...39 priority range so that:
++ *
++ * 1) nice +19 interactive tasks do not preempt nice 0 CPU hogs.
++ * 2) nice -20 CPU hogs do not get preempted by nice 0 tasks.
++ * unless that context is far exceeding its CPU allocation.
++ *
++ * Both properties are important to certain workloads.
++ */
++static inline
++int vx_effective_vavavoom(struct _vx_sched_pc *sched_pc, int max_prio)
++{
++ int vavavoom, max;
++
++ /* lots of tokens = lots of vavavoom
++ * no tokens = no vavavoom */
++ if ((vavavoom = sched_pc->tokens) >= 0) {
++ max = sched_pc->tokens_max;
++ vavavoom = max - vavavoom;
++ max = max * max;
++ vavavoom = max_prio * VAVAVOOM_RATIO / 100
++ * (vavavoom*vavavoom - (max >> 2)) / max;
++ return vavavoom;
++ }
++ return 0;
++}
++
++
++static inline
++int vx_adjust_prio(struct task_struct *p, int prio, int max_user)
++{
++ struct vx_info *vxi = p->vx_info;
++ struct _vx_sched_pc *sched_pc;
++
++ if (!vxi)
++ return prio;
++
++ sched_pc = &vx_cpu(vxi, sched_pc);
++ if (vx_info_flags(vxi, VXF_SCHED_PRIO, 0)) {
++ int vavavoom = vx_effective_vavavoom(sched_pc, max_user);
++
++ sched_pc->vavavoom = vavavoom;
++ prio += vavavoom;
++ }
++ prio += sched_pc->prio_bias;
++ return prio;
++}
++
++#else /* !CONFIG_VSERVER_HARDCPU */
++
++static inline
++int vx_adjust_prio(struct task_struct *p, int prio, int max_user)
++{
++ struct vx_info *vxi = p->vx_info;
++
++ if (vxi)
++ prio += vx_cpu(vxi, sched_pc).prio_bias;
++ return prio;
++}
++
++#endif /* CONFIG_VSERVER_HARDCPU */
++
++
++static inline void vx_account_user(struct vx_info *vxi,
++ cputime_t cputime, int nice)
++{
++ if (!vxi)
++ return;
++ vx_cpu(vxi, sched_pc).user_ticks += cputime;
++}
++
++static inline void vx_account_system(struct vx_info *vxi,
++ cputime_t cputime, int idle)
++{
++ if (!vxi)
++ return;
++ vx_cpu(vxi, sched_pc).sys_ticks += cputime;
++}
+
-+#ifndef CONFIG_TAGGING_INTERN
-+#define TAGINO_TAG(cond, tag) (0)
+#else
-+#define TAGINO_TAG(cond, tag) ((cond) ? (tag) : 0)
++#warning duplicate inclusion
+#endif
+diff -Nurp linux-2.6.22.18/include/linux/vs_socket.h linux-2.6.22.18-vs2.3.0.32/include/linux/vs_socket.h
+--- linux-2.6.22.18/include/linux/vs_socket.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vs_socket.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,80 @@
++#ifndef _VS_SOCKET_H
++#define _VS_SOCKET_H
+
-+#define INOTAG_UID(cond, uid, gid) \
-+ ((cond) ? ((uid) & MAX_UID) : (uid))
-+#define INOTAG_GID(cond, uid, gid) \
-+ ((cond) ? ((gid) & MAX_GID) : (gid))
++#include "vserver/debug.h"
++#include "vserver/base.h"
++#include "vserver/cacct.h"
++#include "vserver/context.h"
++#include "vserver/tag.h"
+
+
-+static inline uid_t dx_map_uid(uid_t uid)
++/* socket accounting */
++
++#include <linux/socket.h>
++
++static inline int vx_sock_type(int family)
+{
-+ if ((uid > MAX_UID) && (uid != -1))
-+ uid = -2;
-+ return (uid & MAX_UID);
++ switch (family) {
++ case PF_UNSPEC:
++ return VXA_SOCK_UNSPEC;
++ case PF_UNIX:
++ return VXA_SOCK_UNIX;
++ case PF_INET:
++ return VXA_SOCK_INET;
++ case PF_INET6:
++ return VXA_SOCK_INET6;
++ case PF_PACKET:
++ return VXA_SOCK_PACKET;
++ default:
++ return VXA_SOCK_OTHER;
++ }
+}
+
-+static inline gid_t dx_map_gid(gid_t gid)
++#define vx_acc_sock(v, f, p, s) \
++ __vx_acc_sock(v, f, p, s, __FILE__, __LINE__)
++
++static inline void __vx_acc_sock(struct vx_info *vxi,
++ int family, int pos, int size, char *file, int line)
+{
-+ if ((gid > MAX_GID) && (gid != -1))
-+ gid = -2;
-+ return (gid & MAX_GID);
++ if (vxi) {
++ int type = vx_sock_type(family);
++
++ atomic_long_inc(&vxi->cacct.sock[type][pos].count);
++ atomic_long_add(size, &vxi->cacct.sock[type][pos].total);
++ }
+}
+
-+struct peer_tag {
-+ int32_t xid;
-+ int32_t nid;
-+};
++#define vx_sock_recv(sk, s) \
++ vx_acc_sock((sk)->sk_vx_info, (sk)->sk_family, 0, s)
++#define vx_sock_send(sk, s) \
++ vx_acc_sock((sk)->sk_vx_info, (sk)->sk_family, 1, s)
++#define vx_sock_fail(sk, s) \
++ vx_acc_sock((sk)->sk_vx_info, (sk)->sk_family, 2, s)
+
-+#define dx_notagcheck(nd) \
-+ ((nd) && (nd)->mnt && ((nd)->mnt->mnt_flags & MNT_NOTAGCHECK))
+
-+int dx_parse_tag(char *string, tag_t *tag, int remove);
++#define sock_vx_init(s) do { \
++ (s)->sk_xid = 0; \
++ (s)->sk_vx_info = NULL; \
++ } while (0)
+
-+#ifdef CONFIG_PROPAGATE
++#define sock_nx_init(s) do { \
++ (s)->sk_nid = 0; \
++ (s)->sk_nx_info = NULL; \
++ } while (0)
+
-+void __dx_propagate_tag(struct nameidata *nd, struct inode *inode);
++static inline
++int vx_socket_peer_tag(struct socket *sock, int level,
++ char __user *optval, int __user *optlen, int len)
++{
++ struct peer_tag tag;
+
-+#define dx_propagate_tag(n, i) __dx_propagate_tag(n, i)
++ tag.xid = sock->sk->sk_xid;
++ tag.nid = sock->sk->sk_nid;
++ if (copy_to_user(optval, &tag, sizeof(tag)))
++ return -EFAULT;
++ return 0;
++}
+
+#else
-+#define dx_propagate_tag(n, i) do { } while (0)
++#warning duplicate inclusion
+#endif
+diff -Nurp linux-2.6.22.18/include/linux/vs_tag.h linux-2.6.22.18-vs2.3.0.32/include/linux/vs_tag.h
+--- linux-2.6.22.18/include/linux/vs_tag.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vs_tag.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,43 @@
++#ifndef _VS_TAG_H
++#define _VS_TAG_H
+
-+#endif /* _DX_TAG_H */
-diff -NurpP --minimal linux-2.6.22.10/include/linux/vserver/tag_cmd.h linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/tag_cmd.h
---- linux-2.6.22.10/include/linux/vserver/tag_cmd.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/include/linux/vserver/tag_cmd.h 2007-08-15 20:16:43 +0200
-@@ -0,0 +1,22 @@
-+#ifndef _VX_TAG_CMD_H
-+#define _VX_TAG_CMD_H
++#include <linux/vserver/tag.h>
+
++/* check conditions */
+
-+/* vinfo commands */
++#define DX_ADMIN 0x0001
++#define DX_WATCH 0x0002
++#define DX_HOSTID 0x0008
+
-+#define VCMD_task_tag VC_CMD(VINFO, 3, 0)
++#define DX_IDENT 0x0010
+
-+#ifdef __KERNEL__
-+extern int vc_task_tag(uint32_t);
++#define DX_ARG_MASK 0x0010
+
-+#endif /* __KERNEL__ */
+
-+/* context commands */
++#define dx_task_tag(t) ((t)->tag)
+
-+#define VCMD_tag_migrate VC_CMD(TAGMIG, 1, 0)
++#define dx_current_tag() dx_task_tag(current)
+
-+#ifdef __KERNEL__
-+extern int vc_tag_migrate(uint32_t);
++#define dx_check(c, m) __dx_check(dx_current_tag(), c, m)
+
-+#endif /* __KERNEL__ */
-+#endif /* _VX_TAG_CMD_H */
-diff -NurpP --minimal linux-2.6.22.10/include/net/addrconf.h linux-2.6.22.10-vs2.3.0.29/include/net/addrconf.h
---- linux-2.6.22.10/include/net/addrconf.h 2007-07-09 13:20:01 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/net/addrconf.h 2007-08-12 00:22:19 +0200
-@@ -69,10 +69,12 @@ extern struct inet6_ifaddr * ipv6_get_if
- int strict);
- extern int ipv6_get_saddr(struct dst_entry *dst,
- struct in6_addr *daddr,
-- struct in6_addr *saddr);
-+ struct in6_addr *saddr,
-+ struct nx_info *nxi);
- extern int ipv6_dev_get_saddr(struct net_device *dev,
- struct in6_addr *daddr,
-- struct in6_addr *saddr);
-+ struct in6_addr *saddr,
-+ struct nx_info *nxi);
++#define dx_weak_check(c, m) ((m) ? dx_check(c, m) : 1)
++
++
++/*
++ * check current context for ADMIN/WATCH and
++ * optionally against supplied argument
++ */
++static inline int __dx_check(tag_t cid, tag_t id, unsigned int mode)
++{
++ if (mode & DX_ARG_MASK) {
++ if ((mode & DX_IDENT) && (id == cid))
++ return 1;
++ }
++ return (((mode & DX_ADMIN) && (cid == 0)) ||
++ ((mode & DX_WATCH) && (cid == 1)) ||
++ ((mode & DX_HOSTID) && (id == 0)));
++}
++
++#else
++#warning duplicate inclusion
++#endif
+diff -Nurp linux-2.6.22.18/include/linux/vs_time.h linux-2.6.22.18-vs2.3.0.32/include/linux/vs_time.h
+--- linux-2.6.22.18/include/linux/vs_time.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/include/linux/vs_time.h 2008-02-11 12:35:36.000000000 +0100
+@@ -0,0 +1,19 @@
++#ifndef _VS_TIME_H
++#define _VS_TIME_H
++
++
++/* time faking stuff */
++
++#ifdef CONFIG_VSERVER_VTIME
++
++extern void vx_gettimeofday(struct timeval *tv);
++extern int vx_settimeofday(struct timespec *ts);
++
++#else
++#define vx_gettimeofday(t) do_gettimeofday(t)
++#define vx_settimeofday(t) do_settimeofday(t)
++#endif
++
++#else
++#warning duplicate inclusion
++#endif
+diff -Nurp linux-2.6.22.18/include/net/addrconf.h linux-2.6.22.18-vs2.3.0.32/include/net/addrconf.h
+--- linux-2.6.22.18/include/net/addrconf.h 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/net/addrconf.h 2008-02-11 12:35:36.000000000 +0100
+@@ -69,10 +69,12 @@ extern struct inet6_ifaddr * ipv6_get_if
+ int strict);
+ extern int ipv6_get_saddr(struct dst_entry *dst,
+ struct in6_addr *daddr,
+- struct in6_addr *saddr);
++ struct in6_addr *saddr,
++ struct nx_info *nxi);
+ extern int ipv6_dev_get_saddr(struct net_device *dev,
+ struct in6_addr *daddr,
+- struct in6_addr *saddr);
++ struct in6_addr *saddr,
++ struct nx_info *nxi);
extern int ipv6_get_lladdr(struct net_device *dev,
struct in6_addr *addr,
unsigned char banned_flags);
-diff -NurpP --minimal linux-2.6.22.10/include/net/af_unix.h linux-2.6.22.10-vs2.3.0.29/include/net/af_unix.h
---- linux-2.6.22.10/include/net/af_unix.h 2007-07-09 13:20:01 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/net/af_unix.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/net/af_unix.h linux-2.6.22.18-vs2.3.0.32/include/net/af_unix.h
+--- linux-2.6.22.18/include/net/af_unix.h 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/net/af_unix.h 2008-02-11 12:35:36.000000000 +0100
@@ -4,6 +4,7 @@
#include <linux/socket.h>
#include <linux/un.h>
}
#define forall_unix_sockets(i, s) \
-diff -NurpP --minimal linux-2.6.22.10/include/net/inet_timewait_sock.h linux-2.6.22.10-vs2.3.0.29/include/net/inet_timewait_sock.h
---- linux-2.6.22.10/include/net/inet_timewait_sock.h 2007-05-02 19:25:35 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/net/inet_timewait_sock.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/net/inet_timewait_sock.h linux-2.6.22.18-vs2.3.0.32/include/net/inet_timewait_sock.h
+--- linux-2.6.22.18/include/net/inet_timewait_sock.h 2007-07-21 23:58:53.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/net/inet_timewait_sock.h 2008-02-11 12:35:36.000000000 +0100
@@ -115,6 +115,10 @@ struct inet_timewait_sock {
#define tw_refcnt __tw_common.skc_refcnt
#define tw_hash __tw_common.skc_hash
volatile unsigned char tw_substate;
/* 3 bits hole, try to pack */
unsigned char tw_rcv_wscale;
-diff -NurpP --minimal linux-2.6.22.10/include/net/route.h linux-2.6.22.10-vs2.3.0.29/include/net/route.h
---- linux-2.6.22.10/include/net/route.h 2007-05-02 19:25:35 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/net/route.h 2007-09-18 03:52:05 +0200
+diff -Nurp linux-2.6.22.18/include/net/route.h linux-2.6.22.18-vs2.3.0.32/include/net/route.h
+--- linux-2.6.22.18/include/net/route.h 2007-07-21 23:58:53.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/net/route.h 2008-02-11 12:35:36.000000000 +0100
@@ -27,12 +27,16 @@
#include <net/dst.h>
#include <net/inetpeer.h>
err = __ip_route_output_key(rp, &fl);
if (err)
return err;
-diff -NurpP --minimal linux-2.6.22.10/include/net/sock.h linux-2.6.22.10-vs2.3.0.29/include/net/sock.h
---- linux-2.6.22.10/include/net/sock.h 2007-07-09 13:20:02 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/include/net/sock.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/include/net/sock.h linux-2.6.22.18-vs2.3.0.32/include/net/sock.h
+--- linux-2.6.22.18/include/net/sock.h 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/include/net/sock.h 2008-02-11 12:35:36.000000000 +0100
@@ -119,6 +119,10 @@ struct sock_common {
atomic_t skc_refcnt;
unsigned int skc_hash;
unsigned char sk_shutdown : 2,
sk_no_check : 2,
sk_userlocks : 4;
-diff -NurpP --minimal linux-2.6.22.10/init/main.c linux-2.6.22.10-vs2.3.0.29/init/main.c
---- linux-2.6.22.10/init/main.c 2007-07-09 13:20:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/init/main.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/init/main.c linux-2.6.22.18-vs2.3.0.32/init/main.c
+--- linux-2.6.22.18/init/main.c 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/init/main.c 2008-02-11 12:35:36.000000000 +0100
@@ -55,6 +55,7 @@
#include <linux/pid_namespace.h>
#include <linux/device.h>
ptr = alloc_bootmem_pages(size * nr_possible_cpus);
for_each_possible_cpu(i) {
-diff -NurpP --minimal linux-2.6.22.10/ipc/mqueue.c linux-2.6.22.10-vs2.3.0.29/ipc/mqueue.c
---- linux-2.6.22.10/ipc/mqueue.c 2007-07-09 13:20:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/ipc/mqueue.c 2007-10-01 14:57:41 +0200
+diff -Nurp linux-2.6.22.18/ipc/mqueue.c linux-2.6.22.18-vs2.3.0.32/ipc/mqueue.c
+--- linux-2.6.22.18/ipc/mqueue.c 2007-12-09 12:43:53.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/ipc/mqueue.c 2008-02-11 12:35:36.000000000 +0100
@@ -29,6 +29,8 @@
#include <linux/audit.h>
#include <linux/signal.h>
out_err:
dput(dentry);
-diff -NurpP --minimal linux-2.6.22.10/ipc/msg.c linux-2.6.22.10-vs2.3.0.29/ipc/msg.c
---- linux-2.6.22.10/ipc/msg.c 2007-02-06 03:01:55 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/ipc/msg.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/ipc/msg.c linux-2.6.22.18-vs2.3.0.32/ipc/msg.c
+--- linux-2.6.22.18/ipc/msg.c 2007-05-04 15:58:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/ipc/msg.c 2008-02-11 12:35:36.000000000 +0100
@@ -36,6 +36,7 @@
#include <linux/seq_file.h>
#include <linux/mutex.h>
msq->q_perm.security = NULL;
retval = security_msg_queue_alloc(msq);
-diff -NurpP --minimal linux-2.6.22.10/ipc/sem.c linux-2.6.22.10-vs2.3.0.29/ipc/sem.c
---- linux-2.6.22.10/ipc/sem.c 2007-07-09 13:20:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/ipc/sem.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/ipc/sem.c linux-2.6.22.18-vs2.3.0.32/ipc/sem.c
+--- linux-2.6.22.18/ipc/sem.c 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/ipc/sem.c 2008-02-11 12:35:36.000000000 +0100
@@ -82,6 +82,8 @@
#include <linux/seq_file.h>
#include <linux/mutex.h>
size = sizeof (*sma) + sma->sem_nsems * sizeof (struct sem);
security_sem_free(sma);
ipc_rcu_putref(sma);
-diff -NurpP --minimal linux-2.6.22.10/ipc/shm.c linux-2.6.22.10-vs2.3.0.29/ipc/shm.c
---- linux-2.6.22.10/ipc/shm.c 2007-10-30 01:57:14 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/ipc/shm.c 2007-10-01 14:57:41 +0200
+diff -Nurp linux-2.6.22.18/ipc/shm.c linux-2.6.22.18-vs2.3.0.32/ipc/shm.c
+--- linux-2.6.22.18/ipc/shm.c 2007-08-12 03:54:37.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/ipc/shm.c 2008-02-11 12:35:36.000000000 +0100
@@ -38,6 +38,8 @@
#include <linux/mutex.h>
#include <linux/nsproxy.h>
shm_unlock(shp);
return shp->id;
-diff -NurpP --minimal linux-2.6.22.10/ipc/util.c linux-2.6.22.10-vs2.3.0.29/ipc/util.c
---- linux-2.6.22.10/ipc/util.c 2007-07-09 13:20:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/ipc/util.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/ipc/util.c linux-2.6.22.18-vs2.3.0.32/ipc/util.c
+--- linux-2.6.22.18/ipc/util.c 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/ipc/util.c 2008-02-11 12:35:36.000000000 +0100
@@ -32,6 +32,8 @@
#include <linux/proc_fs.h>
#include <linux/audit.h>
kfree(ns);
}
#else
-diff -NurpP --minimal linux-2.6.22.10/kernel/Makefile linux-2.6.22.10-vs2.3.0.29/kernel/Makefile
---- linux-2.6.22.10/kernel/Makefile 2007-07-09 13:20:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/Makefile 2007-08-05 20:53:13 +0200
-@@ -10,6 +10,8 @@ obj-y = sched.o fork.o exec_domain.o
- kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \
- hrtimer.o rwsem.o latency.o nsproxy.o srcu.o die_notifier.o
-
-+obj-y += vserver/
-+
- obj-$(CONFIG_STACKTRACE) += stacktrace.o
- obj-y += time/
- obj-$(CONFIG_DEBUG_MUTEXES) += mutex-debug.o
-diff -NurpP --minimal linux-2.6.22.10/kernel/capability.c linux-2.6.22.10-vs2.3.0.29/kernel/capability.c
---- linux-2.6.22.10/kernel/capability.c 2007-05-02 19:25:37 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/capability.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/capability.c linux-2.6.22.18-vs2.3.0.32/kernel/capability.c
+--- linux-2.6.22.18/kernel/capability.c 2007-07-21 23:58:53.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/kernel/capability.c 2008-02-11 12:35:36.000000000 +0100
@@ -12,6 +12,7 @@
#include <linux/module.h>
#include <linux/security.h>
return __capable(current, cap);
}
EXPORT_SYMBOL(capable);
-diff -NurpP --minimal linux-2.6.22.10/kernel/compat.c linux-2.6.22.10-vs2.3.0.29/kernel/compat.c
---- linux-2.6.22.10/kernel/compat.c 2007-07-09 13:20:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/compat.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/compat.c linux-2.6.22.18-vs2.3.0.32/kernel/compat.c
+--- linux-2.6.22.18/kernel/compat.c 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/kernel/compat.c 2008-02-11 12:35:36.000000000 +0100
@@ -846,7 +846,7 @@ asmlinkage long compat_sys_time(compat_t
compat_time_t i;
struct timeval tv;
return 0;
}
-diff -NurpP --minimal linux-2.6.22.10/kernel/exit.c linux-2.6.22.10-vs2.3.0.29/kernel/exit.c
---- linux-2.6.22.10/kernel/exit.c 2007-07-09 13:20:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/exit.c 2007-10-01 18:31:46 +0200
+diff -Nurp linux-2.6.22.18/kernel/exit.c linux-2.6.22.18-vs2.3.0.32/kernel/exit.c
+--- linux-2.6.22.18/kernel/exit.c 2008-01-15 16:00:35.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/exit.c 2008-02-11 12:35:36.000000000 +0100
@@ -44,6 +44,11 @@
#include <linux/resource.h>
#include <linux/blkdev.h>
preempt_disable();
/* causes final put_task_struct in finish_task_switch(). */
tsk->state = TASK_DEAD;
-diff -NurpP --minimal linux-2.6.22.10/kernel/fork.c linux-2.6.22.10-vs2.3.0.29/kernel/fork.c
---- linux-2.6.22.10/kernel/fork.c 2007-07-09 13:20:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/fork.c 2007-10-25 17:05:55 +0200
+diff -Nurp linux-2.6.22.18/kernel/fork.c linux-2.6.22.18-vs2.3.0.32/kernel/fork.c
+--- linux-2.6.22.18/kernel/fork.c 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/kernel/fork.c 2008-02-11 12:35:36.000000000 +0100
@@ -49,6 +49,11 @@
#include <linux/delayacct.h>
#include <linux/taskstats_kern.h>
nr = pid->nr;
if (unlikely(current->ptrace)) {
trace = fork_traceflag (clone_flags);
-diff -NurpP --minimal linux-2.6.22.10/kernel/kthread.c linux-2.6.22.10-vs2.3.0.29/kernel/kthread.c
---- linux-2.6.22.10/kernel/kthread.c 2007-07-09 13:20:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/kthread.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/kthread.c linux-2.6.22.18-vs2.3.0.32/kernel/kthread.c
+--- linux-2.6.22.18/kernel/kthread.c 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/kernel/kthread.c 2008-02-11 12:35:36.000000000 +0100
@@ -96,7 +96,7 @@ static void create_kthread(struct kthrea
} else {
wait_for_completion(&create->started);
read_unlock(&tasklist_lock);
}
complete(&create->done);
-diff -NurpP --minimal linux-2.6.22.10/kernel/nsproxy.c linux-2.6.22.10-vs2.3.0.29/kernel/nsproxy.c
---- linux-2.6.22.10/kernel/nsproxy.c 2007-07-09 13:20:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/nsproxy.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/Makefile linux-2.6.22.18-vs2.3.0.32/kernel/Makefile
+--- linux-2.6.22.18/kernel/Makefile 2007-07-22 00:00:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/kernel/Makefile 2008-02-11 12:35:36.000000000 +0100
+@@ -10,6 +10,8 @@ obj-y = sched.o fork.o exec_domain.o
+ kthread.o wait.o kfifo.o sys_ni.o posix-cpu-timers.o mutex.o \
+ hrtimer.o rwsem.o latency.o nsproxy.o srcu.o die_notifier.o
+
++obj-y += vserver/
++
+ obj-$(CONFIG_STACKTRACE) += stacktrace.o
+ obj-y += time/
+ obj-$(CONFIG_DEBUG_MUTEXES) += mutex-debug.o
+diff -Nurp linux-2.6.22.18/kernel/nsproxy.c linux-2.6.22.18-vs2.3.0.32/kernel/nsproxy.c
+--- linux-2.6.22.18/kernel/nsproxy.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/kernel/nsproxy.c 2008-02-11 12:35:36.000000000 +0100
@@ -20,14 +20,11 @@
#include <linux/mnt_namespace.h>
#include <linux/utsname.h>
if (!(unshare_flags & (CLONE_NEWNS | CLONE_NEWUTS | CLONE_NEWIPC)))
return 0;
-diff -NurpP --minimal linux-2.6.22.10/kernel/pid.c linux-2.6.22.10-vs2.3.0.29/kernel/pid.c
---- linux-2.6.22.10/kernel/pid.c 2007-07-09 13:20:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/pid.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/pid.c linux-2.6.22.18-vs2.3.0.32/kernel/pid.c
+--- linux-2.6.22.18/kernel/pid.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/kernel/pid.c 2008-02-11 12:35:36.000000000 +0100
@@ -28,6 +28,7 @@
#include <linux/hash.h>
#include <linux/pid_namespace.h>
}
EXPORT_SYMBOL(find_task_by_pid_type);
-diff -NurpP --minimal linux-2.6.22.10/kernel/posix-timers.c linux-2.6.22.10-vs2.3.0.29/kernel/posix-timers.c
---- linux-2.6.22.10/kernel/posix-timers.c 2007-07-09 13:20:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/posix-timers.c 2007-10-01 15:41:45 +0200
+diff -Nurp linux-2.6.22.18/kernel/posix-timers.c linux-2.6.22.18-vs2.3.0.32/kernel/posix-timers.c
+--- linux-2.6.22.18/kernel/posix-timers.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/kernel/posix-timers.c 2008-02-11 12:35:36.000000000 +0100
@@ -47,6 +47,7 @@
#include <linux/wait.h>
#include <linux/workqueue.h>
rtn->tgid != current->tgid ||
(event->sigev_notify & ~SIGEV_THREAD_ID) != SIGEV_SIGNAL))
return NULL;
-diff -NurpP --minimal linux-2.6.22.10/kernel/printk.c linux-2.6.22.10-vs2.3.0.29/kernel/printk.c
---- linux-2.6.22.10/kernel/printk.c 2007-07-09 13:20:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/printk.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/printk.c linux-2.6.22.18-vs2.3.0.32/kernel/printk.c
+--- linux-2.6.22.18/kernel/printk.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/kernel/printk.c 2008-02-11 12:35:36.000000000 +0100
@@ -31,6 +31,7 @@
#include <linux/bootmem.h>
#include <linux/syscalls.h>
count = len;
if (count > log_buf_len)
count = log_buf_len;
-diff -NurpP --minimal linux-2.6.22.10/kernel/ptrace.c linux-2.6.22.10-vs2.3.0.29/kernel/ptrace.c
---- linux-2.6.22.10/kernel/ptrace.c 2007-07-09 13:20:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/ptrace.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/ptrace.c linux-2.6.22.18-vs2.3.0.32/kernel/ptrace.c
+--- linux-2.6.22.18/kernel/ptrace.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/kernel/ptrace.c 2008-02-11 12:35:36.000000000 +0100
@@ -19,6 +19,7 @@
#include <linux/security.h>
#include <linux/signal.h>
if (request == PTRACE_ATTACH) {
ret = ptrace_attach(child);
goto out_put_task_struct;
-diff -NurpP --minimal linux-2.6.22.10/kernel/sched.c linux-2.6.22.10-vs2.3.0.29/kernel/sched.c
---- linux-2.6.22.10/kernel/sched.c 2007-07-09 13:20:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/sched.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/sched.c linux-2.6.22.18-vs2.3.0.32/kernel/sched.c
+--- linux-2.6.22.18/kernel/sched.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/kernel/sched.c 2008-02-11 12:35:36.000000000 +0100
@@ -56,6 +56,8 @@
#include <asm/tlb.h>
__activate_task(p, task_rq(p));
resched_task(rq->curr);
}
-diff -NurpP --minimal linux-2.6.22.10/kernel/sched_hard.h linux-2.6.22.10-vs2.3.0.29/kernel/sched_hard.h
---- linux-2.6.22.10/kernel/sched_hard.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/sched_hard.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/sched_hard.h linux-2.6.22.18-vs2.3.0.32/kernel/sched_hard.h
+--- linux-2.6.22.18/kernel/sched_hard.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/sched_hard.h 2008-02-11 12:35:36.000000000 +0100
@@ -0,0 +1,324 @@
+
+#ifdef CONFIG_VSERVER_IDLELIMIT
+
+#endif /* CONFIG_VSERVER_HARDCPU */
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/sched_mon.h linux-2.6.22.10-vs2.3.0.29/kernel/sched_mon.h
---- linux-2.6.22.10/kernel/sched_mon.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/sched_mon.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/sched_mon.h linux-2.6.22.18-vs2.3.0.32/kernel/sched_mon.h
+--- linux-2.6.22.18/kernel/sched_mon.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/sched_mon.h 2008-02-11 12:35:36.000000000 +0100
@@ -0,0 +1,200 @@
+
+#include <linux/vserver/monitor.h>
+
+#endif /* CONFIG_VSERVER_MONITOR */
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/signal.c linux-2.6.22.10-vs2.3.0.29/kernel/signal.c
---- linux-2.6.22.10/kernel/signal.c 2007-10-30 01:57:15 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/signal.c 2007-09-30 14:58:01 +0200
+diff -Nurp linux-2.6.22.18/kernel/signal.c linux-2.6.22.18-vs2.3.0.32/kernel/signal.c
+--- linux-2.6.22.18/kernel/signal.c 2007-09-29 14:11:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/kernel/signal.c 2008-02-11 12:35:36.000000000 +0100
@@ -26,6 +26,8 @@
#include <linux/freezer.h>
#include <linux/pid_namespace.h>
rcu_read_unlock();
return error;
}
-@@ -1118,7 +1135,8 @@ static int kill_something_info(int sig,
+@@ -1118,7 +1135,9 @@ static int kill_something_info(int sig,
read_lock(&tasklist_lock);
for_each_process(p) {
- if (p->pid > 1 && p->tgid != current->tgid) {
+ if (vx_check(vx_task_xid(p), VS_ADMIN_P|VS_IDENT) &&
-+ p->pid > 1 && p->tgid != current->tgid) {
++ p->pid > 1 && p->tgid != current->tgid &&
++ !vx_current_initpid(p->pid)) {
int err = group_send_sig_info(sig, info, p);
++count;
if (err != -EPERM)
-@@ -1814,6 +1832,11 @@ relock:
+@@ -1128,9 +1147,9 @@ static int kill_something_info(int sig,
+ read_unlock(&tasklist_lock);
+ ret = count ? retval : -ESRCH;
+ } else if (pid < 0) {
+- ret = kill_pgrp_info(sig, info, find_pid(-pid));
++ ret = kill_pgrp_info(sig, info, find_pid(vx_rmap_pid(-pid)));
+ } else {
+- ret = kill_pid_info(sig, info, find_pid(pid));
++ ret = kill_pid_info(sig, info, find_pid(vx_rmap_pid(pid)));
+ }
+ rcu_read_unlock();
+ return ret;
+@@ -1814,6 +1833,11 @@ relock:
if (current == child_reaper(current))
continue;
if (sig_kernel_stop(signr)) {
/*
* The default action is to stop all threads in
-diff -NurpP --minimal linux-2.6.22.10/kernel/softirq.c linux-2.6.22.10-vs2.3.0.29/kernel/softirq.c
---- linux-2.6.22.10/kernel/softirq.c 2007-07-09 13:20:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/softirq.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/softirq.c linux-2.6.22.18-vs2.3.0.32/kernel/softirq.c
+--- linux-2.6.22.18/kernel/softirq.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/kernel/softirq.c 2008-02-11 12:35:36.000000000 +0100
@@ -18,6 +18,7 @@
#include <linux/rcupdate.h>
#include <linux/smp.h>
#include <asm/irq.h>
/*
-diff -NurpP --minimal linux-2.6.22.10/kernel/sys.c linux-2.6.22.10-vs2.3.0.29/kernel/sys.c
---- linux-2.6.22.10/kernel/sys.c 2007-10-30 01:57:15 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/sys.c 2007-10-30 01:21:54 +0100
-@@ -36,6 +36,7 @@
+diff -Nurp linux-2.6.22.18/kernel/sys.c linux-2.6.22.18-vs2.3.0.32/kernel/sys.c
+--- linux-2.6.22.18/kernel/sys.c 2008-01-15 16:00:35.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/sys.c 2008-02-11 12:35:37.000000000 +0100
+@@ -35,6 +35,7 @@
#include <linux/compat.h>
#include <linux/syscalls.h>
#include <linux/kprobes.h>
#include <asm/uaccess.h>
#include <asm/io.h>
-@@ -639,7 +640,10 @@ static int set_one_prio(struct task_stru
+@@ -638,7 +639,10 @@ static int set_one_prio(struct task_stru
goto out;
}
if (niceval < task_nice(p) && !can_nice(p, niceval)) {
goto out;
}
no_nice = security_task_setnice(p, niceval);
-@@ -687,6 +691,8 @@ asmlinkage long sys_setpriority(int whic
+@@ -686,6 +690,8 @@ asmlinkage long sys_setpriority(int whic
else
pgrp = task_pgrp(current);
do_each_pid_task(pgrp, PIDTYPE_PGID, p) {
error = set_one_prio(p, niceval, error);
} while_each_pid_task(pgrp, PIDTYPE_PGID, p);
break;
-@@ -695,7 +701,8 @@ asmlinkage long sys_setpriority(int whic
+@@ -694,7 +700,8 @@ asmlinkage long sys_setpriority(int whic
if (!who)
who = current->uid;
else
goto out_unlock; /* No processes for this user */
do_each_thread(g, p)
-@@ -747,6 +754,8 @@ asmlinkage long sys_getpriority(int whic
+@@ -746,6 +753,8 @@ asmlinkage long sys_getpriority(int whic
else
pgrp = task_pgrp(current);
do_each_pid_task(pgrp, PIDTYPE_PGID, p) {
niceval = 20 - task_nice(p);
if (niceval > retval)
retval = niceval;
-@@ -757,7 +766,8 @@ asmlinkage long sys_getpriority(int whic
+@@ -756,7 +765,8 @@ asmlinkage long sys_getpriority(int whic
if (!who)
who = current->uid;
else
goto out_unlock; /* No processes for this user */
do_each_thread(g, p)
-@@ -871,6 +881,9 @@ void kernel_power_off(void)
+@@ -869,6 +879,9 @@ void kernel_power_off(void)
machine_power_off();
}
EXPORT_SYMBOL_GPL(kernel_power_off);
/*
* Reboot system call: for obvious reasons only root may call it,
* and even root needs to set up some magic numbers in the registers
-@@ -901,6 +914,9 @@ asmlinkage long sys_reboot(int magic1, i
+@@ -899,6 +912,9 @@ asmlinkage long sys_reboot(int magic1, i
if ((cmd == LINUX_REBOOT_CMD_POWER_OFF) && !pm_power_off)
cmd = LINUX_REBOOT_CMD_HALT;
lock_kernel();
switch (cmd) {
case LINUX_REBOOT_CMD_RESTART:
-@@ -1080,7 +1096,7 @@ static int set_user(uid_t new_ruid, int
+@@ -1078,7 +1094,7 @@ static int set_user(uid_t new_ruid, int
{
struct user_struct *new_user;
if (!new_user)
return -EAGAIN;
-@@ -1434,15 +1450,18 @@ asmlinkage long sys_setpgid(pid_t pid, p
+@@ -1432,15 +1448,18 @@ asmlinkage long sys_setpgid(pid_t pid, p
{
struct task_struct *p;
struct task_struct *group_leader = current->group_leader;
/* From this point forward we keep holding onto the tasklist lock
* so that our parent does not change from under us. -DaveM
*/
-@@ -1476,20 +1495,20 @@ asmlinkage long sys_setpgid(pid_t pid, p
+@@ -1474,20 +1493,20 @@ asmlinkage long sys_setpgid(pid_t pid, p
if (pgid != pid) {
struct task_struct *g =
}
err = 0;
-@@ -1502,7 +1521,7 @@ out:
+@@ -1500,7 +1519,7 @@ out:
asmlinkage long sys_getpgid(pid_t pid)
{
if (!pid)
else {
int retval;
struct task_struct *p;
-@@ -1514,7 +1533,7 @@ asmlinkage long sys_getpgid(pid_t pid)
+@@ -1512,7 +1531,7 @@ asmlinkage long sys_getpgid(pid_t pid)
if (p) {
retval = security_task_getpgid(p);
if (!retval)
}
read_unlock(&tasklist_lock);
return retval;
-@@ -1865,7 +1884,7 @@ asmlinkage long sys_sethostname(char __u
+@@ -1863,7 +1882,7 @@ asmlinkage long sys_sethostname(char __u
int errno;
char tmp[__NEW_UTS_LEN];
return -EPERM;
if (len < 0 || len > __NEW_UTS_LEN)
return -EINVAL;
-@@ -1910,7 +1929,7 @@ asmlinkage long sys_setdomainname(char _
+@@ -1908,7 +1927,7 @@ asmlinkage long sys_setdomainname(char _
int errno;
char tmp[__NEW_UTS_LEN];
return -EPERM;
if (len < 0 || len > __NEW_UTS_LEN)
return -EINVAL;
-@@ -1977,7 +1996,7 @@ asmlinkage long sys_setrlimit(unsigned i
+@@ -1975,7 +1994,7 @@ asmlinkage long sys_setrlimit(unsigned i
return -EINVAL;
old_rlim = current->signal->rlim + resource;
if ((new_rlim.rlim_max > old_rlim->rlim_max) &&
return -EPERM;
if (resource == RLIMIT_NOFILE && new_rlim.rlim_max > NR_OPEN)
return -EPERM;
-diff -NurpP --minimal linux-2.6.22.10/kernel/sysctl.c linux-2.6.22.10-vs2.3.0.29/kernel/sysctl.c
---- linux-2.6.22.10/kernel/sysctl.c 2007-07-09 13:20:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/sysctl.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/sysctl.c linux-2.6.22.18-vs2.3.0.32/kernel/sysctl.c
+--- linux-2.6.22.18/kernel/sysctl.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/kernel/sysctl.c 2008-02-11 12:35:38.000000000 +0100
@@ -89,6 +89,7 @@ static int ngroups_max = NGROUPS_MAX;
#ifdef CONFIG_KMOD
extern char modprobe_path[];
#ifdef CONFIG_CHR_DEV_SG
{
.ctl_name = KERN_SG_BIG_BUFF,
-diff -NurpP --minimal linux-2.6.22.10/kernel/time.c linux-2.6.22.10-vs2.3.0.29/kernel/time.c
---- linux-2.6.22.10/kernel/time.c 2007-07-09 13:20:03 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/time.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/time.c linux-2.6.22.18-vs2.3.0.32/kernel/time.c
+--- linux-2.6.22.18/kernel/time.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/kernel/time.c 2008-02-11 12:35:38.000000000 +0100
@@ -60,7 +60,7 @@ asmlinkage long sys_time(time_t __user *
time_t i;
struct timeval tv;
tv->tv_sec = x.tv_sec;
tv->tv_nsec = x.tv_usec * NSEC_PER_USEC;
}
-diff -NurpP --minimal linux-2.6.22.10/kernel/timer.c linux-2.6.22.10-vs2.3.0.29/kernel/timer.c
---- linux-2.6.22.10/kernel/timer.c 2007-07-09 13:20:04 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/timer.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/timer.c linux-2.6.22.18-vs2.3.0.32/kernel/timer.c
+--- linux-2.6.22.18/kernel/timer.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/kernel/timer.c 2008-02-11 12:35:38.000000000 +0100
@@ -36,6 +36,10 @@
#include <linux/delay.h>
#include <linux/tick.h>
rcu_read_unlock();
+ return vx_map_pid(pid);
+}
++
++#ifdef __alpha__
- return pid;
-+#ifdef __alpha__
-+
+/*
+ * The Alpha uses getxpid, getxuid, and getxgid instead.
+ */
info->uptime = tp.tv_sec + (tp.tv_nsec ? 1 : 0);
info->loads[0] = avenrun[0] << (SI_LOAD_SHIFT - FSHIFT);
-diff -NurpP --minimal linux-2.6.22.10/kernel/user.c linux-2.6.22.10-vs2.3.0.29/kernel/user.c
---- linux-2.6.22.10/kernel/user.c 2007-02-06 03:01:56 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/user.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/user.c linux-2.6.22.18-vs2.3.0.32/kernel/user.c
+--- linux-2.6.22.18/kernel/user.c 2007-05-04 15:58:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/kernel/user.c 2008-02-11 12:35:38.000000000 +0100
@@ -23,8 +23,8 @@
#define UIDHASH_BITS (CONFIG_BASE_SMALL ? 3 : 8)
#define UIDHASH_SZ (1 << UIDHASH_BITS)
+ up = uid_hash_find(xid, uid, hashent);
if (up) {
key_put(new->uid_keyring);
- key_put(new->session_keyring);
-@@ -215,7 +216,7 @@ static int __init uid_cache_init(void)
-
- /* Insert the root user immediately (init already runs as root) */
- spin_lock_irq(&uidhash_lock);
-- uid_hash_insert(&root_user, uidhashentry(0));
-+ uid_hash_insert(&root_user, uidhashentry(0,0));
- spin_unlock_irq(&uidhash_lock);
-
- return 0;
-diff -NurpP --minimal linux-2.6.22.10/kernel/utsname.c linux-2.6.22.10-vs2.3.0.29/kernel/utsname.c
---- linux-2.6.22.10/kernel/utsname.c 2007-07-09 13:20:04 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/utsname.c 2007-08-05 20:53:13 +0200
-@@ -13,6 +13,7 @@
- #include <linux/uts.h>
- #include <linux/utsname.h>
- #include <linux/version.h>
-+#include <linux/vserver/global.h>
-
- /*
- * Clone a new ns copying an original utsname, setting refcount to 1
-@@ -27,6 +28,7 @@ static struct uts_namespace *clone_uts_n
- if (ns) {
- memcpy(&ns->name, &old_ns->name, sizeof(ns->name));
- kref_init(&ns->kref);
-+ atomic_inc(&vs_global_uts_ns);
- }
- return ns;
- }
-@@ -58,5 +60,6 @@ void free_uts_ns(struct kref *kref)
- struct uts_namespace *ns;
-
- ns = container_of(kref, struct uts_namespace, kref);
-+ atomic_dec(&vs_global_uts_ns);
- kfree(ns);
- }
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/Kconfig linux-2.6.22.10-vs2.3.0.29/kernel/vserver/Kconfig
---- linux-2.6.22.10/kernel/vserver/Kconfig 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/Kconfig 2007-10-11 01:10:22 +0200
-@@ -0,0 +1,249 @@
-+#
-+# Linux VServer configuration
-+#
-+
-+menu "Linux VServer"
-+
-+config VSERVER_AUTO_LBACK
-+ bool "Automatically Assign Loopback IP"
-+ default y
-+ help
-+ Automatically assign a guest specific loopback
-+ IP and add it to the kernel network stack on
-+ startup.
-+
-+config VSERVER_AUTO_SINGLE
-+ bool "Automatic Single IP Special Casing"
-+ depends on EXPERIMENTAL
-+ default y
-+ help
-+ This allows network contexts with a single IP to
-+ automatically remap 0.0.0.0 bindings to that IP,
-+ avoiding further network checks and improving
-+ performance.
-+
-+ (note: such guests do not allow to change the ip
-+ on the fly and do not show loopback addresses)
-+
-+config VSERVER_COWBL
-+ bool "Enable COW Immutable Link Breaking"
-+ default y
-+ help
-+ This enables the COW (Copy-On-Write) link break code.
-+ It allows you to treat unified files like normal files
-+ when writing to them (which will implicitely break the
-+ link and create a copy of the unified file)
-+
-+config VSERVER_VTIME
-+ bool "Enable Virtualized Guest Time"
-+ depends on EXPERIMENTAL
-+ default n
-+ help
-+ This enables per guest time offsets to allow for
-+ adjusting the system clock individually per guest.
-+ this adds some overhead to the time functions and
-+ therefore should not be enabled without good reason.
-+
-+config VSERVER_DEVICE
-+ bool "Enable Guest Device Mapping"
-+ depends on EXPERIMENTAL
-+ default n
-+ help
-+ This enables generic device remapping.
-+
-+config VSERVER_PROC_SECURE
-+ bool "Enable Proc Security"
-+ depends on PROC_FS
-+ default y
-+ help
-+ This configures ProcFS security to initially hide
-+ non-process entries for all contexts except the main and
-+ spectator context (i.e. for all guests), which is a secure
-+ default.
-+
-+ (note: on 1.2x the entries were visible by default)
-+
-+config VSERVER_HARDCPU
-+ bool "Enable Hard CPU Limits"
-+ default y
-+ help
-+ Activate the Hard CPU Limits
-+
-+ This will compile in code that allows the Token Bucket
-+ Scheduler to put processes on hold when a context's
-+ tokens are depleted (provided that its per-context
-+ sched_hard flag is set).
-+
-+ Processes belonging to that context will not be able
-+ to consume CPU resources again until a per-context
-+ configured minimum of tokens has been reached.
-+
-+config VSERVER_IDLETIME
-+ bool "Avoid idle CPUs by skipping Time"
-+ depends on VSERVER_HARDCPU
-+ default y
-+ help
-+ This option allows the scheduler to artificially
-+ advance time (per cpu) when otherwise the idle
-+ task would be scheduled, thus keeping the cpu
-+ busy and sharing the available resources among
-+ certain contexts.
-+
-+config VSERVER_IDLELIMIT
-+ bool "Limit the IDLE task"
-+ depends on VSERVER_HARDCPU
-+ default n
-+ help
-+ Limit the idle slices, so the the next context
-+ will be scheduled as soon as possible.
-+
-+ This might improve interactivity and latency, but
-+ will also marginally increase scheduling overhead.
-+
-+choice
-+ prompt "Persistent Inode Tagging"
-+ default TAGGING_ID24
-+ help
-+ This adds persistent context information to filesystems
-+ mounted with the tagxid option. Tagging is a requirement
-+ for per-context disk limits and per-context quota.
-+
-+
-+config TAGGING_NONE
-+ bool "Disabled"
-+ help
-+ do not store per-context information in inodes.
-+
-+config TAGGING_UID16
-+ bool "UID16/GID32"
-+ help
-+ reduces UID to 16 bit, but leaves GID at 32 bit.
-+
-+config TAGGING_GID16
-+ bool "UID32/GID16"
-+ help
-+ reduces GID to 16 bit, but leaves UID at 32 bit.
-+
-+config TAGGING_ID24
-+ bool "UID24/GID24"
-+ help
-+ uses the upper 8bit from UID and GID for XID tagging
-+ which leaves 24bit for UID/GID each, which should be
-+ more than sufficient for normal use.
-+
-+config TAGGING_INTERN
-+ bool "UID32/GID32"
-+ help
-+ this uses otherwise reserved inode fields in the on
-+ disk representation, which limits the use to a few
-+ filesystems (currently ext2 and ext3)
-+
-+endchoice
-+
-+config TAG_NFSD
-+ bool "Tag NFSD User Auth and Files"
-+ default n
-+ help
-+ Enable this if you do want the in-kernel NFS
-+ Server to use the tagging specified above.
-+ (will require patched clients too)
-+
-+config VSERVER_PRIVACY
-+ bool "Honor Privacy Aspects of Guests"
-+ default n
-+ help
-+ When enabled, most context checks will disallow
-+ access to structures assigned to a specific context,
-+ like ptys or loop devices.
-+
-+config VSERVER_CONTEXTS
-+ int "Maximum number of Contexts (1-65533)" if EMBEDDED
-+ range 1 65533
-+ default "768" if 64BIT
-+ default "256"
-+ help
-+ This setting will optimize certain data structures
-+ and memory allocations according to the expected
-+ maximum.
-+
-+ note: this is not a strict upper limit.
-+
-+config VSERVER_WARN
-+ bool "VServer Warnings"
-+ default y
-+ help
-+ This enables various runtime warnings, which will
-+ notify about potential manipulation attempts or
-+ resource shortage. It is generally considered to
-+ be a good idea to have that enabled.
-+
-+config VSERVER_DEBUG
-+ bool "VServer Debugging Code"
-+ default n
-+ help
-+ Set this to yes if you want to be able to activate
-+ debugging output at runtime. It adds a very small
-+ overhead to all vserver related functions and
-+ increases the kernel size by about 20k.
-+
-+config VSERVER_HISTORY
-+ bool "VServer History Tracing"
-+ depends on VSERVER_DEBUG
-+ default n
-+ help
-+ Set this to yes if you want to record the history of
-+ linux-vserver activities, so they can be replayed in
-+ the event of a kernel panic or oops.
-+
-+config VSERVER_HISTORY_SIZE
-+ int "Per-CPU History Size (32-65536)"
-+ depends on VSERVER_HISTORY
-+ range 32 65536
-+ default 64
-+ help
-+ This allows you to specify the number of entries in
-+ the per-CPU history buffer.
-+
-+config VSERVER_MONITOR
-+ bool "VServer Scheduling Monitor"
-+ depends on VSERVER_DEBUG
-+ default n
-+ help
-+ Set this to yes if you want to record the scheduling
-+ decisions, so that they can be relayed to userspace
-+ for detailed analysis.
-+
-+config VSERVER_MONITOR_SIZE
-+ int "Per-CPU Monitor Queue Size (32-65536)"
-+ depends on VSERVER_MONITOR
-+ range 32 65536
-+ default 1024
-+ help
-+ This allows you to specify the number of entries in
-+ the per-CPU scheduling monitor buffer.
-+
-+config VSERVER_MONITOR_SYNC
-+ int "Per-CPU Monitor Sync Interval (0-65536)"
-+ depends on VSERVER_MONITOR
-+ range 0 65536
-+ default 256
-+ help
-+ This allows you to specify the interval in ticks
-+ when a time sync entry is inserted.
-+
-+endmenu
-+
-+
-+config VSERVER
-+ bool
-+ default y
-+ select UTS_NS
-+ select SYSVIPC
-+ select IPC_NS
-+
-+config VSERVER_SECURITY
-+ bool
-+ depends on SECURITY
-+ default y
-+ select SECURITY_CAPABILITIES
-+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/Makefile linux-2.6.22.10-vs2.3.0.29/kernel/vserver/Makefile
---- linux-2.6.22.10/kernel/vserver/Makefile 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/Makefile 2007-10-11 01:10:22 +0200
-@@ -0,0 +1,18 @@
-+#
-+# Makefile for the Linux vserver routines.
-+#
-+
-+
-+obj-y += vserver.o
-+
-+vserver-y := switch.o context.o space.o sched.o network.o inode.o \
-+ limit.o cvirt.o cacct.o signal.o helper.o init.o \
-+ dlimit.o tag.o
-+
-+vserver-$(CONFIG_INET) += inet.o
-+vserver-$(CONFIG_PROC_FS) += proc.o
-+vserver-$(CONFIG_VSERVER_DEBUG) += sysctl.o debug.o
-+vserver-$(CONFIG_VSERVER_HISTORY) += history.o
-+vserver-$(CONFIG_VSERVER_MONITOR) += monitor.o
-+vserver-$(CONFIG_VSERVER_DEVICE) += device.o
-+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/cacct.c linux-2.6.22.10-vs2.3.0.29/kernel/vserver/cacct.c
---- linux-2.6.22.10/kernel/vserver/cacct.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/cacct.c 2007-08-15 21:54:31 +0200
+ key_put(new->session_keyring);
+@@ -215,7 +216,7 @@ static int __init uid_cache_init(void)
+
+ /* Insert the root user immediately (init already runs as root) */
+ spin_lock_irq(&uidhash_lock);
+- uid_hash_insert(&root_user, uidhashentry(0));
++ uid_hash_insert(&root_user, uidhashentry(0,0));
+ spin_unlock_irq(&uidhash_lock);
+
+ return 0;
+diff -Nurp linux-2.6.22.18/kernel/utsname.c linux-2.6.22.18-vs2.3.0.32/kernel/utsname.c
+--- linux-2.6.22.18/kernel/utsname.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/kernel/utsname.c 2008-02-11 12:35:38.000000000 +0100
+@@ -13,6 +13,7 @@
+ #include <linux/uts.h>
+ #include <linux/utsname.h>
+ #include <linux/version.h>
++#include <linux/vserver/global.h>
+
+ /*
+ * Clone a new ns copying an original utsname, setting refcount to 1
+@@ -27,6 +28,7 @@ static struct uts_namespace *clone_uts_n
+ if (ns) {
+ memcpy(&ns->name, &old_ns->name, sizeof(ns->name));
+ kref_init(&ns->kref);
++ atomic_inc(&vs_global_uts_ns);
+ }
+ return ns;
+ }
+@@ -58,5 +60,6 @@ void free_uts_ns(struct kref *kref)
+ struct uts_namespace *ns;
+
+ ns = container_of(kref, struct uts_namespace, kref);
++ atomic_dec(&vs_global_uts_ns);
+ kfree(ns);
+ }
+diff -Nurp linux-2.6.22.18/kernel/vserver/cacct.c linux-2.6.22.18-vs2.3.0.32/kernel/vserver/cacct.c
+--- linux-2.6.22.18/kernel/vserver/cacct.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/cacct.c 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,42 @@
+/*
+ * linux/kernel/vserver/cacct.c
+ return 0;
+}
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/cacct_init.h linux-2.6.22.10-vs2.3.0.29/kernel/vserver/cacct_init.h
---- linux-2.6.22.10/kernel/vserver/cacct_init.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/cacct_init.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/cacct_init.h linux-2.6.22.18-vs2.3.0.32/kernel/vserver/cacct_init.h
+--- linux-2.6.22.18/kernel/vserver/cacct_init.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/cacct_init.h 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,25 @@
+
+
+ return;
+}
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/cacct_proc.h linux-2.6.22.10-vs2.3.0.29/kernel/vserver/cacct_proc.h
---- linux-2.6.22.10/kernel/vserver/cacct_proc.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/cacct_proc.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/cacct_proc.h linux-2.6.22.18-vs2.3.0.32/kernel/vserver/cacct_proc.h
+--- linux-2.6.22.18/kernel/vserver/cacct_proc.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/cacct_proc.h 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,53 @@
+#ifndef _VX_CACCT_PROC_H
+#define _VX_CACCT_PROC_H
+}
+
+#endif /* _VX_CACCT_PROC_H */
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/context.c linux-2.6.22.10-vs2.3.0.29/kernel/vserver/context.c
---- linux-2.6.22.10/kernel/vserver/context.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/context.c 2007-10-05 14:54:36 +0200
-@@ -0,0 +1,966 @@
+diff -Nurp linux-2.6.22.18/kernel/vserver/context.c linux-2.6.22.18-vs2.3.0.32/kernel/vserver/context.c
+--- linux-2.6.22.18/kernel/vserver/context.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/context.c 2008-02-11 12:35:38.000000000 +0100
+@@ -0,0 +1,964 @@
+/*
+ * linux/kernel/vserver/context.c
+ *
+ new->reboot_cmd = 0;
+ new->exit_code = 0;
+
-+ new->vx_nsproxy = copy_nsproxy(current->nsproxy);
-+
+ vxdprintk(VXD_CBIT(xid, 0),
+ "alloc_vx_info(%d) = %p", xid, new);
+ vxh_alloc_vx_info(new);
+
+EXPORT_SYMBOL_GPL(free_vx_info);
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/cvirt.c linux-2.6.22.10-vs2.3.0.29/kernel/vserver/cvirt.c
---- linux-2.6.22.10/kernel/vserver/cvirt.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/cvirt.c 2007-08-15 22:00:34 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/cvirt.c linux-2.6.22.18-vs2.3.0.32/kernel/vserver/cvirt.c
+--- linux-2.6.22.18/kernel/vserver/cvirt.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/cvirt.c 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,300 @@
+/*
+ * linux/kernel/vserver/cvirt.c
+
+#endif
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/cvirt_init.h linux-2.6.22.10-vs2.3.0.29/kernel/vserver/cvirt_init.h
---- linux-2.6.22.10/kernel/vserver/cvirt_init.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/cvirt_init.h 2007-10-25 17:05:55 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/cvirt_init.h linux-2.6.22.18-vs2.3.0.32/kernel/vserver/cvirt_init.h
+--- linux-2.6.22.18/kernel/vserver/cvirt_init.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/cvirt_init.h 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,69 @@
+
+
+ return;
+}
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/cvirt_proc.h linux-2.6.22.10-vs2.3.0.29/kernel/vserver/cvirt_proc.h
---- linux-2.6.22.10/kernel/vserver/cvirt_proc.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/cvirt_proc.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/cvirt_proc.h linux-2.6.22.18-vs2.3.0.32/kernel/vserver/cvirt_proc.h
+--- linux-2.6.22.18/kernel/vserver/cvirt_proc.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/cvirt_proc.h 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,133 @@
+#ifndef _VX_CVIRT_PROC_H
+#define _VX_CVIRT_PROC_H
+}
+
+#endif /* _VX_CVIRT_PROC_H */
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/debug.c linux-2.6.22.10-vs2.3.0.29/kernel/vserver/debug.c
---- linux-2.6.22.10/kernel/vserver/debug.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/debug.c 2007-10-01 14:57:41 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/debug.c linux-2.6.22.18-vs2.3.0.32/kernel/vserver/debug.c
+--- linux-2.6.22.18/kernel/vserver/debug.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/debug.c 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,32 @@
+/*
+ * kernel/vserver/debug.c
+
+EXPORT_SYMBOL_GPL(dump_vx_info);
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/device.c linux-2.6.22.10-vs2.3.0.29/kernel/vserver/device.c
---- linux-2.6.22.10/kernel/vserver/device.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/device.c 2007-10-11 01:10:22 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/device.c linux-2.6.22.18-vs2.3.0.32/kernel/vserver/device.c
+--- linux-2.6.22.18/kernel/vserver/device.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/device.c 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,443 @@
+/*
+ * linux/kernel/vserver/device.c
+#endif /* CONFIG_COMPAT */
+
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/dlimit.c linux-2.6.22.10-vs2.3.0.29/kernel/vserver/dlimit.c
---- linux-2.6.22.10/kernel/vserver/dlimit.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/dlimit.c 2007-08-15 22:07:58 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/dlimit.c linux-2.6.22.18-vs2.3.0.32/kernel/vserver/dlimit.c
+--- linux-2.6.22.18/kernel/vserver/dlimit.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/dlimit.c 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,520 @@
+/*
+ * linux/kernel/vserver/dlimit.c
+EXPORT_SYMBOL_GPL(locate_dl_info);
+EXPORT_SYMBOL_GPL(rcu_free_dl_info);
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/helper.c linux-2.6.22.10-vs2.3.0.29/kernel/vserver/helper.c
---- linux-2.6.22.10/kernel/vserver/helper.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/helper.c 2007-08-15 22:12:01 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/helper.c linux-2.6.22.18-vs2.3.0.32/kernel/vserver/helper.c
+--- linux-2.6.22.18/kernel/vserver/helper.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/helper.c 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,199 @@
+/*
+ * linux/kernel/vserver/helper.c
+ return do_vshelper(vshelper_path, argv, envp, 1);
+}
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/history.c linux-2.6.22.10-vs2.3.0.29/kernel/vserver/history.c
---- linux-2.6.22.10/kernel/vserver/history.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/history.c 2007-08-15 22:13:54 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/history.c linux-2.6.22.18-vs2.3.0.32/kernel/vserver/history.c
+--- linux-2.6.22.18/kernel/vserver/history.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/history.c 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,258 @@
+/*
+ * kernel/vserver/history.c
+
+#endif /* CONFIG_COMPAT */
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/inet.c linux-2.6.22.10-vs2.3.0.29/kernel/vserver/inet.c
---- linux-2.6.22.10/kernel/vserver/inet.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/inet.c 2007-10-10 23:55:30 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/inet.c linux-2.6.22.18-vs2.3.0.32/kernel/vserver/inet.c
+--- linux-2.6.22.18/kernel/vserver/inet.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/inet.c 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,222 @@
+
+#include <linux/in.h>
+
+EXPORT_SYMBOL_GPL(ip_v4_find_src);
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/init.c linux-2.6.22.10-vs2.3.0.29/kernel/vserver/init.c
---- linux-2.6.22.10/kernel/vserver/init.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/init.c 2007-08-15 22:15:36 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/init.c linux-2.6.22.18-vs2.3.0.32/kernel/vserver/init.c
+--- linux-2.6.22.18/kernel/vserver/init.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/init.c 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,45 @@
+/*
+ * linux/kernel/init.c
+module_init(init_vserver);
+module_exit(exit_vserver);
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/inode.c linux-2.6.22.10-vs2.3.0.29/kernel/vserver/inode.c
---- linux-2.6.22.10/kernel/vserver/inode.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/inode.c 2007-09-11 17:57:41 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/inode.c linux-2.6.22.18-vs2.3.0.32/kernel/vserver/inode.c
+--- linux-2.6.22.18/kernel/vserver/inode.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/inode.c 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,409 @@
+/*
+ * linux/kernel/vserver/inode.c
+};
+
+
-+static void __dx_parse_remove(char *string, char *opt)
-+{
-+ char *p = strstr(string, opt);
-+ char *q = p;
++static void __dx_parse_remove(char *string, char *opt)
++{
++ char *p = strstr(string, opt);
++ char *q = p;
++
++ if (p) {
++ while (*q != '\0' && *q != ',')
++ q++;
++ while (*q)
++ *p++ = *q++;
++ while (*p)
++ *p++ = '\0';
++ }
++}
++
++static inline
++int __dx_parse_tag(char *string, tag_t *tag, int remove)
++{
++ substring_t args[MAX_OPT_ARGS];
++ int token, option = 0;
++
++ if (!string)
++ return 0;
++
++ token = match_token(string, tokens, args);
++
++ vxdprintk(VXD_CBIT(tag, 7),
++ "dx_parse_tag(»%s«): %d:#%d",
++ string, token, option);
++
++ switch (token) {
++ case Opt_tag:
++ if (tag)
++ *tag = 0;
++ if (remove)
++ __dx_parse_remove(string, "tag");
++ return MNT_TAGID;
++ case Opt_notag:
++ if (remove)
++ __dx_parse_remove(string, "notag");
++ return MNT_NOTAG;
++ case Opt_notagcheck:
++ if (remove)
++ __dx_parse_remove(string, "notagcheck");
++ return MNT_NOTAGCHECK;
++ case Opt_tagid:
++ if (tag && !match_int(args, &option))
++ *tag = option;
++ if (remove)
++ __dx_parse_remove(string, "tagid");
++ return MNT_TAGID;
++ }
++ return 0;
++}
++
++int dx_parse_tag(char *string, tag_t *tag, int remove)
++{
++ int retval, flags = 0;
++
++ while ((retval = __dx_parse_tag(string, tag, remove)))
++ flags |= retval;
++ return flags;
++}
++
++#ifdef CONFIG_PROPAGATE
++
++void __dx_propagate_tag(struct nameidata *nd, struct inode *inode)
++{
++ tag_t new_tag = 0;
++ struct vfsmount *mnt;
++ int propagate;
++
++ if (!nd)
++ return;
++ mnt = nd->mnt;
++ if (!mnt)
++ return;
++
++ propagate = (mnt->mnt_flags & MNT_TAGID);
++ if (propagate)
++ new_tag = mnt->mnt_tag;
++
++ vxdprintk(VXD_CBIT(tag, 7),
++ "dx_propagate_tag(%p[#%lu.%d]): %d,%d",
++ inode, inode->i_ino, inode->i_tag,
++ new_tag, (propagate) ? 1 : 0);
++
++ if (propagate)
++ inode->i_tag = new_tag;
++}
++
++#include <linux/module.h>
++
++EXPORT_SYMBOL_GPL(__dx_propagate_tag);
++
++#endif /* CONFIG_PROPAGATE */
++
+diff -Nurp linux-2.6.22.18/kernel/vserver/Kconfig linux-2.6.22.18-vs2.3.0.32/kernel/vserver/Kconfig
+--- linux-2.6.22.18/kernel/vserver/Kconfig 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/Kconfig 2008-02-11 12:35:38.000000000 +0100
+@@ -0,0 +1,249 @@
++#
++# Linux VServer configuration
++#
++
++menu "Linux VServer"
++
++config VSERVER_AUTO_LBACK
++ bool "Automatically Assign Loopback IP"
++ default y
++ help
++ Automatically assign a guest specific loopback
++ IP and add it to the kernel network stack on
++ startup.
++
++config VSERVER_AUTO_SINGLE
++ bool "Automatic Single IP Special Casing"
++ depends on EXPERIMENTAL
++ default y
++ help
++ This allows network contexts with a single IP to
++ automatically remap 0.0.0.0 bindings to that IP,
++ avoiding further network checks and improving
++ performance.
++
++ (note: such guests do not allow to change the ip
++ on the fly and do not show loopback addresses)
++
++config VSERVER_COWBL
++ bool "Enable COW Immutable Link Breaking"
++ default y
++ help
++ This enables the COW (Copy-On-Write) link break code.
++ It allows you to treat unified files like normal files
++ when writing to them (which will implicitely break the
++ link and create a copy of the unified file)
++
++config VSERVER_VTIME
++ bool "Enable Virtualized Guest Time"
++ depends on EXPERIMENTAL
++ default n
++ help
++ This enables per guest time offsets to allow for
++ adjusting the system clock individually per guest.
++ this adds some overhead to the time functions and
++ therefore should not be enabled without good reason.
++
++config VSERVER_DEVICE
++ bool "Enable Guest Device Mapping"
++ depends on EXPERIMENTAL
++ default n
++ help
++ This enables generic device remapping.
++
++config VSERVER_PROC_SECURE
++ bool "Enable Proc Security"
++ depends on PROC_FS
++ default y
++ help
++ This configures ProcFS security to initially hide
++ non-process entries for all contexts except the main and
++ spectator context (i.e. for all guests), which is a secure
++ default.
++
++ (note: on 1.2x the entries were visible by default)
++
++config VSERVER_HARDCPU
++ bool "Enable Hard CPU Limits"
++ default y
++ help
++ Activate the Hard CPU Limits
++
++ This will compile in code that allows the Token Bucket
++ Scheduler to put processes on hold when a context's
++ tokens are depleted (provided that its per-context
++ sched_hard flag is set).
++
++ Processes belonging to that context will not be able
++ to consume CPU resources again until a per-context
++ configured minimum of tokens has been reached.
++
++config VSERVER_IDLETIME
++ bool "Avoid idle CPUs by skipping Time"
++ depends on VSERVER_HARDCPU
++ default y
++ help
++ This option allows the scheduler to artificially
++ advance time (per cpu) when otherwise the idle
++ task would be scheduled, thus keeping the cpu
++ busy and sharing the available resources among
++ certain contexts.
++
++config VSERVER_IDLELIMIT
++ bool "Limit the IDLE task"
++ depends on VSERVER_HARDCPU
++ default n
++ help
++ Limit the idle slices, so the the next context
++ will be scheduled as soon as possible.
++
++ This might improve interactivity and latency, but
++ will also marginally increase scheduling overhead.
++
++choice
++ prompt "Persistent Inode Tagging"
++ default TAGGING_ID24
++ help
++ This adds persistent context information to filesystems
++ mounted with the tagxid option. Tagging is a requirement
++ for per-context disk limits and per-context quota.
++
++
++config TAGGING_NONE
++ bool "Disabled"
++ help
++ do not store per-context information in inodes.
++
++config TAGGING_UID16
++ bool "UID16/GID32"
++ help
++ reduces UID to 16 bit, but leaves GID at 32 bit.
++
++config TAGGING_GID16
++ bool "UID32/GID16"
++ help
++ reduces GID to 16 bit, but leaves UID at 32 bit.
++
++config TAGGING_ID24
++ bool "UID24/GID24"
++ help
++ uses the upper 8bit from UID and GID for XID tagging
++ which leaves 24bit for UID/GID each, which should be
++ more than sufficient for normal use.
+
-+ if (p) {
-+ while (*q != '\0' && *q != ',')
-+ q++;
-+ while (*q)
-+ *p++ = *q++;
-+ while (*p)
-+ *p++ = '\0';
-+ }
-+}
++config TAGGING_INTERN
++ bool "UID32/GID32"
++ help
++ this uses otherwise reserved inode fields in the on
++ disk representation, which limits the use to a few
++ filesystems (currently ext2 and ext3)
+
-+static inline
-+int __dx_parse_tag(char *string, tag_t *tag, int remove)
-+{
-+ substring_t args[MAX_OPT_ARGS];
-+ int token, option = 0;
++endchoice
+
-+ if (!string)
-+ return 0;
++config TAG_NFSD
++ bool "Tag NFSD User Auth and Files"
++ default n
++ help
++ Enable this if you do want the in-kernel NFS
++ Server to use the tagging specified above.
++ (will require patched clients too)
+
-+ token = match_token(string, tokens, args);
++config VSERVER_PRIVACY
++ bool "Honor Privacy Aspects of Guests"
++ default n
++ help
++ When enabled, most context checks will disallow
++ access to structures assigned to a specific context,
++ like ptys or loop devices.
+
-+ vxdprintk(VXD_CBIT(tag, 7),
-+ "dx_parse_tag(»%s«): %d:#%d",
-+ string, token, option);
++config VSERVER_CONTEXTS
++ int "Maximum number of Contexts (1-65533)" if EMBEDDED
++ range 1 65533
++ default "768" if 64BIT
++ default "256"
++ help
++ This setting will optimize certain data structures
++ and memory allocations according to the expected
++ maximum.
+
-+ switch (token) {
-+ case Opt_tag:
-+ if (tag)
-+ *tag = 0;
-+ if (remove)
-+ __dx_parse_remove(string, "tag");
-+ return MNT_TAGID;
-+ case Opt_notag:
-+ if (remove)
-+ __dx_parse_remove(string, "notag");
-+ return MNT_NOTAG;
-+ case Opt_notagcheck:
-+ if (remove)
-+ __dx_parse_remove(string, "notagcheck");
-+ return MNT_NOTAGCHECK;
-+ case Opt_tagid:
-+ if (tag && !match_int(args, &option))
-+ *tag = option;
-+ if (remove)
-+ __dx_parse_remove(string, "tagid");
-+ return MNT_TAGID;
-+ }
-+ return 0;
-+}
++ note: this is not a strict upper limit.
+
-+int dx_parse_tag(char *string, tag_t *tag, int remove)
-+{
-+ int retval, flags = 0;
++config VSERVER_WARN
++ bool "VServer Warnings"
++ default y
++ help
++ This enables various runtime warnings, which will
++ notify about potential manipulation attempts or
++ resource shortage. It is generally considered to
++ be a good idea to have that enabled.
+
-+ while ((retval = __dx_parse_tag(string, tag, remove)))
-+ flags |= retval;
-+ return flags;
-+}
++config VSERVER_DEBUG
++ bool "VServer Debugging Code"
++ default n
++ help
++ Set this to yes if you want to be able to activate
++ debugging output at runtime. It adds a very small
++ overhead to all vserver related functions and
++ increases the kernel size by about 20k.
+
-+#ifdef CONFIG_PROPAGATE
++config VSERVER_HISTORY
++ bool "VServer History Tracing"
++ depends on VSERVER_DEBUG
++ default n
++ help
++ Set this to yes if you want to record the history of
++ linux-vserver activities, so they can be replayed in
++ the event of a kernel panic or oops.
+
-+void __dx_propagate_tag(struct nameidata *nd, struct inode *inode)
-+{
-+ tag_t new_tag = 0;
-+ struct vfsmount *mnt;
-+ int propagate;
++config VSERVER_HISTORY_SIZE
++ int "Per-CPU History Size (32-65536)"
++ depends on VSERVER_HISTORY
++ range 32 65536
++ default 64
++ help
++ This allows you to specify the number of entries in
++ the per-CPU history buffer.
+
-+ if (!nd)
-+ return;
-+ mnt = nd->mnt;
-+ if (!mnt)
-+ return;
++config VSERVER_MONITOR
++ bool "VServer Scheduling Monitor"
++ depends on VSERVER_DEBUG
++ default n
++ help
++ Set this to yes if you want to record the scheduling
++ decisions, so that they can be relayed to userspace
++ for detailed analysis.
+
-+ propagate = (mnt->mnt_flags & MNT_TAGID);
-+ if (propagate)
-+ new_tag = mnt->mnt_tag;
++config VSERVER_MONITOR_SIZE
++ int "Per-CPU Monitor Queue Size (32-65536)"
++ depends on VSERVER_MONITOR
++ range 32 65536
++ default 1024
++ help
++ This allows you to specify the number of entries in
++ the per-CPU scheduling monitor buffer.
+
-+ vxdprintk(VXD_CBIT(tag, 7),
-+ "dx_propagate_tag(%p[#%lu.%d]): %d,%d",
-+ inode, inode->i_ino, inode->i_tag,
-+ new_tag, (propagate) ? 1 : 0);
++config VSERVER_MONITOR_SYNC
++ int "Per-CPU Monitor Sync Interval (0-65536)"
++ depends on VSERVER_MONITOR
++ range 0 65536
++ default 256
++ help
++ This allows you to specify the interval in ticks
++ when a time sync entry is inserted.
+
-+ if (propagate)
-+ inode->i_tag = new_tag;
-+}
++endmenu
+
-+#include <linux/module.h>
+
-+EXPORT_SYMBOL_GPL(__dx_propagate_tag);
++config VSERVER
++ bool
++ default y
++ select UTS_NS
++ select SYSVIPC
++ select IPC_NS
+
-+#endif /* CONFIG_PROPAGATE */
++config VSERVER_SECURITY
++ bool
++ depends on SECURITY
++ default y
++ select SECURITY_CAPABILITIES
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/limit.c linux-2.6.22.10-vs2.3.0.29/kernel/vserver/limit.c
---- linux-2.6.22.10/kernel/vserver/limit.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/limit.c 2007-08-19 00:08:19 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/limit.c linux-2.6.22.18-vs2.3.0.32/kernel/vserver/limit.c
+--- linux-2.6.22.18/kernel/vserver/limit.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/limit.c 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,318 @@
+/*
+ * linux/kernel/vserver/limit.c
+ return points;
+}
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/limit_init.h linux-2.6.22.10-vs2.3.0.29/kernel/vserver/limit_init.h
---- linux-2.6.22.10/kernel/vserver/limit_init.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/limit_init.h 2007-10-25 17:05:55 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/limit_init.h linux-2.6.22.18-vs2.3.0.32/kernel/vserver/limit_init.h
+--- linux-2.6.22.18/kernel/vserver/limit_init.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/limit_init.h 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,33 @@
+
+
+#endif
+}
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/limit_proc.h linux-2.6.22.10-vs2.3.0.29/kernel/vserver/limit_proc.h
---- linux-2.6.22.10/kernel/vserver/limit_proc.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/limit_proc.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/limit_proc.h linux-2.6.22.18-vs2.3.0.32/kernel/vserver/limit_proc.h
+--- linux-2.6.22.18/kernel/vserver/limit_proc.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/limit_proc.h 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,57 @@
+#ifndef _VX_LIMIT_PROC_H
+#define _VX_LIMIT_PROC_H
+#endif /* _VX_LIMIT_PROC_H */
+
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/monitor.c linux-2.6.22.10-vs2.3.0.29/kernel/vserver/monitor.c
---- linux-2.6.22.10/kernel/vserver/monitor.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/monitor.c 2007-08-15 23:18:20 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/Makefile linux-2.6.22.18-vs2.3.0.32/kernel/vserver/Makefile
+--- linux-2.6.22.18/kernel/vserver/Makefile 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/Makefile 2008-02-11 12:35:38.000000000 +0100
+@@ -0,0 +1,18 @@
++#
++# Makefile for the Linux vserver routines.
++#
++
++
++obj-y += vserver.o
++
++vserver-y := switch.o context.o space.o sched.o network.o inode.o \
++ limit.o cvirt.o cacct.o signal.o helper.o init.o \
++ dlimit.o tag.o
++
++vserver-$(CONFIG_INET) += inet.o
++vserver-$(CONFIG_PROC_FS) += proc.o
++vserver-$(CONFIG_VSERVER_DEBUG) += sysctl.o debug.o
++vserver-$(CONFIG_VSERVER_HISTORY) += history.o
++vserver-$(CONFIG_VSERVER_MONITOR) += monitor.o
++vserver-$(CONFIG_VSERVER_DEVICE) += device.o
++
+diff -Nurp linux-2.6.22.18/kernel/vserver/monitor.c linux-2.6.22.18-vs2.3.0.32/kernel/vserver/monitor.c
+--- linux-2.6.22.18/kernel/vserver/monitor.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/monitor.c 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,138 @@
+/*
+ * kernel/vserver/monitor.c
+
+#endif /* CONFIG_COMPAT */
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/network.c linux-2.6.22.10-vs2.3.0.29/kernel/vserver/network.c
---- linux-2.6.22.10/kernel/vserver/network.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/network.c 2007-10-05 14:54:36 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/network.c linux-2.6.22.18-vs2.3.0.32/kernel/vserver/network.c
+--- linux-2.6.22.18/kernel/vserver/network.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/network.c 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,862 @@
+/*
+ * linux/kernel/vserver/network.c
+EXPORT_SYMBOL_GPL(free_nx_info);
+EXPORT_SYMBOL_GPL(unhash_nx_info);
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/proc.c linux-2.6.22.10-vs2.3.0.29/kernel/vserver/proc.c
---- linux-2.6.22.10/kernel/vserver/proc.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/proc.c 2007-10-05 14:54:36 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/proc.c linux-2.6.22.18-vs2.3.0.32/kernel/vserver/proc.c
+--- linux-2.6.22.18/kernel/vserver/proc.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/proc.c 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,1065 @@
+/*
+ * linux/kernel/vserver/proc.c
+ return buffer - orig;
+}
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/sched.c linux-2.6.22.10-vs2.3.0.29/kernel/vserver/sched.c
---- linux-2.6.22.10/kernel/vserver/sched.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/sched.c 2007-08-15 23:32:49 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/sched.c linux-2.6.22.18-vs2.3.0.32/kernel/vserver/sched.c
+--- linux-2.6.22.18/kernel/vserver/sched.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/sched.c 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,413 @@
+/*
+ * linux/kernel/vserver/sched.c
+ return 0;
+}
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/sched_init.h linux-2.6.22.10-vs2.3.0.29/kernel/vserver/sched_init.h
---- linux-2.6.22.10/kernel/vserver/sched_init.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/sched_init.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/sched_init.h linux-2.6.22.18-vs2.3.0.32/kernel/vserver/sched_init.h
+--- linux-2.6.22.18/kernel/vserver/sched_init.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/sched_init.h 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,50 @@
+
+static inline void vx_info_init_sched(struct _vx_sched *sched)
+{
+ return;
+}
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/sched_proc.h linux-2.6.22.10-vs2.3.0.29/kernel/vserver/sched_proc.h
---- linux-2.6.22.10/kernel/vserver/sched_proc.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/sched_proc.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/sched_proc.h linux-2.6.22.18-vs2.3.0.32/kernel/vserver/sched_proc.h
+--- linux-2.6.22.18/kernel/vserver/sched_proc.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/sched_proc.h 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,57 @@
+#ifndef _VX_SCHED_PROC_H
+#define _VX_SCHED_PROC_H
+}
+
+#endif /* _VX_SCHED_PROC_H */
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/signal.c linux-2.6.22.10-vs2.3.0.29/kernel/vserver/signal.c
---- linux-2.6.22.10/kernel/vserver/signal.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/signal.c 2007-08-15 23:34:41 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/signal.c linux-2.6.22.18-vs2.3.0.32/kernel/vserver/signal.c
+--- linux-2.6.22.18/kernel/vserver/signal.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/signal.c 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,131 @@
+/*
+ * linux/kernel/vserver/signal.c
+ return ret;
+}
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/space.c linux-2.6.22.10-vs2.3.0.29/kernel/vserver/space.c
---- linux-2.6.22.10/kernel/vserver/space.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/space.c 2007-08-15 23:39:13 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/space.c linux-2.6.22.18-vs2.3.0.32/kernel/vserver/space.c
+--- linux-2.6.22.18/kernel/vserver/space.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/space.c 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,277 @@
+/*
+ * linux/kernel/vserver/space.c
+ return 0;
+}
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/switch.c linux-2.6.22.10-vs2.3.0.29/kernel/vserver/switch.c
---- linux-2.6.22.10/kernel/vserver/switch.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/switch.c 2007-10-25 17:05:55 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/switch.c linux-2.6.22.18-vs2.3.0.32/kernel/vserver/switch.c
+--- linux-2.6.22.18/kernel/vserver/switch.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/switch.c 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,529 @@
+/*
+ * linux/kernel/vserver/switch.c
+}
+
+#endif /* CONFIG_COMPAT */
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/sysctl.c linux-2.6.22.10-vs2.3.0.29/kernel/vserver/sysctl.c
---- linux-2.6.22.10/kernel/vserver/sysctl.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/sysctl.c 2007-08-15 23:42:57 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/sysctl.c linux-2.6.22.18-vs2.3.0.32/kernel/vserver/sysctl.c
+--- linux-2.6.22.18/kernel/vserver/sysctl.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/sysctl.c 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,243 @@
+/*
+ * kernel/vserver/sysctl.c
+EXPORT_SYMBOL_GPL(vx_debug_space);
+EXPORT_SYMBOL_GPL(vx_debug_misc);
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/tag.c linux-2.6.22.10-vs2.3.0.29/kernel/vserver/tag.c
---- linux-2.6.22.10/kernel/vserver/tag.c 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/tag.c 2007-10-05 14:54:36 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/tag.c linux-2.6.22.18-vs2.3.0.32/kernel/vserver/tag.c
+--- linux-2.6.22.18/kernel/vserver/tag.c 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/tag.c 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,62 @@
+/*
+ * linux/kernel/vserver/tag.c
+}
+
+
-diff -NurpP --minimal linux-2.6.22.10/kernel/vserver/vci_config.h linux-2.6.22.10-vs2.3.0.29/kernel/vserver/vci_config.h
---- linux-2.6.22.10/kernel/vserver/vci_config.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/kernel/vserver/vci_config.h 2007-08-16 03:56:22 +0200
+diff -Nurp linux-2.6.22.18/kernel/vserver/vci_config.h linux-2.6.22.18-vs2.3.0.32/kernel/vserver/vci_config.h
+--- linux-2.6.22.18/kernel/vserver/vci_config.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/kernel/vserver/vci_config.h 2008-02-11 12:35:38.000000000 +0100
@@ -0,0 +1,81 @@
+
+/* interface version */
+ 0;
+}
+
-diff -NurpP --minimal linux-2.6.22.10/mm/filemap_xip.c linux-2.6.22.10-vs2.3.0.29/mm/filemap_xip.c
---- linux-2.6.22.10/mm/filemap_xip.c 2007-07-09 13:20:04 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/mm/filemap_xip.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/Makefile linux-2.6.22.18-vs2.3.0.32/Makefile
+--- linux-2.6.22.18/Makefile 2008-02-11 12:34:27.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/Makefile 2008-02-11 12:35:55.000000000 +0100
+@@ -1,7 +1,7 @@
+ VERSION = 2
+ PATCHLEVEL = 6
+ SUBLEVEL = 22
+-EXTRAVERSION = .18
++EXTRAVERSION = .18-vs2.3.0.32
+ NAME = Holy Dancing Manatees, Batman!
+
+ # *DOCUMENTATION*
+diff -Nurp linux-2.6.22.18/mm/filemap_xip.c linux-2.6.22.18-vs2.3.0.32/mm/filemap_xip.c
+--- linux-2.6.22.18/mm/filemap_xip.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/mm/filemap_xip.c 2008-02-11 12:35:38.000000000 +0100
@@ -14,6 +14,7 @@
#include <linux/uio.h>
#include <linux/rmap.h>
#include <asm/tlbflush.h>
#include "filemap.h"
-diff -NurpP --minimal linux-2.6.22.10/mm/fremap.c linux-2.6.22.10-vs2.3.0.29/mm/fremap.c
---- linux-2.6.22.10/mm/fremap.c 2007-02-06 03:01:56 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/mm/fremap.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/mm/fremap.c linux-2.6.22.18-vs2.3.0.32/mm/fremap.c
+--- linux-2.6.22.18/mm/fremap.c 2007-05-04 15:58:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/mm/fremap.c 2008-02-11 12:35:38.000000000 +0100
@@ -15,6 +15,7 @@
#include <linux/rmap.h>
#include <linux/module.h>
if (pte_none(*pte) || !zap_pte(mm, vma, addr, pte))
inc_mm_counter(mm, file_rss);
-diff -NurpP --minimal linux-2.6.22.10/mm/hugetlb.c linux-2.6.22.10-vs2.3.0.29/mm/hugetlb.c
---- linux-2.6.22.10/mm/hugetlb.c 2007-10-30 01:57:15 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/mm/hugetlb.c 2007-08-11 22:41:51 +0200
+diff -Nurp linux-2.6.22.18/mm/hugetlb.c linux-2.6.22.18-vs2.3.0.32/mm/hugetlb.c
+--- linux-2.6.22.18/mm/hugetlb.c 2007-08-12 03:54:37.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/mm/hugetlb.c 2008-02-11 12:35:38.000000000 +0100
@@ -19,6 +19,7 @@
#include <asm/pgtable.h>
#include "internal.h"
const unsigned long hugetlb_zero = 0, hugetlb_infinity = ~0UL;
-diff -NurpP --minimal linux-2.6.22.10/mm/memory.c linux-2.6.22.10-vs2.3.0.29/mm/memory.c
---- linux-2.6.22.10/mm/memory.c 2007-07-09 13:20:04 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/mm/memory.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/mm/memory.c linux-2.6.22.18-vs2.3.0.32/mm/memory.c
+--- linux-2.6.22.18/mm/memory.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/mm/memory.c 2008-02-11 12:35:38.000000000 +0100
@@ -498,6 +498,9 @@ static int copy_pte_range(struct mm_stru
int progress = 0;
int rss[2];
}
/*
-diff -NurpP --minimal linux-2.6.22.10/mm/mlock.c linux-2.6.22.10-vs2.3.0.29/mm/mlock.c
---- linux-2.6.22.10/mm/mlock.c 2007-10-30 01:57:15 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/mm/mlock.c 2007-08-11 22:41:51 +0200
+diff -Nurp linux-2.6.22.18/mm/mlock.c linux-2.6.22.18-vs2.3.0.32/mm/mlock.c
+--- linux-2.6.22.18/mm/mlock.c 2007-08-12 03:54:37.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/mm/mlock.c 2008-02-11 12:35:38.000000000 +0100
@@ -12,6 +12,7 @@
#include <linux/syscalls.h>
#include <linux/sched.h>
if (!(flags & MCL_CURRENT) || (current->mm->total_vm <= lock_limit) ||
capable(CAP_IPC_LOCK))
ret = do_mlockall(flags);
-diff -NurpP --minimal linux-2.6.22.10/mm/mmap.c linux-2.6.22.10-vs2.3.0.29/mm/mmap.c
---- linux-2.6.22.10/mm/mmap.c 2007-07-09 13:20:04 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/mm/mmap.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/mm/mmap.c linux-2.6.22.18-vs2.3.0.32/mm/mmap.c
+--- linux-2.6.22.18/mm/mmap.c 2008-02-11 12:34:20.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/mm/mmap.c 2008-02-11 12:35:38.000000000 +0100
@@ -1144,10 +1144,10 @@ munmap_back:
kmem_cache_free(vm_area_cachep, vma);
}
+ vx_vmpages_add(mm, len >> PAGE_SHIFT);
return 0;
}
-diff -NurpP --minimal linux-2.6.22.10/mm/mremap.c linux-2.6.22.10-vs2.3.0.29/mm/mremap.c
---- linux-2.6.22.10/mm/mremap.c 2007-02-06 03:01:56 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/mm/mremap.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/mm/mremap.c linux-2.6.22.18-vs2.3.0.32/mm/mremap.c
+--- linux-2.6.22.18/mm/mremap.c 2007-05-04 15:58:24.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/mm/mremap.c 2008-02-11 12:35:38.000000000 +0100
@@ -18,6 +18,7 @@
#include <linux/highmem.h>
#include <linux/security.h>
make_pages_present(addr + old_len,
addr + new_len);
}
-diff -NurpP --minimal linux-2.6.22.10/mm/nommu.c linux-2.6.22.10-vs2.3.0.29/mm/nommu.c
---- linux-2.6.22.10/mm/nommu.c 2007-07-09 13:20:04 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/mm/nommu.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/mm/nommu.c linux-2.6.22.18-vs2.3.0.32/mm/nommu.c
+--- linux-2.6.22.18/mm/nommu.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/mm/nommu.c 2008-02-11 12:35:39.000000000 +0100
@@ -936,7 +936,7 @@ unsigned long do_mmap_pgoff(struct file
realalloc += kobjsize(vma);
askedalloc += sizeof(*vma);
while ((tmp = mm->context.vmlist)) {
mm->context.vmlist = tmp->next;
-diff -NurpP --minimal linux-2.6.22.10/mm/oom_kill.c linux-2.6.22.10-vs2.3.0.29/mm/oom_kill.c
---- linux-2.6.22.10/mm/oom_kill.c 2007-07-09 13:20:04 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/mm/oom_kill.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/mm/oom_kill.c linux-2.6.22.18-vs2.3.0.32/mm/oom_kill.c
+--- linux-2.6.22.18/mm/oom_kill.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/mm/oom_kill.c 2008-02-11 12:35:39.000000000 +0100
@@ -24,6 +24,7 @@
#include <linux/cpuset.h>
#include <linux/module.h>
/* Try to kill a child first */
list_for_each(tsk, &p->children) {
-diff -NurpP --minimal linux-2.6.22.10/mm/page_alloc.c linux-2.6.22.10-vs2.3.0.29/mm/page_alloc.c
---- linux-2.6.22.10/mm/page_alloc.c 2007-07-09 13:20:04 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/mm/page_alloc.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/mm/page_alloc.c linux-2.6.22.18-vs2.3.0.32/mm/page_alloc.c
+--- linux-2.6.22.18/mm/page_alloc.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/mm/page_alloc.c 2008-02-11 12:35:39.000000000 +0100
@@ -41,6 +41,8 @@
#include <linux/pfn.h>
#include <linux/backing-dev.h>
}
#endif
-diff -NurpP --minimal linux-2.6.22.10/mm/rmap.c linux-2.6.22.10-vs2.3.0.29/mm/rmap.c
---- linux-2.6.22.10/mm/rmap.c 2007-07-09 13:20:04 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/mm/rmap.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/mm/rmap.c linux-2.6.22.18-vs2.3.0.32/mm/rmap.c
+--- linux-2.6.22.18/mm/rmap.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/mm/rmap.c 2008-02-11 12:35:39.000000000 +0100
@@ -48,6 +48,7 @@
#include <linux/rcupdate.h>
#include <linux/module.h>
#include <asm/tlbflush.h>
-diff -NurpP --minimal linux-2.6.22.10/mm/shmem.c linux-2.6.22.10-vs2.3.0.29/mm/shmem.c
---- linux-2.6.22.10/mm/shmem.c 2007-07-09 13:20:04 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/mm/shmem.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/mm/shmem.c linux-2.6.22.18-vs2.3.0.32/mm/shmem.c
+--- linux-2.6.22.18/mm/shmem.c 2008-01-15 16:00:35.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/mm/shmem.c 2008-02-11 12:35:39.000000000 +0100
@@ -55,7 +55,6 @@
#include <asm/pgtable.h>
#define ENTRIES_PER_PAGE (PAGE_CACHE_SIZE/sizeof(unsigned long))
#define ENTRIES_PER_PAGEPAGE (ENTRIES_PER_PAGE*ENTRIES_PER_PAGE)
-@@ -1734,7 +1733,7 @@ static int shmem_statfs(struct dentry *d
+@@ -1750,7 +1749,7 @@ static int shmem_statfs(struct dentry *d
{
struct shmem_sb_info *sbinfo = SHMEM_SB(dentry->d_sb);
buf->f_bsize = PAGE_CACHE_SIZE;
buf->f_namelen = NAME_MAX;
spin_lock(&sbinfo->stat_lock);
-@@ -2308,7 +2307,7 @@ static int shmem_fill_super(struct super
+@@ -2324,7 +2323,7 @@ static int shmem_fill_super(struct super
sb->s_maxbytes = SHMEM_MAX_BYTES;
sb->s_blocksize = PAGE_CACHE_SIZE;
sb->s_blocksize_bits = PAGE_CACHE_SHIFT;
sb->s_op = &shmem_ops;
sb->s_time_gran = 1;
#ifdef CONFIG_TMPFS_POSIX_ACL
-diff -NurpP --minimal linux-2.6.22.10/mm/slab.c linux-2.6.22.10-vs2.3.0.29/mm/slab.c
---- linux-2.6.22.10/mm/slab.c 2007-07-09 13:20:04 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/mm/slab.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/mm/slab.c linux-2.6.22.18-vs2.3.0.32/mm/slab.c
+--- linux-2.6.22.18/mm/slab.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/mm/slab.c 2008-02-11 12:35:40.000000000 +0100
@@ -510,6 +510,8 @@ struct kmem_cache {
#define STATS_INC_FREEMISS(x) do { } while (0)
#endif
if (cache_free_alien(cachep, objp))
return;
-diff -NurpP --minimal linux-2.6.22.10/mm/slab_vs.h linux-2.6.22.10-vs2.3.0.29/mm/slab_vs.h
---- linux-2.6.22.10/mm/slab_vs.h 1970-01-01 01:00:00 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/mm/slab_vs.h 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/mm/slab_vs.h linux-2.6.22.18-vs2.3.0.32/mm/slab_vs.h
+--- linux-2.6.22.18/mm/slab_vs.h 1970-01-01 01:00:00.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/mm/slab_vs.h 2008-02-11 12:35:40.000000000 +0100
@@ -0,0 +1,27 @@
+
+#include <linux/vserver/context.h>
+ atomic_sub(cachep->buffer_size, ¤t->vx_info->cacct.slab[what]);
+}
+
-diff -NurpP --minimal linux-2.6.22.10/mm/swapfile.c linux-2.6.22.10-vs2.3.0.29/mm/swapfile.c
---- linux-2.6.22.10/mm/swapfile.c 2007-07-09 13:20:04 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/mm/swapfile.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/mm/swapfile.c linux-2.6.22.18-vs2.3.0.32/mm/swapfile.c
+--- linux-2.6.22.18/mm/swapfile.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/mm/swapfile.c 2008-02-11 12:35:40.000000000 +0100
@@ -31,6 +31,8 @@
#include <asm/pgtable.h>
#include <asm/tlbflush.h>
}
/*
-diff -NurpP --minimal linux-2.6.22.10/net/core/dev.c linux-2.6.22.10-vs2.3.0.29/net/core/dev.c
---- linux-2.6.22.10/net/core/dev.c 2007-10-30 01:57:15 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/net/core/dev.c 2007-09-05 03:06:12 +0200
+diff -Nurp linux-2.6.22.18/net/core/dev.c linux-2.6.22.18-vs2.3.0.32/net/core/dev.c
+--- linux-2.6.22.18/net/core/dev.c 2007-09-05 07:07:59.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/core/dev.c 2008-02-11 12:35:40.000000000 +0100
@@ -117,6 +117,7 @@
#include <linux/err.h>
#include <linux/ctype.h>
seq_printf(seq, "%6s:%8lu %7lu %4lu %4lu %4lu %5lu %10lu %9lu "
"%8lu %7lu %4lu %4lu %4lu %5lu %7lu %10lu\n",
dev->name, stats->rx_bytes, stats->rx_packets,
-diff -NurpP --minimal linux-2.6.22.10/net/core/rtnetlink.c linux-2.6.22.10-vs2.3.0.29/net/core/rtnetlink.c
---- linux-2.6.22.10/net/core/rtnetlink.c 2007-07-09 13:20:05 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/net/core/rtnetlink.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/net/core/rtnetlink.c linux-2.6.22.18-vs2.3.0.32/net/core/rtnetlink.c
+--- linux-2.6.22.18/net/core/rtnetlink.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/core/rtnetlink.c 2008-02-11 12:35:40.000000000 +0100
@@ -537,6 +537,8 @@ static int rtnl_dump_ifinfo(struct sk_bu
idx = 0;
skb = nlmsg_new(if_nlmsg_size(), GFP_KERNEL);
if (skb == NULL)
goto errout;
-diff -NurpP --minimal linux-2.6.22.10/net/core/sock.c linux-2.6.22.10-vs2.3.0.29/net/core/sock.c
---- linux-2.6.22.10/net/core/sock.c 2007-07-09 13:20:05 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/net/core/sock.c 2007-10-01 14:57:43 +0200
+diff -Nurp linux-2.6.22.18/net/core/sock.c linux-2.6.22.18-vs2.3.0.32/net/core/sock.c
+--- linux-2.6.22.18/net/core/sock.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/core/sock.c 2008-02-11 12:35:40.000000000 +0100
@@ -125,6 +125,10 @@
#include <linux/ipsec.h>
atomic_set(&sk->sk_refcnt, 1);
}
-diff -NurpP --minimal linux-2.6.22.10/net/ipv4/af_inet.c linux-2.6.22.10-vs2.3.0.29/net/ipv4/af_inet.c
---- linux-2.6.22.10/net/ipv4/af_inet.c 2007-10-30 01:57:15 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv4/af_inet.c 2007-10-05 14:54:36 +0200
+diff -Nurp linux-2.6.22.18/net/ipv4/af_inet.c linux-2.6.22.18-vs2.3.0.32/net/ipv4/af_inet.c
+--- linux-2.6.22.18/net/ipv4/af_inet.c 2007-09-05 07:07:59.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv4/af_inet.c 2008-02-11 12:35:40.000000000 +0100
@@ -115,6 +115,7 @@
#ifdef CONFIG_IP_MROUTE
#include <linux/mroute.h>
sin->sin_port = inet->sport;
sin->sin_addr.s_addr = addr;
}
-diff -NurpP --minimal linux-2.6.22.10/net/ipv4/devinet.c linux-2.6.22.10-vs2.3.0.29/net/ipv4/devinet.c
---- linux-2.6.22.10/net/ipv4/devinet.c 2007-10-30 01:57:15 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv4/devinet.c 2007-09-30 14:58:01 +0200
+diff -Nurp linux-2.6.22.18/net/ipv4/devinet.c linux-2.6.22.18-vs2.3.0.32/net/ipv4/devinet.c
+--- linux-2.6.22.18/net/ipv4/devinet.c 2008-02-11 12:34:20.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv4/devinet.c 2008-02-11 12:35:40.000000000 +0100
@@ -427,6 +427,7 @@ struct in_device *inetdev_by_index(int i
return in_dev;
}
if (ip_idx < s_ip_idx)
continue;
if (inet_fill_ifaddr(skb, ifa, NETLINK_CB(cb->skb).pid,
-diff -NurpP --minimal linux-2.6.22.10/net/ipv4/fib_hash.c linux-2.6.22.10-vs2.3.0.29/net/ipv4/fib_hash.c
---- linux-2.6.22.10/net/ipv4/fib_hash.c 2007-07-09 13:20:05 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv4/fib_hash.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/net/ipv4/fib_hash.c linux-2.6.22.18-vs2.3.0.32/net/ipv4/fib_hash.c
+--- linux-2.6.22.18/net/ipv4/fib_hash.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv4/fib_hash.c 2008-02-11 12:35:41.000000000 +0100
@@ -1012,7 +1012,7 @@ static int fib_seq_show(struct seq_file
prefix = f->fn_key;
mask = FZ_MASK(iter->zone);
snprintf(bf, sizeof(bf),
"%s\t%08X\t%08X\t%04X\t%d\t%u\t%d\t%08X\t%d\t%u\t%u",
fi->fib_dev ? fi->fib_dev->name : "*", prefix,
-diff -NurpP --minimal linux-2.6.22.10/net/ipv4/inet_connection_sock.c linux-2.6.22.10-vs2.3.0.29/net/ipv4/inet_connection_sock.c
---- linux-2.6.22.10/net/ipv4/inet_connection_sock.c 2007-07-09 13:20:05 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv4/inet_connection_sock.c 2007-10-18 01:28:12 +0200
+diff -Nurp linux-2.6.22.18/net/ipv4/inet_connection_sock.c linux-2.6.22.18-vs2.3.0.32/net/ipv4/inet_connection_sock.c
+--- linux-2.6.22.18/net/ipv4/inet_connection_sock.c 2007-07-22 00:00:25.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv4/inet_connection_sock.c 2008-02-11 12:35:41.000000000 +0100
@@ -34,10 +34,40 @@ EXPORT_SYMBOL(inet_csk_timer_bug_msg);
*/
int sysctl_local_port_range[2] = { 32768, 61000 };
break;
}
}
-diff -NurpP --minimal linux-2.6.22.10/net/ipv4/inet_diag.c linux-2.6.22.10-vs2.3.0.29/net/ipv4/inet_diag.c
---- linux-2.6.22.10/net/ipv4/inet_diag.c 2007-10-30 01:57:15 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv4/inet_diag.c 2007-10-30 02:36:32 +0100
+diff -Nurp linux-2.6.22.18/net/ipv4/inet_diag.c linux-2.6.22.18-vs2.3.0.32/net/ipv4/inet_diag.c
+--- linux-2.6.22.18/net/ipv4/inet_diag.c 2007-09-29 14:11:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv4/inet_diag.c 2008-02-11 12:35:41.000000000 +0100
@@ -98,8 +98,8 @@ static int inet_csk_diag_fill(struct soc
r->id.idiag_sport = inet->sport;
if (num < s_num)
goto next_dying;
if (r->id.idiag_sport != tw->tw_sport &&
-diff -NurpP --minimal linux-2.6.22.10/net/ipv4/inet_hashtables.c linux-2.6.22.10-vs2.3.0.29/net/ipv4/inet_hashtables.c
---- linux-2.6.22.10/net/ipv4/inet_hashtables.c 2007-05-02 19:25:40 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv4/inet_hashtables.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/net/ipv4/inet_hashtables.c linux-2.6.22.18-vs2.3.0.32/net/ipv4/inet_hashtables.c
+--- linux-2.6.22.18/net/ipv4/inet_hashtables.c 2007-07-21 23:58:55.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv4/inet_hashtables.c 2008-02-11 12:35:41.000000000 +0100
@@ -140,11 +140,10 @@ static struct sock *inet_lookup_listener
const __be32 rcv_saddr = inet->rcv_saddr;
int score = sk->sk_family == PF_INET ? 1 : 0;
(sk->sk_family == PF_INET || !ipv6_only_sock(sk)) &&
!sk->sk_bound_dev_if)
goto sherry_cache;
-diff -NurpP --minimal linux-2.6.22.10/net/ipv4/raw.c linux-2.6.22.10-vs2.3.0.29/net/ipv4/raw.c
---- linux-2.6.22.10/net/ipv4/raw.c 2007-07-09 13:20:06 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv4/raw.c 2007-10-05 12:29:05 +0200
+diff -Nurp linux-2.6.22.18/net/ipv4/raw.c linux-2.6.22.18-vs2.3.0.32/net/ipv4/raw.c
+--- linux-2.6.22.18/net/ipv4/raw.c 2007-07-22 00:00:27.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv4/raw.c 2008-02-11 12:35:41.000000000 +0100
@@ -112,7 +112,7 @@ struct sock *__raw_v4_lookup(struct sock
if (inet->num == num &&
atomic_read(&sp->sk_wmem_alloc),
atomic_read(&sp->sk_rmem_alloc),
0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp),
-diff -NurpP --minimal linux-2.6.22.10/net/ipv4/tcp.c linux-2.6.22.10-vs2.3.0.29/net/ipv4/tcp.c
---- linux-2.6.22.10/net/ipv4/tcp.c 2007-10-30 01:57:15 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv4/tcp.c 2007-09-05 03:06:12 +0200
+diff -Nurp linux-2.6.22.18/net/ipv4/tcp.c linux-2.6.22.18-vs2.3.0.32/net/ipv4/tcp.c
+--- linux-2.6.22.18/net/ipv4/tcp.c 2007-09-05 07:07:59.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv4/tcp.c 2008-02-11 12:35:41.000000000 +0100
@@ -258,6 +258,7 @@
#include <linux/cache.h>
#include <linux/err.h>
#include <net/icmp.h>
#include <net/tcp.h>
-diff -NurpP --minimal linux-2.6.22.10/net/ipv4/tcp_ipv4.c linux-2.6.22.10-vs2.3.0.29/net/ipv4/tcp_ipv4.c
---- linux-2.6.22.10/net/ipv4/tcp_ipv4.c 2007-10-30 01:57:15 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv4/tcp_ipv4.c 2007-09-05 03:06:12 +0200
-@@ -1975,6 +1975,12 @@ static void *listening_get_next(struct s
+diff -Nurp linux-2.6.22.18/net/ipv4/tcp_ipv4.c linux-2.6.22.18-vs2.3.0.32/net/ipv4/tcp_ipv4.c
+--- linux-2.6.22.18/net/ipv4/tcp_ipv4.c 2007-12-09 12:43:41.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv4/tcp_ipv4.c 2008-02-11 12:35:42.000000000 +0100
+@@ -1974,6 +1974,12 @@ static void *listening_get_next(struct s
req = req->dl_next;
while (1) {
while (req) {
if (req->rsk_ops->family == st->family) {
cur = req;
goto out;
-@@ -1999,6 +2005,10 @@ get_req:
+@@ -1998,6 +2004,10 @@ get_req:
}
get_sk:
sk_for_each_from(sk, node) {
if (sk->sk_family == st->family) {
cur = sk;
goto out;
-@@ -2050,18 +2060,26 @@ static void *established_get_first(struc
+@@ -2049,18 +2059,26 @@ static void *established_get_first(struc
read_lock(&tcp_hashinfo.ehash[st->bucket].lock);
sk_for_each(sk, node, &tcp_hashinfo.ehash[st->bucket].chain) {
rc = tw;
goto out;
}
-@@ -2085,7 +2103,8 @@ static void *established_get_next(struct
+@@ -2084,7 +2102,8 @@ static void *established_get_next(struct
tw = cur;
tw = tw_next(tw);
get_tw:
tw = tw_next(tw);
}
if (tw) {
-@@ -2109,6 +2128,11 @@ get_tw:
+@@ -2108,6 +2127,11 @@ get_tw:
sk = sk_next(sk);
sk_for_each_from(sk, node) {
if (sk->sk_family == st->family)
goto found;
}
-@@ -2284,9 +2308,9 @@ static void get_openreq4(struct sock *sk
+@@ -2283,9 +2307,9 @@ static void get_openreq4(struct sock *sk
sprintf(tmpbuf, "%4d: %08X:%04X %08X:%04X"
" %02X %08X:%08X %02X:%08lX %08X %5d %8d %u %d %p",
i,
ntohs(ireq->rmt_port),
TCP_SYN_RECV,
0, 0, /* could print option size, but that is af dependent. */
-@@ -2328,7 +2352,10 @@ static void get_tcp4_sock(struct sock *s
+@@ -2327,7 +2351,10 @@ static void get_tcp4_sock(struct sock *s
sprintf(tmpbuf, "%4d: %08X:%04X %08X:%04X %02X %08X:%08X %02X:%08lX "
"%08X %5d %8d %lu %d %p %u %u %u %u %d",
tp->write_seq - tp->snd_una,
sk->sk_state == TCP_LISTEN ? sk->sk_ack_backlog :
(tp->rcv_nxt - tp->copied_seq),
-@@ -2363,7 +2390,10 @@ static void get_timewait4_sock(struct in
+@@ -2362,7 +2389,10 @@ static void get_timewait4_sock(struct in
sprintf(tmpbuf, "%4d: %08X:%04X %08X:%04X"
" %02X %08X:%08X %02X:%08lX %08X %5d %8d %d %d %p",
3, jiffies_to_clock_t(ttd), 0, 0, 0, 0,
atomic_read(&tw->tw_refcnt), tw);
}
-diff -NurpP --minimal linux-2.6.22.10/net/ipv4/tcp_minisocks.c linux-2.6.22.10-vs2.3.0.29/net/ipv4/tcp_minisocks.c
---- linux-2.6.22.10/net/ipv4/tcp_minisocks.c 2007-07-09 13:20:06 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv4/tcp_minisocks.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/net/ipv4/tcp_minisocks.c linux-2.6.22.18-vs2.3.0.32/net/ipv4/tcp_minisocks.c
+--- linux-2.6.22.18/net/ipv4/tcp_minisocks.c 2007-07-22 00:00:27.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv4/tcp_minisocks.c 2008-02-11 12:35:42.000000000 +0100
@@ -28,6 +28,10 @@
#include <net/inet_common.h>
#include <net/xfrm.h>
#if defined(CONFIG_IPV6) || defined(CONFIG_IPV6_MODULE)
if (tw->tw_family == PF_INET6) {
struct ipv6_pinfo *np = inet6_sk(sk);
-diff -NurpP --minimal linux-2.6.22.10/net/ipv4/udp.c linux-2.6.22.10-vs2.3.0.29/net/ipv4/udp.c
---- linux-2.6.22.10/net/ipv4/udp.c 2007-07-09 13:20:06 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv4/udp.c 2007-10-09 14:09:19 +0200
+diff -Nurp linux-2.6.22.18/net/ipv4/udp.c linux-2.6.22.18-vs2.3.0.32/net/ipv4/udp.c
+--- linux-2.6.22.18/net/ipv4/udp.c 2007-07-22 00:00:27.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv4/udp.c 2008-02-11 12:35:42.000000000 +0100
@@ -219,14 +219,7 @@ int udp_get_port(struct sock *sk, unsign
return __udp_lib_get_port(sk, snum, udp_hash, &udp_port_rover, scmp);
}
atomic_read(&sp->sk_wmem_alloc),
atomic_read(&sp->sk_rmem_alloc),
0, 0L, 0, sock_i_uid(sp), 0, sock_i_ino(sp),
-diff -NurpP --minimal linux-2.6.22.10/net/ipv6/Kconfig linux-2.6.22.10-vs2.3.0.29/net/ipv6/Kconfig
---- linux-2.6.22.10/net/ipv6/Kconfig 2007-07-09 13:20:06 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv6/Kconfig 2007-08-05 20:53:13 +0200
-@@ -4,8 +4,8 @@
-
- # IPv6 as module will cause a CRASH if you try to unload it
- config IPV6
-- tristate "The IPv6 protocol"
-- default m
-+ bool "The IPv6 protocol"
-+ default n
- ---help---
- This is complemental support for the IP version 6.
- You will still be able to do traditional IPv4 networking as well.
-diff -NurpP --minimal linux-2.6.22.10/net/ipv6/addrconf.c linux-2.6.22.10-vs2.3.0.29/net/ipv6/addrconf.c
---- linux-2.6.22.10/net/ipv6/addrconf.c 2007-10-30 01:57:15 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv6/addrconf.c 2007-10-05 14:54:36 +0200
-@@ -85,6 +85,7 @@
+diff -Nurp linux-2.6.22.18/net/ipv6/addrconf.c linux-2.6.22.18-vs2.3.0.32/net/ipv6/addrconf.c
+--- linux-2.6.22.18/net/ipv6/addrconf.c 2008-01-15 16:00:36.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv6/addrconf.c 2008-02-11 12:35:42.000000000 +0100
+@@ -86,6 +86,7 @@
#include <linux/proc_fs.h>
#include <linux/seq_file.h>
/* Set to 3 to get tracing... */
#define ACONF_DEBUG 2
-@@ -897,7 +898,8 @@ static inline int ipv6_saddr_label(const
+@@ -904,7 +905,8 @@ static inline int ipv6_saddr_label(const
}
int ipv6_dev_get_saddr(struct net_device *daddr_dev,
{
struct ipv6_saddr_score hiscore;
struct inet6_ifaddr *ifa_result = NULL;
-@@ -942,6 +944,10 @@ int ipv6_dev_get_saddr(struct net_device
+@@ -949,6 +951,10 @@ int ipv6_dev_get_saddr(struct net_device
score.addr_type = __ipv6_addr_type(&ifa->addr);
/* Rule 0:
* - Tentative Address (RFC2462 section 5.4)
* - A tentative address is not considered
-@@ -1155,9 +1161,10 @@ record_it:
+@@ -1162,9 +1168,10 @@ record_it:
int ipv6_get_saddr(struct dst_entry *dst,
}
EXPORT_SYMBOL(ipv6_get_saddr);
-@@ -1253,35 +1260,46 @@ struct inet6_ifaddr * ipv6_get_ifaddr(st
+@@ -1260,35 +1267,46 @@ struct inet6_ifaddr * ipv6_get_ifaddr(st
return ifp;
}
return 1;
return 0;
-@@ -2772,7 +2790,10 @@ static void if6_seq_stop(struct seq_file
+@@ -2788,7 +2806,10 @@ static void if6_seq_stop(struct seq_file
static int if6_seq_show(struct seq_file *seq, void *v)
{
struct inet6_ifaddr *ifp = (struct inet6_ifaddr *)v;
NIP6_SEQFMT " %02x %02x %02x %02x %8s\n",
NIP6(ifp->addr),
ifp->idev->dev->ifindex,
-@@ -3254,6 +3275,11 @@ static int inet6_dump_addr(struct sk_buf
+@@ -3270,6 +3291,11 @@ static int inet6_dump_addr(struct sk_buf
struct inet6_ifaddr *ifa;
struct ifmcaddr6 *ifmca;
struct ifacaddr6 *ifaca;
s_idx = cb->args[0];
s_ip_idx = ip_idx = cb->args[1];
-@@ -3275,6 +3301,8 @@ static int inet6_dump_addr(struct sk_buf
+@@ -3291,6 +3317,8 @@ static int inet6_dump_addr(struct sk_buf
ifa = ifa->if_next, ip_idx++) {
if (ip_idx < s_ip_idx)
continue;
if ((err = inet6_fill_ifaddr(skb, ifa,
NETLINK_CB(cb->skb).pid,
cb->nlh->nlmsg_seq, RTM_NEWADDR,
-@@ -3288,6 +3316,8 @@ static int inet6_dump_addr(struct sk_buf
+@@ -3304,6 +3332,8 @@ static int inet6_dump_addr(struct sk_buf
ifmca = ifmca->next, ip_idx++) {
if (ip_idx < s_ip_idx)
continue;
if ((err = inet6_fill_ifmcaddr(skb, ifmca,
NETLINK_CB(cb->skb).pid,
cb->nlh->nlmsg_seq, RTM_GETMULTICAST,
-@@ -3301,6 +3331,8 @@ static int inet6_dump_addr(struct sk_buf
+@@ -3317,6 +3347,8 @@ static int inet6_dump_addr(struct sk_buf
ifaca = ifaca->aca_next, ip_idx++) {
if (ip_idx < s_ip_idx)
continue;
if ((err = inet6_fill_ifacaddr(skb, ifaca,
NETLINK_CB(cb->skb).pid,
cb->nlh->nlmsg_seq, RTM_GETANYCAST,
-@@ -3577,12 +3609,19 @@ static int inet6_dump_ifinfo(struct sk_b
+@@ -3593,12 +3625,19 @@ static int inet6_dump_ifinfo(struct sk_b
int s_idx = cb->args[0];
struct net_device *dev;
struct inet6_dev *idev;
if ((idev = in6_dev_get(dev)) == NULL)
goto cont;
err = inet6_fill_ifinfo(skb, idev, NETLINK_CB(cb->skb).pid,
-diff -NurpP --minimal linux-2.6.22.10/net/ipv6/af_inet6.c linux-2.6.22.10-vs2.3.0.29/net/ipv6/af_inet6.c
---- linux-2.6.22.10/net/ipv6/af_inet6.c 2007-10-30 01:57:15 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv6/af_inet6.c 2007-10-05 12:29:05 +0200
+diff -Nurp linux-2.6.22.18/net/ipv6/af_inet6.c linux-2.6.22.18-vs2.3.0.32/net/ipv6/af_inet6.c
+--- linux-2.6.22.18/net/ipv6/af_inet6.c 2007-09-05 07:08:00.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv6/af_inet6.c 2008-02-11 12:35:42.000000000 +0100
@@ -43,6 +43,7 @@
#include <linux/netdevice.h>
#include <linux/icmpv6.h>
if (ipv6_addr_any(&np->rcv_saddr))
ipv6_addr_copy(&sin->sin6_addr, &np->saddr);
else
-diff -NurpP --minimal linux-2.6.22.10/net/ipv6/fib6_rules.c linux-2.6.22.10-vs2.3.0.29/net/ipv6/fib6_rules.c
---- linux-2.6.22.10/net/ipv6/fib6_rules.c 2007-07-09 13:20:06 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv6/fib6_rules.c 2007-08-12 00:22:19 +0200
+diff -Nurp linux-2.6.22.18/net/ipv6/fib6_rules.c linux-2.6.22.18-vs2.3.0.32/net/ipv6/fib6_rules.c
+--- linux-2.6.22.18/net/ipv6/fib6_rules.c 2007-07-22 00:00:27.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv6/fib6_rules.c 2008-02-11 12:35:42.000000000 +0100
@@ -107,7 +107,7 @@ static int fib6_rule_action(struct fib_r
r->src.plen && !(flags & RT6_LOOKUP_F_HAS_SADDR)) {
struct in6_addr saddr;
goto again;
if (!ipv6_prefix_equal(&saddr, &r->src.addr,
r->src.plen))
-diff -NurpP --minimal linux-2.6.22.10/net/ipv6/inet6_hashtables.c linux-2.6.22.10-vs2.3.0.29/net/ipv6/inet6_hashtables.c
---- linux-2.6.22.10/net/ipv6/inet6_hashtables.c 2007-05-02 19:25:45 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv6/inet6_hashtables.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/net/ipv6/inet6_hashtables.c linux-2.6.22.18-vs2.3.0.32/net/ipv6/inet6_hashtables.c
+--- linux-2.6.22.18/net/ipv6/inet6_hashtables.c 2007-07-21 23:58:56.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv6/inet6_hashtables.c 2008-02-11 12:35:42.000000000 +0100
@@ -16,6 +16,7 @@
#include <linux/module.h>
}
if (sk->sk_bound_dev_if) {
if (sk->sk_bound_dev_if != dif)
-diff -NurpP --minimal linux-2.6.22.10/net/ipv6/ip6_output.c linux-2.6.22.10-vs2.3.0.29/net/ipv6/ip6_output.c
---- linux-2.6.22.10/net/ipv6/ip6_output.c 2007-10-30 01:57:15 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv6/ip6_output.c 2007-09-30 14:58:01 +0200
+diff -Nurp linux-2.6.22.18/net/ipv6/ip6_output.c linux-2.6.22.18-vs2.3.0.32/net/ipv6/ip6_output.c
+--- linux-2.6.22.18/net/ipv6/ip6_output.c 2007-09-29 14:11:49.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv6/ip6_output.c 2008-02-11 12:35:42.000000000 +0100
@@ -884,7 +884,7 @@ static int ip6_dst_lookup_tail(struct so
goto out_err_release;
if (err)
goto out_err_release;
}
-diff -NurpP --minimal linux-2.6.22.10/net/ipv6/ndisc.c linux-2.6.22.10-vs2.3.0.29/net/ipv6/ndisc.c
---- linux-2.6.22.10/net/ipv6/ndisc.c 2007-10-30 01:57:15 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv6/ndisc.c 2007-09-30 14:58:01 +0200
+diff -Nurp linux-2.6.22.18/net/ipv6/Kconfig linux-2.6.22.18-vs2.3.0.32/net/ipv6/Kconfig
+--- linux-2.6.22.18/net/ipv6/Kconfig 2007-07-22 00:00:27.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv6/Kconfig 2008-02-11 12:35:42.000000000 +0100
+@@ -4,8 +4,8 @@
+
+ # IPv6 as module will cause a CRASH if you try to unload it
+ config IPV6
+- tristate "The IPv6 protocol"
+- default m
++ bool "The IPv6 protocol"
++ default n
+ ---help---
+ This is complemental support for the IP version 6.
+ You will still be able to do traditional IPv4 networking as well.
+diff -Nurp linux-2.6.22.18/net/ipv6/ndisc.c linux-2.6.22.18-vs2.3.0.32/net/ipv6/ndisc.c
+--- linux-2.6.22.18/net/ipv6/ndisc.c 2007-12-09 12:43:41.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv6/ndisc.c 2008-02-11 12:35:42.000000000 +0100
@@ -531,7 +531,7 @@ static void ndisc_send_na(struct net_dev
override = 0;
in6_ifa_put(ifp);
return;
src_addr = &tmpaddr;
}
-diff -NurpP --minimal linux-2.6.22.10/net/ipv6/route.c linux-2.6.22.10-vs2.3.0.29/net/ipv6/route.c
---- linux-2.6.22.10/net/ipv6/route.c 2007-07-09 13:20:06 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv6/route.c 2007-08-12 00:22:19 +0200
+diff -Nurp linux-2.6.22.18/net/ipv6/route.c linux-2.6.22.18-vs2.3.0.32/net/ipv6/route.c
+--- linux-2.6.22.18/net/ipv6/route.c 2007-07-22 00:00:27.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv6/route.c 2008-02-11 12:35:42.000000000 +0100
@@ -2182,7 +2182,7 @@ static int rt6_fill_node(struct sk_buff
NLA_PUT_U32(skb, RTA_IIF, iif);
else if (dst) {
struct in6_addr saddr_buf;
- if (ipv6_get_saddr(&rt->u.dst, dst, &saddr_buf) == 0)
-+ if (ipv6_get_saddr(&rt->u.dst, dst, &saddr_buf, skb->sk->sk_nx_info) == 0)
++ if (ipv6_get_saddr(&rt->u.dst, dst, &saddr_buf, (skb->sk ? skb->sk->sk_nx_info : NULL)) == 0)
NLA_PUT(skb, RTA_PREFSRC, 16, &saddr_buf);
}
-diff -NurpP --minimal linux-2.6.22.10/net/ipv6/tcp_ipv6.c linux-2.6.22.10-vs2.3.0.29/net/ipv6/tcp_ipv6.c
---- linux-2.6.22.10/net/ipv6/tcp_ipv6.c 2007-10-30 01:57:15 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv6/tcp_ipv6.c 2007-09-18 12:32:20 +0200
+diff -Nurp linux-2.6.22.18/net/ipv6/tcp_ipv6.c linux-2.6.22.18-vs2.3.0.32/net/ipv6/tcp_ipv6.c
+--- linux-2.6.22.18/net/ipv6/tcp_ipv6.c 2007-12-09 12:43:41.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv6/tcp_ipv6.c 2008-02-11 12:35:42.000000000 +0100
@@ -68,6 +68,7 @@
#include <linux/crypto.h>
addr_type = ipv6_addr_type(&usin->sin6_addr);
-diff -NurpP --minimal linux-2.6.22.10/net/ipv6/udp.c linux-2.6.22.10-vs2.3.0.29/net/ipv6/udp.c
---- linux-2.6.22.10/net/ipv6/udp.c 2007-07-09 13:20:06 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv6/udp.c 2007-08-12 03:34:32 +0200
+diff -Nurp linux-2.6.22.18/net/ipv6/udp.c linux-2.6.22.18-vs2.3.0.32/net/ipv6/udp.c
+--- linux-2.6.22.18/net/ipv6/udp.c 2007-07-22 00:00:27.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv6/udp.c 2008-02-11 12:35:42.000000000 +0100
@@ -48,6 +48,7 @@
#include <linux/proc_fs.h>
}
if (!ipv6_addr_any(&np->daddr)) {
if (!ipv6_addr_equal(&np->daddr, saddr))
-diff -NurpP --minimal linux-2.6.22.10/net/ipv6/xfrm6_policy.c linux-2.6.22.10-vs2.3.0.29/net/ipv6/xfrm6_policy.c
---- linux-2.6.22.10/net/ipv6/xfrm6_policy.c 2007-07-09 13:20:06 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/net/ipv6/xfrm6_policy.c 2007-08-12 00:22:19 +0200
+diff -Nurp linux-2.6.22.18/net/ipv6/xfrm6_policy.c linux-2.6.22.18-vs2.3.0.32/net/ipv6/xfrm6_policy.c
+--- linux-2.6.22.18/net/ipv6/xfrm6_policy.c 2007-07-22 00:00:27.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/ipv6/xfrm6_policy.c 2008-02-11 12:35:42.000000000 +0100
@@ -49,7 +49,7 @@ static int xfrm6_get_saddr(xfrm_address_
if (!xfrm6_dst_lookup((struct xfrm_dst **)&rt, &fl_tunnel)) {
dst_release(&rt->u.dst);
return 0;
}
-diff -NurpP --minimal linux-2.6.22.10/net/netlink/af_netlink.c linux-2.6.22.10-vs2.3.0.29/net/netlink/af_netlink.c
---- linux-2.6.22.10/net/netlink/af_netlink.c 2007-07-09 13:20:07 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/net/netlink/af_netlink.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/net/netlink/af_netlink.c linux-2.6.22.18-vs2.3.0.32/net/netlink/af_netlink.c
+--- linux-2.6.22.18/net/netlink/af_netlink.c 2007-12-09 12:43:53.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/net/netlink/af_netlink.c 2008-02-11 12:35:42.000000000 +0100
@@ -56,6 +56,9 @@
#include <linux/audit.h>
#include <linux/selinux.h>
#include <net/sock.h>
#include <net/scm.h>
-diff -NurpP --minimal linux-2.6.22.10/net/sctp/ipv6.c linux-2.6.22.10-vs2.3.0.29/net/sctp/ipv6.c
---- linux-2.6.22.10/net/sctp/ipv6.c 2007-10-30 01:57:15 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/net/sctp/ipv6.c 2007-08-12 00:22:19 +0200
+@@ -885,6 +888,10 @@ static inline int do_one_broadcast(struc
+ !test_bit(p->group - 1, nlk->groups))
+ goto out;
+
++ if (sk->sk_nx_info &&
++ (p->group == RTNLGRP_IPV4_IFADDR || p->group == RTNLGRP_IPV6_IFADDR))
++ goto out;
++
+ if (p->failure) {
+ netlink_overrun(sk);
+ goto out;
+diff -Nurp linux-2.6.22.18/net/rxrpc/Kconfig linux-2.6.22.18-vs2.3.0.32/net/rxrpc/Kconfig
+--- linux-2.6.22.18/net/rxrpc/Kconfig 2008-01-15 16:00:36.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/net/rxrpc/Kconfig 2008-02-11 12:35:42.000000000 +0100
+@@ -4,7 +4,7 @@
+
+ config AF_RXRPC
+ tristate "RxRPC session sockets"
+- depends on INET && EXPERIMENTAL
++ depends on INET && EXPERIMENTAL && !VSERVER_SECURITY
+ select CRYPTO
+ select KEYS
+ help
+diff -Nurp linux-2.6.22.18/net/sctp/ipv6.c linux-2.6.22.18-vs2.3.0.32/net/sctp/ipv6.c
+--- linux-2.6.22.18/net/sctp/ipv6.c 2007-08-12 03:54:37.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/sctp/ipv6.c 2008-02-11 12:35:43.000000000 +0100
@@ -303,7 +303,7 @@ static void sctp_v6_get_saddr(struct sct
__FUNCTION__, asoc, dst, NIP6(daddr->v6.sin6_addr));
SCTP_DEBUG_PRINTK("saddr from ipv6_get_saddr: " NIP6_FMT "\n",
NIP6(saddr->v6.sin6_addr));
return;
-diff -NurpP --minimal linux-2.6.22.10/net/socket.c linux-2.6.22.10-vs2.3.0.29/net/socket.c
---- linux-2.6.22.10/net/socket.c 2007-10-30 01:57:15 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/net/socket.c 2007-09-05 03:06:12 +0200
+diff -Nurp linux-2.6.22.18/net/socket.c linux-2.6.22.18-vs2.3.0.32/net/socket.c
+--- linux-2.6.22.18/net/socket.c 2007-12-09 12:43:53.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/net/socket.c 2008-02-11 12:35:43.000000000 +0100
@@ -92,6 +92,10 @@
#include <net/sock.h>
}
int sock_recvmsg(struct socket *sock, struct msghdr *msg,
-@@ -1090,6 +1120,13 @@ static int __sock_create(int family, int
+@@ -1087,6 +1117,13 @@ static int __sock_create(int family, int
if (type < 0 || type >= SOCK_MAX)
return -EINVAL;
/* Compatibility.
This uglymoron is moved from INET layer to here to avoid
-@@ -1207,6 +1244,7 @@ asmlinkage long sys_socket(int family, i
+@@ -1204,6 +1241,7 @@ asmlinkage long sys_socket(int family, i
if (retval < 0)
goto out;
retval = sock_map_fd(sock);
if (retval < 0)
goto out_release;
-@@ -1239,10 +1277,12 @@ asmlinkage long sys_socketpair(int famil
+@@ -1236,10 +1274,12 @@ asmlinkage long sys_socketpair(int famil
err = sock_create(family, type, protocol, &sock1);
if (err < 0)
goto out;
err = sock1->ops->socketpair(sock1, sock2);
if (err < 0)
-diff -NurpP --minimal linux-2.6.22.10/net/sunrpc/auth.c linux-2.6.22.10-vs2.3.0.29/net/sunrpc/auth.c
---- linux-2.6.22.10/net/sunrpc/auth.c 2007-05-02 19:25:48 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/net/sunrpc/auth.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/net/sunrpc/auth.c linux-2.6.22.18-vs2.3.0.32/net/sunrpc/auth.c
+--- linux-2.6.22.18/net/sunrpc/auth.c 2007-07-21 23:59:04.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/sunrpc/auth.c 2008-02-11 12:35:43.000000000 +0100
@@ -13,6 +13,7 @@
#include <linux/errno.h>
#include <linux/sunrpc/clnt.h>
.group_info = current->group_info,
};
struct rpc_cred *ret;
-diff -NurpP --minimal linux-2.6.22.10/net/sunrpc/auth_unix.c linux-2.6.22.10-vs2.3.0.29/net/sunrpc/auth_unix.c
---- linux-2.6.22.10/net/sunrpc/auth_unix.c 2007-05-02 19:25:48 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/net/sunrpc/auth_unix.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/net/sunrpc/auth_unix.c linux-2.6.22.18-vs2.3.0.32/net/sunrpc/auth_unix.c
+--- linux-2.6.22.18/net/sunrpc/auth_unix.c 2007-07-21 23:59:04.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/sunrpc/auth_unix.c 2008-02-11 12:35:43.000000000 +0100
@@ -11,12 +11,14 @@
#include <linux/module.h>
#include <linux/sunrpc/clnt.h>
hold = p++;
for (i = 0; i < 16 && cred->uc_gids[i] != (gid_t) NOGROUP; i++)
*p++ = htonl((u32) cred->uc_gids[i]);
-diff -NurpP --minimal linux-2.6.22.10/net/sunrpc/clnt.c linux-2.6.22.10-vs2.3.0.29/net/sunrpc/clnt.c
---- linux-2.6.22.10/net/sunrpc/clnt.c 2007-07-09 13:20:13 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/net/sunrpc/clnt.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/net/sunrpc/clnt.c linux-2.6.22.18-vs2.3.0.32/net/sunrpc/clnt.c
+--- linux-2.6.22.18/net/sunrpc/clnt.c 2007-07-22 00:00:28.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/sunrpc/clnt.c 2008-02-11 12:35:43.000000000 +0100
@@ -30,6 +30,7 @@
#include <linux/smp_lock.h>
#include <linux/utsname.h>
return clnt;
}
EXPORT_SYMBOL_GPL(rpc_create);
-diff -NurpP --minimal linux-2.6.22.10/net/unix/af_unix.c linux-2.6.22.10-vs2.3.0.29/net/unix/af_unix.c
---- linux-2.6.22.10/net/unix/af_unix.c 2007-07-09 13:20:13 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/net/unix/af_unix.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/net/unix/af_unix.c linux-2.6.22.18-vs2.3.0.32/net/unix/af_unix.c
+--- linux-2.6.22.18/net/unix/af_unix.c 2008-01-15 16:00:36.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/net/unix/af_unix.c 2008-02-11 12:35:43.000000000 +0100
@@ -115,6 +115,8 @@
#include <linux/mount.h>
#include <net/checksum.h>
if (err)
goto out_mknod_dput;
mutex_unlock(&nd.dentry->d_inode->i_mutex);
-diff -NurpP --minimal linux-2.6.22.10/net/x25/af_x25.c linux-2.6.22.10-vs2.3.0.29/net/x25/af_x25.c
---- linux-2.6.22.10/net/x25/af_x25.c 2007-07-09 13:20:13 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/net/x25/af_x25.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/net/x25/af_x25.c linux-2.6.22.18-vs2.3.0.32/net/x25/af_x25.c
+--- linux-2.6.22.18/net/x25/af_x25.c 2007-07-22 00:00:28.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/net/x25/af_x25.c 2008-02-11 12:35:43.000000000 +0100
@@ -500,7 +500,10 @@ static int x25_create(struct socket *soc
x25 = x25_sk(sk);
x25_init_timers(sk);
-diff -NurpP --minimal linux-2.6.22.10/security/Kconfig linux-2.6.22.10-vs2.3.0.29/security/Kconfig
---- linux-2.6.22.10/security/Kconfig 2006-11-30 21:19:47 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/security/Kconfig 2007-08-05 20:53:13 +0200
-@@ -6,6 +6,7 @@ menu "Security options"
-
- config KEYS
- bool "Enable access key retention support"
-+ depends on !VSERVER_SECURITY
- help
- This option provides support for retaining authentication tokens and
- access keys in the kernel.
-diff -NurpP --minimal linux-2.6.22.10/security/commoncap.c linux-2.6.22.10-vs2.3.0.29/security/commoncap.c
---- linux-2.6.22.10/security/commoncap.c 2007-07-09 13:20:14 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/security/commoncap.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/security/commoncap.c linux-2.6.22.18-vs2.3.0.32/security/commoncap.c
+--- linux-2.6.22.18/security/commoncap.c 2007-07-22 00:00:28.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/security/commoncap.c 2008-02-11 12:35:43.000000000 +0100
@@ -22,10 +22,11 @@
#include <linux/ptrace.h>
#include <linux/xattr.h>
return -EPERM;
return 0;
}
-diff -NurpP --minimal linux-2.6.22.10/security/dummy.c linux-2.6.22.10-vs2.3.0.29/security/dummy.c
---- linux-2.6.22.10/security/dummy.c 2007-05-02 19:25:51 +0200
-+++ linux-2.6.22.10-vs2.3.0.29/security/dummy.c 2007-08-05 20:53:13 +0200
+diff -Nurp linux-2.6.22.18/security/dummy.c linux-2.6.22.18-vs2.3.0.32/security/dummy.c
+--- linux-2.6.22.18/security/dummy.c 2007-07-21 23:59:05.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/security/dummy.c 2008-02-11 12:35:43.000000000 +0100
@@ -28,6 +28,7 @@
#include <linux/hugetlb.h>
#include <linux/ptrace.h>
return 0;
}
-diff -NurpP --minimal linux-2.6.22.10/security/selinux/hooks.c linux-2.6.22.10-vs2.3.0.29/security/selinux/hooks.c
---- linux-2.6.22.10/security/selinux/hooks.c 2007-10-30 01:57:15 +0100
-+++ linux-2.6.22.10-vs2.3.0.29/security/selinux/hooks.c 2007-10-30 01:21:54 +0100
+diff -Nurp linux-2.6.22.18/security/Kconfig linux-2.6.22.18-vs2.3.0.32/security/Kconfig
+--- linux-2.6.22.18/security/Kconfig 2007-05-04 15:57:46.000000000 +0200
++++ linux-2.6.22.18-vs2.3.0.32/security/Kconfig 2008-02-11 12:35:43.000000000 +0100
+@@ -6,6 +6,7 @@ menu "Security options"
+
+ config KEYS
+ bool "Enable access key retention support"
++ depends on !VSERVER_SECURITY
+ help
+ This option provides support for retaining authentication tokens and
+ access keys in the kernel.
+diff -Nurp linux-2.6.22.18/security/selinux/hooks.c linux-2.6.22.18-vs2.3.0.32/security/selinux/hooks.c
+--- linux-2.6.22.18/security/selinux/hooks.c 2007-10-30 02:18:04.000000000 +0100
++++ linux-2.6.22.18-vs2.3.0.32/security/selinux/hooks.c 2008-02-11 12:35:43.000000000 +0100
@@ -60,7 +60,6 @@
#include <linux/dccp.h>
#include <linux/quota.h>