--- linux-2.6.18.2/Makefile	2006-11-04 19:43:18 +0100
+++ linux-2.6.18.2-vs2.1.1/Makefile	2006-11-05 20:28:39 +0100
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 6
 SUBLEVEL = 18
-EXTRAVERSION = .2
+EXTRAVERSION = .2-vs2.1.1
 NAME=Avast! A bilge rat!
 
 # *DOCUMENTATION*
--- linux-2.6.18.2/arch/alpha/Kconfig	2006-06-18 04:51:38 +0200
+++ linux-2.6.18.2-vs2.1.1/arch/alpha/Kconfig	2006-09-20 17:01:44 +0200
@@ -632,6 +632,8 @@ source "arch/alpha/oprofile/Kconfig"
 
 source "arch/alpha/Kconfig.debug"
 
+source "kernel/vserver/Kconfig"
+
 source "security/Kconfig"
 
 source "crypto/Kconfig"
--- linux-2.6.18.2/arch/arm/Kconfig	2006-09-20 16:57:57 +0200
+++ linux-2.6.18.2-vs2.1.1/arch/arm/Kconfig	2006-09-20 17:01:44 +0200
@@ -907,6 +907,8 @@ source "arch/arm/oprofile/Kconfig"
 
 source "arch/arm/Kconfig.debug"
 
+source "kernel/vserver/Kconfig"
+
 source "security/Kconfig"
 
 source "crypto/Kconfig"
--- linux-2.6.18.2/arch/arm26/Kconfig	2006-09-20 16:57:57 +0200
+++ linux-2.6.18.2-vs2.1.1/arch/arm26/Kconfig	2006-09-20 17:01:44 +0200
@@ -234,6 +234,8 @@ source "drivers/usb/Kconfig"
 
 source "arch/arm26/Kconfig.debug"
 
+source "kernel/vserver/Kconfig"
+
 source "security/Kconfig"
 
 source "crypto/Kconfig"
--- linux-2.6.18.2/arch/cris/Kconfig	2006-09-20 16:57:57 +0200
+++ linux-2.6.18.2-vs2.1.1/arch/cris/Kconfig	2006-09-20 17:01:44 +0200
@@ -185,6 +185,8 @@ source "drivers/usb/Kconfig"
 
 source "arch/cris/Kconfig.debug"
 
+source "kernel/vserver/Kconfig"
+
 source "security/Kconfig"
 
 source "crypto/Kconfig"
--- linux-2.6.18.2/arch/h8300/Kconfig	2006-06-18 04:51:49 +0200
+++ linux-2.6.18.2-vs2.1.1/arch/h8300/Kconfig	2006-09-20 17:01:44 +0200
@@ -199,6 +199,8 @@ source "fs/Kconfig"
 
 source "arch/h8300/Kconfig.debug"
 
+source "kernel/vserver/Kconfig"
+
 source "security/Kconfig"
 
 source "crypto/Kconfig"
--- linux-2.6.18.2/arch/i386/Kconfig	2006-09-20 16:57:58 +0200
+++ linux-2.6.18.2-vs2.1.1/arch/i386/Kconfig	2006-09-20 17:01:44 +0200
@@ -1142,6 +1142,8 @@ endmenu
 
 source "arch/i386/Kconfig.debug"
 
+source "kernel/vserver/Kconfig"
+
 source "security/Kconfig"
 
 source "crypto/Kconfig"
--- linux-2.6.18.2/arch/ia64/Kconfig	2006-09-20 16:57:58 +0200
+++ linux-2.6.18.2-vs2.1.1/arch/ia64/Kconfig	2006-09-20 17:01:44 +0200
@@ -525,6 +525,8 @@ endmenu
 
 source "arch/ia64/Kconfig.debug"
 
+source "kernel/vserver/Kconfig"
+
 source "security/Kconfig"
 
 source "crypto/Kconfig"
--- linux-2.6.18.2/arch/m68k/Kconfig	2006-06-18 04:51:57 +0200
+++ linux-2.6.18.2-vs2.1.1/arch/m68k/Kconfig	2006-09-20 17:01:44 +0200
@@ -654,6 +654,8 @@ source "fs/Kconfig"
 
 source "arch/m68k/Kconfig.debug"
 
