--- linux-2.6.16-rc4/arch/ia64/sn/kernel/xpc_main.c	2006-02-18 14:39:44 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/arch/ia64/sn/kernel/xpc_main.c	2006-02-18 15:33:51 +0100
@@ -109,6 +109,7 @@ static ctl_table xpc_sys_xpc_hb_dir[] = 
 		0644,
 		NULL,
 		&proc_dointvec_minmax,
+		NULL,
 		&sysctl_intvec,
 		NULL,
 		&xpc_hb_min_interval,
--- linux-2.6.16-rc4/arch/ia64/sn/kernel/xpc_main.c	2006-02-18 14:39:44 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/arch/ia64/sn/kernel/xpc_main.c	2006-02-18 15:33:51 +0100
@@ -122,6 +123,7 @@ static ctl_table xpc_sys_xpc_hb_dir[] = 
 		0644,
 		NULL,
 		&proc_dointvec_minmax,
+		NULL,
 		&sysctl_intvec,
 		NULL,
 		&xpc_hb_check_min_interval,
--- linux-2.6.16-rc4/arch/ia64/sn/kernel/xpc_main.c	2006-02-18 14:39:44 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/arch/ia64/sn/kernel/xpc_main.c	2006-02-18 15:33:51 +0100
@@ -146,6 +148,7 @@ static ctl_table xpc_sys_xpc_dir[] = {
 		0644,
 		NULL,
 		&proc_dointvec_minmax,
+		NULL,
 		&sysctl_intvec,
 		NULL,
 		&xpc_disengage_request_min_timelimit,
--- linux-2.6.16-rc4/fs/xfs/linux-2.6/xfs_sysctl.c	2006-01-03 17:29:59 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/xfs/linux-2.6/xfs_sysctl.c	2006-02-17 23:26:32 +0100
@@ -58,7 +58,7 @@ xfs_stats_clear_proc_handler(
 STATIC ctl_table xfs_table[] = {
 	{XFS_RESTRICT_CHOWN, "restrict_chown", &xfs_params.restrict_chown.val,
 	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
+	NULL, &sysctl_intvec, NULL,
 	&xfs_params.restrict_chown.min, &xfs_params.restrict_chown.max},
 
 	{XFS_SGID_INHERIT, "irix_sgid_inherit", &xfs_params.sgid_inherit.val,
--- linux-2.6.16-rc4/fs/xfs/linux-2.6/xfs_sysctl.c	2006-01-03 17:29:59 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/xfs/linux-2.6/xfs_sysctl.c	2006-02-17 23:26:32 +0100
@@ -63,7 +63,7 @@ *****
 
 	{XFS_SGID_INHERIT, "irix_sgid_inherit", &xfs_params.sgid_inherit.val,
 	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
+	NULL, &sysctl_intvec, NULL,
 	&xfs_params.sgid_inherit.min, &xfs_params.sgid_inherit.max},
 
 	{XFS_SYMLINK_MODE, "irix_symlink_mode", &xfs_params.symlink_mode.val,
--- linux-2.6.16-rc4/fs/xfs/linux-2.6/xfs_sysctl.c	2006-01-03 17:29:59 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/xfs/linux-2.6/xfs_sysctl.c	2006-02-17 23:26:32 +0100
@@ -68,7 +68,7 @@ *****
 
 	{XFS_SYMLINK_MODE, "irix_symlink_mode", &xfs_params.symlink_mode.val,
 	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
+	NULL, &sysctl_intvec, NULL,
 	&xfs_params.symlink_mode.min, &xfs_params.symlink_mode.max},
 
 	{XFS_PANIC_MASK, "panic_mask", &xfs_params.panic_mask.val,
--- linux-2.6.16-rc4/fs/xfs/linux-2.6/xfs_sysctl.c	2006-01-03 17:29:59 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/xfs/linux-2.6/xfs_sysctl.c	2006-02-17 23:26:32 +0100
@@ -73,7 +73,7 @@ *****
 
 	{XFS_PANIC_MASK, "panic_mask", &xfs_params.panic_mask.val,
 	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
+	NULL, &sysctl_intvec, NULL,
 	&xfs_params.panic_mask.min, &xfs_params.panic_mask.max},
 
 	{XFS_ERRLEVEL, "error_level", &xfs_params.error_level.val,
--- linux-2.6.16-rc4/fs/xfs/linux-2.6/xfs_sysctl.c	2006-01-03 17:29:59 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/xfs/linux-2.6/xfs_sysctl.c	2006-02-17 23:26:32 +0100
@@ -78,7 +78,7 @@ *****
 
 	{XFS_ERRLEVEL, "error_level", &xfs_params.error_level.val,
 	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
+	NULL, &sysctl_intvec, NULL,
 	&xfs_params.error_level.min, &xfs_params.error_level.max},
 
 	{XFS_SYNCD_TIMER, "xfssyncd_centisecs", &xfs_params.syncd_timer.val,
--- linux-2.6.16-rc4/fs/xfs/linux-2.6/xfs_sysctl.c	2006-01-03 17:29:59 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/xfs/linux-2.6/xfs_sysctl.c	2006-02-17 23:26:32 +0100
@@ -83,7 +83,7 @@ *****
 
 	{XFS_SYNCD_TIMER, "xfssyncd_centisecs", &xfs_params.syncd_timer.val,
 	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
+	NULL, &sysctl_intvec, NULL,
 	&xfs_params.syncd_timer.min, &xfs_params.syncd_timer.max},
 
 	{XFS_INHERIT_SYNC, "inherit_sync", &xfs_params.inherit_sync.val,
--- linux-2.6.16-rc4/fs/xfs/linux-2.6/xfs_sysctl.c	2006-01-03 17:29:59 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/xfs/linux-2.6/xfs_sysctl.c	2006-02-17 23:26:32 +0100
@@ -88,7 +88,7 @@ *****
 
 	{XFS_INHERIT_SYNC, "inherit_sync", &xfs_params.inherit_sync.val,
 	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
+	NULL, &sysctl_intvec, NULL,
 	&xfs_params.inherit_sync.min, &xfs_params.inherit_sync.max},
 
 	{XFS_INHERIT_NODUMP, "inherit_nodump", &xfs_params.inherit_nodump.val,
--- linux-2.6.16-rc4/fs/xfs/linux-2.6/xfs_sysctl.c	2006-01-03 17:29:59 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/xfs/linux-2.6/xfs_sysctl.c	2006-02-17 23:26:32 +0100
@@ -93,7 +93,7 @@ *****
 
 	{XFS_INHERIT_NODUMP, "inherit_nodump", &xfs_params.inherit_nodump.val,
 	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
+	NULL, &sysctl_intvec, NULL,
 	&xfs_params.inherit_nodump.min, &xfs_params.inherit_nodump.max},
 
 	{XFS_INHERIT_NOATIME, "inherit_noatime", &xfs_params.inherit_noatim.val,
--- linux-2.6.16-rc4/fs/xfs/linux-2.6/xfs_sysctl.c	2006-01-03 17:29:59 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/xfs/linux-2.6/xfs_sysctl.c	2006-02-17 23:26:32 +0100
@@ -98,7 +98,7 @@ *****
 
 	{XFS_INHERIT_NOATIME, "inherit_noatime", &xfs_params.inherit_noatim.val,
 	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
+	NULL, &sysctl_intvec, NULL,
 	&xfs_params.inherit_noatim.min, &xfs_params.inherit_noatim.max},
 
 	{XFS_BUF_TIMER, "xfsbufd_centisecs", &xfs_params.xfs_buf_timer.val,
--- linux-2.6.16-rc4/fs/xfs/linux-2.6/xfs_sysctl.c	2006-01-03 17:29:59 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/xfs/linux-2.6/xfs_sysctl.c	2006-02-17 23:26:32 +0100
@@ -103,7 +103,7 @@ *****
 
 	{XFS_BUF_TIMER, "xfsbufd_centisecs", &xfs_params.xfs_buf_timer.val,
 	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
+	NULL, &sysctl_intvec, NULL,
 	&xfs_params.xfs_buf_timer.min, &xfs_params.xfs_buf_timer.max},
 
 	{XFS_BUF_AGE, "age_buffer_centisecs", &xfs_params.xfs_buf_age.val,
--- linux-2.6.16-rc4/fs/xfs/linux-2.6/xfs_sysctl.c	2006-01-03 17:29:59 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/xfs/linux-2.6/xfs_sysctl.c	2006-02-17 23:26:32 +0100
@@ -108,7 +108,7 @@ *****
 
 	{XFS_BUF_AGE, "age_buffer_centisecs", &xfs_params.xfs_buf_age.val,
 	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
+	NULL, &sysctl_intvec, NULL,
 	&xfs_params.xfs_buf_age.min, &xfs_params.xfs_buf_age.max},
 
 	{XFS_INHERIT_NOSYM, "inherit_nosymlinks", &xfs_params.inherit_nosym.val,
--- linux-2.6.16-rc4/fs/xfs/linux-2.6/xfs_sysctl.c	2006-01-03 17:29:59 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/xfs/linux-2.6/xfs_sysctl.c	2006-02-17 23:26:32 +0100
@@ -113,7 +113,7 @@ *****
 
 	{XFS_INHERIT_NOSYM, "inherit_nosymlinks", &xfs_params.inherit_nosym.val,
 	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
+	NULL, &sysctl_intvec, NULL,
 	&xfs_params.inherit_nosym.min, &xfs_params.inherit_nosym.max},
 
 	{XFS_ROTORSTEP, "rotorstep", &xfs_params.rotorstep.val,
--- linux-2.6.16-rc4/fs/xfs/linux-2.6/xfs_sysctl.c	2006-01-03 17:29:59 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/xfs/linux-2.6/xfs_sysctl.c	2006-02-17 23:26:32 +0100
@@ -118,7 +118,7 @@ *****
 
 	{XFS_ROTORSTEP, "rotorstep", &xfs_params.rotorstep.val,
 	sizeof(int), 0644, NULL, &proc_dointvec_minmax,
-	&sysctl_intvec, NULL,
+	NULL, &sysctl_intvec, NULL,
 	&xfs_params.rotorstep.min, &xfs_params.rotorstep.max},
 
 	/* please keep this the last entry */
--- linux-2.6.16-rc4/fs/xfs/linux-2.6/xfs_sysctl.c	2006-01-03 17:29:59 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/fs/xfs/linux-2.6/xfs_sysctl.c	2006-02-17 23:26:32 +0100
@@ -125,7 +125,7 @@ *****
 #ifdef CONFIG_PROC_FS
 	{XFS_STATS_CLEAR, "stats_clear", &xfs_params.stats_clear.val,
 	sizeof(int), 0644, NULL, &xfs_stats_clear_proc_handler,
-	&sysctl_intvec, NULL,
+	NULL, &sysctl_intvec, NULL,
 	&xfs_params.stats_clear.min, &xfs_params.stats_clear.max},
 #endif /* CONFIG_PROC_FS */
 
--- linux-2.6.16-rc4/drivers/char/random.c	2006-02-18 14:39:53 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/drivers/char/random.c	2006-02-17 23:26:32 +0100
@@ -1174,7 +1174,7 @@ static char sysctl_bootid[16];
 static int proc_do_uuid(ctl_table *table, int write, struct file *filp,
 			void __user *buffer, size_t *lenp, loff_t *ppos)
 {
-	ctl_table fake_table;
+	ctl_table fake_table = {0};
 	unsigned char buf[64], tmp_uuid[16], *uuid;
 
 	uuid = table->data;
--- linux-2.6.16-rc4/include/linux/sysctl.h	2006-02-18 14:40:35 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/include/linux/sysctl.h	2006-02-17 23:26:33 +0100
@@ -880,6 +881,9 @@ typedef int ctl_handler (ctl_table *tabl
 typedef int proc_handler (ctl_table *ctl, int write, struct file * filp,
 			  void __user *buffer, size_t *lenp, loff_t *ppos);
 
+typedef int virt_handler (struct ctl_table *ctl, int write, xid_t xid,
+			  void **datap, size_t *lenp);
+
 extern int proc_dostring(ctl_table *, int, struct file *,
 			 void __user *, size_t *, loff_t *);
 extern int proc_dointvec(ctl_table *, int, struct file *,
--- linux-2.6.16-rc4/include/linux/sysctl.h	2006-02-18 14:40:35 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/include/linux/sysctl.h	2006-02-17 23:26:33 +0100
@@ -961,6 +965,7 @@ struct ctl_table 
 	mode_t mode;
 	ctl_table *child;
 	proc_handler *proc_handler;	/* Callback for text formatting */
+	virt_handler *virt_handler;	/* Context virtualization */
 	ctl_handler *strategy;		/* Callback function for all r/w */
 	struct proc_dir_entry *de;	/* /proc control block */
 	void *extra1;
--- linux-2.6.16-rc4/kernel/sysctl.c	2006-02-18 14:40:38 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/kernel/sysctl.c	2006-02-18 15:33:58 +0100
@@ -1537,16 +1553,20 @@ static ssize_t proc_writesys(struct file
 int proc_dostring(ctl_table *table, int write, struct file *filp,
 		  void __user *buffer, size_t *lenp, loff_t *ppos)
 {
-	size_t len;
+	size_t len, maxlen;
 	char __user *p;
 	char c;
+	void *data;
+
+	data = table->data;
+	maxlen = table->maxlen;
+
+	if (!data || !maxlen || !*lenp || (*ppos && !write))
+		return (*lenp = 0);
 	
-	if (!table->data || !table->maxlen || !*lenp ||
-	    (*ppos && !write)) {
-		*lenp = 0;
-		return 0;
-	}
-	
+	if (table->virt_handler)
+		table->virt_handler(table, write, filp->f_xid, &data, &maxlen);
+
 	if (write) {
 		len = 0;
 		p = buffer;
--- linux-2.6.16-rc4/kernel/sysctl.c	2006-02-18 14:40:38 +0100
+++ linux-2.6.16-rc4-vs2.1.1-rc8/kernel/sysctl.c	2006-02-18 15:33:58 +0100
@@ -1557,16 +1577,16 @@ int proc_dostring(ctl_table *table, int 
 				break;
 			len++;
 		}
-		if (len >= table->maxlen)
-			len = table->maxlen-1;
-		if(copy_from_user(table->data, buffer, len))
+		if (len >= maxlen)
+			len = maxlen-1;
+		if(copy_from_user(data, buffer, len))
 			return -EFAULT;
-		((char *) table->data)[len] = 0;
+		((char *) data)[len] = 0;
 		*ppos += *lenp;
 	} else {
-		len = strlen(table->data);
-		if (len > table->maxlen)
-			len = table->maxlen;
+		len = strlen(data);
+		if (len > maxlen)
+			len = maxlen;
 		if (len > *lenp)
 			len = *lenp;
 		if (len)