+source "kernel/vserver/Kconfig"
+
 source "security/Kconfig"
 
 source "crypto/Kconfig"
--- linux-2.6.18.2/arch/m68knommu/Kconfig	2006-09-20 16:57:58 +0200
+++ linux-2.6.18.2-vs2.1.1/arch/m68knommu/Kconfig	2006-09-20 17:01:44 +0200
@@ -663,6 +663,8 @@ source "fs/Kconfig"
 
 source "arch/m68knommu/Kconfig.debug"
 
+source "kernel/vserver/Kconfig"
+
 source "security/Kconfig"
 
 source "crypto/Kconfig"
--- linux-2.6.18.2/arch/mips/Kconfig	2006-09-20 16:57:58 +0200
+++ linux-2.6.18.2-vs2.1.1/arch/mips/Kconfig	2006-09-20 17:01:44 +0200
@@ -2057,6 +2057,8 @@ source "arch/mips/oprofile/Kconfig"
 
 source "arch/mips/Kconfig.debug"
 
+source "kernel/vserver/Kconfig"
+
 source "security/Kconfig"
 
 source "crypto/Kconfig"
--- linux-2.6.18.2/arch/parisc/Kconfig	2006-09-20 16:58:00 +0200
+++ linux-2.6.18.2-vs2.1.1/arch/parisc/Kconfig	2006-09-20 17:01:44 +0200
@@ -257,6 +257,8 @@ source "arch/parisc/oprofile/Kconfig"
 
 source "arch/parisc/Kconfig.debug"
 
+source "kernel/vserver/Kconfig"
+
 source "security/Kconfig"
 
 source "crypto/Kconfig"
--- linux-2.6.18.2/arch/powerpc/Kconfig	2006-11-04 19:43:22 +0100
+++ linux-2.6.18.2-vs2.1.1/arch/powerpc/Kconfig	2006-11-04 19:12:53 +0100
@@ -1078,6 +1078,8 @@ endmenu
 
 source "arch/powerpc/Kconfig.debug"
 
+source "kernel/vserver/Kconfig"
+
 source "security/Kconfig"
 
 config KEYS_COMPAT
--- linux-2.6.18.2/arch/ppc/Kconfig	2006-09-20 16:58:01 +0200
+++ linux-2.6.18.2-vs2.1.1/arch/ppc/Kconfig	2006-09-20 17:01:44 +0200
@@ -1418,6 +1418,8 @@ source "arch/powerpc/oprofile/Kconfig"
 
 source "arch/ppc/Kconfig.debug"
 
+source "kernel/vserver/Kconfig"
+
 source "security/Kconfig"
 
 source "crypto/Kconfig"
--- linux-2.6.18.2/arch/s390/Kconfig	2006-11-04 19:43:22 +0100
+++ linux-2.6.18.2-vs2.1.1/arch/s390/Kconfig	2006-11-04 19:12:53 +0100
@@ -495,6 +495,8 @@ source "arch/s390/oprofile/Kconfig"
 
 source "arch/s390/Kconfig.debug"
 
+source "kernel/vserver/Kconfig"
+
 source "security/Kconfig"
 
 source "crypto/Kconfig"
--- linux-2.6.18.2/arch/sh/Kconfig	2006-09-20 16:58:01 +0200
+++ linux-2.6.18.2-vs2.1.1/arch/sh/Kconfig	2006-09-20 17:01:44 +0200
@@ -646,6 +646,8 @@ source "arch/sh/oprofile/Kconfig"
 
 source "arch/sh/Kconfig.debug"
 
+source "kernel/vserver/Kconfig"
+
 source "security/Kconfig"
 
 source "crypto/Kconfig"
--- linux-2.6.18.2/arch/sparc/Kconfig	2006-06-18 04:52:33 +0200
+++ linux-2.6.18.2-vs2.1.1/arch/sparc/Kconfig	2006-09-20 17:01:44 +0200
@@ -291,6 +291,8 @@ source "fs/Kconfig"
 
 source "arch/sparc/Kconfig.debug"
 
+source "kernel/vserver/Kconfig"
+
 source "security/Kconfig"
 
 source "crypto/Kconfig"
--- linux-2.6.18.2/arch/sparc64/Kconfig	2006-09-20 16:58:06 +0200
+++ linux-2.6.18.2-vs2.1.1/arch/sparc64/Kconfig	2006-09-20 17:01:44 +0200
@@ -431,6 +431,8 @@ endmenu
 
 source "arch/sparc64/Kconfig.debug"
 
+source "kernel/vserver/Kconfig"
+
 source "security/Kconfig"
 
 source "crypto/Kconfig"
--- linux-2.6.18.2/arch/um/Kconfig	2006-11-04 19:43:22 +0100
+++ linux-2.6.18.2-vs2.1.1/arch/um/Kconfig	2006-10-18 01:14:30 +0200
@@ -284,6 +284,8 @@ source "drivers/connector/Kconfig"
 
 source "fs/Kconfig"
 
+source "kernel/vserver/Kconfig"
+
 source "security/Kconfig"
 
 source "crypto/Kconfig"
--- linux-2.6.18.2/arch/v850/Kconfig	2006-06-18 04:52:42 +0200
+++ linux-2.6.18.2-vs2.1.1/arch/v850/Kconfig	2006-09-20 17:01:44 +0200
@@ -326,6 +326,8 @@ source "drivers/usb/Kconfig"
 
 source "arch/v850/Kconfig.debug"
 
+source "kernel/vserver/Kconfig"
+
 source "security/Kconfig"
 
 source "crypto/Kconfig"
--- linux-2.6.18.2/arch/x86_64/Kconfig	2006-09-20 16:58:06 +0200
+++ linux-2.6.18.2-vs2.1.1/arch/x86_64/Kconfig	2006-09-20 17:01:44 +0200
@@ -654,6 +654,8 @@ endmenu
 
 source "arch/x86_64/Kconfig.debug"
 
+source "kernel/vserver/Kconfig"
+
 source "security/Kconfig"
 
 source "crypto/Kconfig"
--- linux-2.6.18.2/include/linux/capability.h	2006-06-18 04:55:15 +0200
+++ linux-2.6.18.2-vs2.1.1/include/linux/capability.h	2006-09-20 17:01:45 +0200
@@ -235,6 +235,7 @@ typedef __u32 kernel_cap_t;
    arbitrary SCSI commands */
 /* Allow setting encryption key on loopback filesystem */
 /* Allow setting zone reclaim policy */
+/* Allow the selection of a security context */
 
 #define CAP_SYS_ADMIN        21
 
--- linux-2.6.18.2/include/linux/capability.h	2006-06-18 04:55:15 +0200
+++ linux-2.6.18.2-vs2.1.1/include/linux/capability.h	2006-09-20 17:01:45 +0200
@@ -288,6 +289,11 @@ typedef __u32 kernel_cap_t;
 
 #define CAP_AUDIT_CONTROL    30
 
+/* Allow context manipulations */
+/* Allow changing context info on files */
+
+#define CAP_CONTEXT	     31
+
 #ifdef __KERNEL__
 /* 
  * Bounding set
--- linux-2.6.18.2/include/linux/init_task.h	2006-09-20 16:58:43 +0200
+++ linux-2.6.18.2-vs2.1.1/include/linux/init_task.h	2006-10-18 02:19:40 +0200
@@ -128,6 +128,10 @@ extern struct group_info init_groups;
 	.pi_lock	= SPIN_LOCK_UNLOCKED,				\
 	INIT_TRACE_IRQFLAGS						\
 	INIT_LOCKDEP							\
+	.xid		= 0,						\
+	.vx_info	= NULL,						\
+	.nid		= 0,						\
+	.nx_info	= NULL,						\
 }
 
 
--- linux-2.6.18.2/include/linux/percpu.h	2006-04-09 13:49:57 +0200
+++ linux-2.6.18.2-vs2.1.1/include/linux/percpu.h	2006-09-20 17:01:45 +0200
@@ -8,7 +8,7 @@
 
 /* Enough to cover all DEFINE_PER_CPUs in kernel, including modules. */
 #ifndef PERCPU_ENOUGH_ROOM
-#define PERCPU_ENOUGH_ROOM 32768
+#define PERCPU_ENOUGH_ROOM 65536
 #endif
 
 /* Must be an lvalue. */
--- linux-2.6.18.2/include/linux/sched.h	2006-09-20 16:58:44 +0200
+++ linux-2.6.18.2-vs2.1.1/include/linux/sched.h	2006-10-06 23:09:03 +0200
@@ -898,6 +906,14 @@ struct task_struct {
 	
 	void *security;
 	struct audit_context *audit_context;
+
+/* vserver context data */
+	struct vx_info *vx_info;
+	struct nx_info *nx_info;
+
+	xid_t xid;
+	nid_t nid;
+
 	seccomp_t seccomp;
 
 /* Thread group tracking */
--- linux-2.6.18.2/include/linux/types.h	2006-09-20 16:58:44 +0200
+++ linux-2.6.18.2-vs2.1.1/include/linux/types.h	2006-09-25 15:40:02 +0200
@@ -37,6 +37,9 @@ typedef __kernel_uid32_t	uid_t;
 typedef __kernel_gid32_t	gid_t;
 typedef __kernel_uid16_t        uid16_t;
 typedef __kernel_gid16_t        gid16_t;
+typedef unsigned int		xid_t;
+typedef unsigned int		nid_t;
+typedef unsigned int		tag_t;
 
 #ifdef CONFIG_UID16
 /* This is defined by include/asm-{arch}/posix_types.h */
--- linux-2.6.18.2/include/linux/vserver/global.h	1970-01-01 01:00:00 +0100
+++ linux-2.6.18.2-vs2.1.1/include/linux/vserver/global.h	2006-09-25 15:40:02 +0200
@@ -0,0 +1,8 @@
+#ifndef _VX_GLOBAL_H
+#define _VX_GLOBAL_H
+
+
+extern atomic_t vx_global_ctotal;
+extern atomic_t vx_global_cactive;
+
+#endif /* _VX_GLOBAL_H */
--- linux-2.6.18.2/kernel/Makefile	2006-09-20 16:58:44 +0200
+++ linux-2.6.18.2-vs2.1.1/kernel/Makefile	2006-09-20 17:38:59 +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
 
+obj-y	  += vserver/
+
 obj-$(CONFIG_STACKTRACE) += stacktrace.o
 obj-y += time/
 obj-$(CONFIG_DEBUG_MUTEXES) += mutex-debug.o
--- linux-2.6.18.2/kernel/exit.c	2006-09-20 16:58:44 +0200
+++ linux-2.6.18.2-vs2.1.1/kernel/exit.c	2006-10-28 18:31:23 +0200
@@ -930,6 +940,8 @@ fastcall NORET_TYPE void do_exit(long co
 
 	tsk->exit_code = code;
 	proc_exit_connector(tsk);
+	/* needs to stay before exit_notify() */
+	exit_vx_info_early(tsk, code);
 	exit_notify(tsk);
 #ifdef CONFIG_NUMA
 	mpol_free(tsk->mempolicy);
--- linux-2.6.18.2/kernel/exit.c	2006-09-20 16:58:44 +0200
+++ linux-2.6.18.2-vs2.1.1/kernel/exit.c	2006-10-28 18:31:23 +0200
@@ -954,6 +966,10 @@ fastcall NORET_TYPE void do_exit(long co
 	if (tsk->splice_pipe)
 		__free_pipe_info(tsk->splice_pipe);
 
+	/* needs to stay after exit_notify() */
+	exit_vx_info(tsk, code);
+	exit_nx_info(tsk);
+
 	/* PF_DEAD causes final put_task_struct after we schedule. */
 	preempt_disable();
 	BUG_ON(tsk->flags & PF_DEAD);
--- linux-2.6.18.2/kernel/vserver/Kconfig	1970-01-01 01:00:00 +0100
+++ linux-2.6.18.2-vs2.1.1/kernel/vserver/Kconfig	2006-10-20 03:20:49 +0200
@@ -0,0 +1,273 @@
+#
+# Linux VServer configuration
+#
+
+menu "Linux VServer"
+
+config	VSERVER_LEGACY
+	bool	"Enable Legacy Kernel API"
+	default y
+	help
+	  This enables the legacy API used in vs1.xx, maintaining
+	  compatibility with older vserver tools, and guest images
+	  that are configured using the legacy method.  This is
+	  probably a good idea for now, for migration purposes.
+
+	  Note that some tools have not yet been altered to use
+	  this API, so disabling this option may reduce some
+	  functionality.
+
+config	VSERVER_LEGACY_VERSION
+	bool	"Show a Legacy Version ID"
+	depends on VSERVER_LEGACY
+	default n
+	help
+	  This shows a special legacy version to very old tools
+	  which do not handle the current version correctly.
+
+	  This will probably disable some features of newer tools
+	  so better avoid it, unless you really, really need it
+	  for backwards compatibility.
+
+config	VSERVER_DYNAMIC_IDS
+	bool	"Enable dynamic context IDs"
+	depends on VSERVER_LEGACY
+	default y
+	help
+	  This enables support of in kernel dynamic context IDs,
+	  which is deprecated and will probably be removed in the
+	  next release.
+
+config	VSERVER_LEGACYNET
+	bool	"Enable Legacy Networking Kernel API"
+	default y
+	help
+	  This enables the legacy networking API which is required
+	  by the chbind tool (for util-vserver versions prior to
+	  0.30.210). If you use an older version, don't disable
+	  this option.
+
+config	VSERVER_REMAP_SADDR
+	bool	"Remap Source IP Address"
+	depends on EXPERIMENTAL && !VSERVER_LEGACY
+	default n
+	help
+	  This allows to remap the source IP address of 'local'
+	  connections from 127.0.0.1 to the first assigned
+	  guest IP.
+
+config	VSERVER_COWBL
+	bool	"Enable COW Immutable Link Breaking"
+	depends on EXPERIMENTAL
+	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_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"
+	depends on EXPERIMENTAL
+	default n
+	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 n
+	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)
+
+config	TAGGING_RUNTIME
+	bool	"Runtime"
+	depends on EXPERIMENTAL
+	help
+	  inodes are tagged when first accessed, this doesn't
+	  require any persistant information, but might give
+	  funny results for mixed access.
+
+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	PROPAGATE
+	bool	"Enable Inode Tag Propagation"
+	default n
+	depends on EXPERIMENTAL
+	help
+	  This allows for the tagid= mount option to specify
+	  a tagid which is to be used for the entire mount
+	  tree.
+
+config	VSERVER_PRIVACY
+	bool	"Honor Privacy Aspects of Guests"
+	default y
+	help
+	  When enabled, most context checks will disallow
+	  access to structures assigned to a specific context,
+	  like ptys or loop devices.
+
+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 probably 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
+
+config	VSERVER_SECURITY
+	bool
+	depends on SECURITY
+	default y
+	select SECURITY_CAPABILITIES
+
+config	VSERVER_NGNET
+	bool
+	depends on EXPERIMENTAL && !VSERVER_LEGACYNET
+	default y
+
--- linux-2.6.18.2/kernel/vserver/Makefile	1970-01-01 01:00:00 +0100
+++ linux-2.6.18.2-vs2.1.1/kernel/vserver/Makefile	2006-09-25 15:40:02 +0200
@@ -0,0 +1,17 @@
+#
+# Makefile for the Linux vserver routines.
+#
+
+
+obj-y		+= vserver.o
+
+vserver-y	:= switch.o context.o namespace.o sched.o network.o inode.o \
+		   limit.o cvirt.o cacct.o signal.o helper.o init.o dlimit.o
+
+vserver-$(CONFIG_PROC_FS) += proc.o
+vserver-$(CONFIG_VSERVER_DEBUG) += sysctl.o debug.o
+vserver-$(CONFIG_VSERVER_LEGACY) += legacy.o
+vserver-$(CONFIG_VSERVER_LEGACYNET) += legacynet.o
+vserver-$(CONFIG_VSERVER_HISTORY) += history.o
+vserver-$(CONFIG_VSERVER_MONITOR) += monitor.o
+
--- linux-2.6.18.2/kernel/vserver/init.c	1970-01-01 01:00:00 +0100
+++ linux-2.6.18.2-vs2.1.1/kernel/vserver/init.c	2006-09-25 15:40:02 +0200
@@ -0,0 +1,46 @@
+/*
+ *  linux/kernel/init.c
+ *
+ *  Virtual Server Init
+ *
+ *  Copyright (C) 2004-2005  Herbert Pötzl
+ *
+ *  V0.01  basic structure
+ *
+ */
+
+#include <linux/errno.h>
+#include <linux/init.h>
+#include <linux/module.h>
+
+int	vserver_register_sysctl(void);
+void	vserver_unregister_sysctl(void);
+
+
+static int __init init_vserver(void)
+{
+	int ret = 0;
+
+#ifdef	CONFIG_VSERVER_DEBUG
+	vserver_register_sysctl();
+#endif
+	return ret;
+}
+
+
+static void __exit exit_vserver(void)
+{
+
+#ifdef	CONFIG_VSERVER_DEBUG
+	vserver_unregister_sysctl();
+#endif
+	return;
+}
+
+long vx_slab[GFP_ZONETYPES];
+long vx_area;
+
+
+module_init(init_vserver);
+module_exit(exit_vserver);
+
--- linux-2.6.18.2/kernel/vserver/vci_config.h	1970-01-01 01:00:00 +0100
+++ linux-2.6.18.2-vs2.1.1/kernel/vserver/vci_config.h	2006-10-15 04:30:02 +0200
@@ -0,0 +1,80 @@
+
+enum {
+	VCI_KCBIT_LEGACY = 1,
+	VCI_KCBIT_LEGACYNET,
+	VCI_KCBIT_NGNET,
+
+	VCI_KCBIT_PROC_SECURE,
+	VCI_KCBIT_HARDCPU,
+	VCI_KCBIT_IDLELIMIT,
+	VCI_KCBIT_IDLETIME,
+
+	VCI_KCBIT_COWBL,
+	VCI_KCBIT_FULLCOWBL,
+
+	VCI_KCBIT_LEGACY_VERSION = 15,
+	VCI_KCBIT_DEBUG = 16,
+	VCI_KCBIT_HISTORY = 20,
+	VCI_KCBIT_TAGGED = 24,
+};
+
+
+static inline uint32_t vci_kernel_config(void)
+{
+	return
+	/* various legacy options */
+#ifdef	CONFIG_VSERVER_LEGACY
+	(1 << VCI_KCBIT_LEGACY) |
+#endif
+#ifdef	CONFIG_VSERVER_LEGACYNET
+	(1 << VCI_KCBIT_LEGACYNET) |
+#endif
+#ifdef	CONFIG_VSERVER_LEGACY_VERSION
+	(1 << VCI_KCBIT_LEGACY_VERSION) |
+#endif
+
+	/* configured features */
+#ifdef	CONFIG_VSERVER_PROC_SECURE
+	(1 << VCI_KCBIT_PROC_SECURE) |
+#endif
+#ifdef	CONFIG_VSERVER_HARDCPU
+	(1 << VCI_KCBIT_HARDCPU) |
+#endif
+#ifdef	CONFIG_VSERVER_IDLELIMIT
+	(1 << VCI_KCBIT_IDLELIMIT) |
+#endif
+#ifdef	CONFIG_VSERVER_IDLETIME
+	(1 << VCI_KCBIT_IDLETIME) |
+#endif
+#ifdef	CONFIG_VSERVER_COWBL
+	(1 << VCI_KCBIT_COWBL) |
+	(1 << VCI_KCBIT_FULLCOWBL) |
+#endif
+
+	/* debug options */
+#ifdef	CONFIG_VSERVER_DEBUG
+	(1 << VCI_KCBIT_DEBUG) |
+#endif
+#ifdef	CONFIG_VSERVER_HISTORY
+	(1 << VCI_KCBIT_HISTORY) |
+#endif
+
+	/* inode context tagging */
+#if	defined(CONFIG_TAGGING_NONE)
+	(0 << VCI_KCBIT_TAGGED) |
+#elif	defined(CONFIG_TAGGING_UID16)
+	(1 << VCI_KCBIT_TAGGED) |
+#elif	defined(CONFIG_TAGGING_GID16)
+	(2 << VCI_KCBIT_TAGGED) |
+#elif	defined(CONFIG_TAGGING_ID24)
+	(3 << VCI_KCBIT_TAGGED) |
+#elif	defined(CONFIG_TAGGING_INTERN)
+	(4 << VCI_KCBIT_TAGGED) |
+#elif	defined(CONFIG_TAGGING_RUNTIME)
+	(5 << VCI_KCBIT_TAGGED) |
+#else
+	(7 << VCI_KCBIT_TAGGED) |
+#endif
+	0;
+}
+
