--- linux-2.6.18.2/arch/alpha/kernel/osf_sys.c 2006-09-20 16:57:57 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/alpha/kernel/osf_sys.c 2006-09-25 15:40:02 +0200 @@ -399,18 +400,20 @@ asmlinkage int osf_utsname(char __user *name) { int error; + struct new_utsname *ptr; down_read(&uts_sem); + ptr = vx_new_utsname(); error = -EFAULT; - if (copy_to_user(name + 0, system_utsname.sysname, 32)) + if (copy_to_user(name + 0, ptr->sysname, 32)) goto out; - if (copy_to_user(name + 32, system_utsname.nodename, 32)) + if (copy_to_user(name + 32, ptr->nodename, 32)) goto out; - if (copy_to_user(name + 64, system_utsname.release, 32)) + if (copy_to_user(name + 64, ptr->release, 32)) goto out; - if (copy_to_user(name + 96, system_utsname.version, 32)) + if (copy_to_user(name + 96, ptr->version, 32)) goto out; - if (copy_to_user(name + 128, system_utsname.machine, 32)) + if (copy_to_user(name + 128, ptr->machine, 32)) goto out; error = 0; --- linux-2.6.18.2/arch/alpha/kernel/osf_sys.c 2006-09-20 16:57:57 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/alpha/kernel/osf_sys.c 2006-09-25 15:40:02 +0200 @@ -439,6 +442,7 @@ osf_getdomainname(char __user *name, int { unsigned len; int i; + char *domainname; if (!access_ok(VERIFY_WRITE, name, namelen)) return -EFAULT; --- linux-2.6.18.2/arch/alpha/kernel/osf_sys.c 2006-09-20 16:57:57 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/alpha/kernel/osf_sys.c 2006-09-25 15:40:02 +0200 @@ -448,9 +452,10 @@ osf_getdomainname(char __user *name, int len = 32; down_read(&uts_sem); + domainname = vx_new_uts(domainname); for (i = 0; i < len; ++i) { - __put_user(system_utsname.domainname[i], name + i); - if (system_utsname.domainname[i] == '\0') + __put_user(domainname[i], name + i); + if (domainname[i] == '\0') break; } up_read(&uts_sem); --- linux-2.6.18.2/arch/alpha/kernel/osf_sys.c 2006-09-20 16:57:57 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/alpha/kernel/osf_sys.c 2006-09-25 15:40:02 +0200 @@ -607,17 +612,6 @@ osf_sigstack(struct sigstack __user *uss asmlinkage long osf_sysinfo(int command, char __user *buf, long count) { - static char * sysinfo_table[] = { - system_utsname.sysname, - system_utsname.nodename, - system_utsname.release, - system_utsname.version, - system_utsname.machine, - "alpha", /* instruction set architecture */ - "dummy", /* hardware serial number */ - "dummy", /* hardware manufacturer */ - "dummy", /* secure RPC domain */ - }; unsigned long offset; char *res; long len, err = -EINVAL; --- linux-2.6.18.2/arch/alpha/kernel/osf_sys.c 2006-09-20 16:57:57 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/alpha/kernel/osf_sys.c 2006-09-25 15:40:02 +0200 @@ -623,7 +617,7 @@ ***** long len, err = -EINVAL; offset = command-1; - if (offset >= ARRAY_SIZE(sysinfo_table)) { + if (offset >= 9) { /* Digital UNIX has a few unpublished interfaces here */ printk("sysinfo(%d)", command); goto out; --- linux-2.6.18.2/arch/alpha/kernel/osf_sys.c 2006-09-20 16:57:57 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/alpha/kernel/osf_sys.c 2006-09-25 15:40:02 +0200 @@ -630,7 +624,18 @@ ***** } down_read(&uts_sem); - res = sysinfo_table[offset]; + switch (offset) + { + case 0: res = vx_new_uts(sysname); break; + case 1: res = vx_new_uts(nodename); break; + case 2: res = vx_new_uts(release); break; + case 3: res = vx_new_uts(version); break; + case 4: res = vx_new_uts(machine); break; + case 5: res = "alpha"; break; + default: + res = "dummy"; + break; + } len = strlen(res)+1; if (len > count) len = count; --- linux-2.6.18.2/arch/i386/kernel/sys_i386.c 2006-06-18 04:51:53 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/i386/kernel/sys_i386.c 2006-09-20 17:01:44 +0200 @@ -210,7 +211,7 @@ asmlinkage int sys_uname(struct old_utsn if (!name) return -EFAULT; down_read(&uts_sem); - err=copy_to_user(name, &system_utsname, sizeof (*name)); + err=copy_to_user(name, vx_new_utsname(), sizeof (*name)); up_read(&uts_sem); return err?-EFAULT:0; } --- linux-2.6.18.2/arch/i386/kernel/sys_i386.c 2006-06-18 04:51:53 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/i386/kernel/sys_i386.c 2006-09-20 17:01:44 +0200 @@ -218,6 +219,7 @@ asmlinkage int sys_uname(struct old_utsn asmlinkage int sys_olduname(struct oldold_utsname __user * name) { int error; + struct new_utsname *ptr; if (!name) return -EFAULT; --- linux-2.6.18.2/arch/i386/kernel/sys_i386.c 2006-06-18 04:51:53 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/i386/kernel/sys_i386.c 2006-09-20 17:01:44 +0200 @@ -226,15 +228,16 @@ asmlinkage int sys_olduname(struct oldol down_read(&uts_sem); - error = __copy_to_user(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN); + ptr = vx_new_utsname(); + error = __copy_to_user(&name->sysname,ptr->sysname,__OLD_UTS_LEN); error |= __put_user(0,name->sysname+__OLD_UTS_LEN); - error |= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN); + error |= __copy_to_user(&name->nodename,ptr->nodename,__OLD_UTS_LEN); error |= __put_user(0,name->nodename+__OLD_UTS_LEN); - error |= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN); + error |= __copy_to_user(&name->release,ptr->release,__OLD_UTS_LEN); error |= __put_user(0,name->release+__OLD_UTS_LEN); - error |= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN); + error |= __copy_to_user(&name->version,ptr->version,__OLD_UTS_LEN); error |= __put_user(0,name->version+__OLD_UTS_LEN); - error |= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN); + error |= __copy_to_user(&name->machine,ptr->machine,__OLD_UTS_LEN); error |= __put_user(0,name->machine+__OLD_UTS_LEN); up_read(&uts_sem); --- linux-2.6.18.2/arch/m32r/kernel/sys_m32r.c 2006-09-20 16:57:58 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/m32r/kernel/sys_m32r.c 2006-09-20 17:01:44 +0200 @@ -205,7 +206,7 @@ asmlinkage int sys_uname(struct old_utsn if (!name) return -EFAULT; down_read(&uts_sem); - err=copy_to_user(name, &system_utsname, sizeof (*name)); + err=copy_to_user(name, vx_new_utsname(), sizeof (*name)); up_read(&uts_sem); return err?-EFAULT:0; } --- linux-2.6.18.2/arch/mips/kernel/linux32.c 2006-09-20 16:57:58 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/mips/kernel/linux32.c 2006-09-25 15:40:02 +0200 @@ -1039,7 +1040,7 @@ asmlinkage long sys32_newuname(struct ne int ret = 0; down_read(&uts_sem); - if (copy_to_user(name,&system_utsname,sizeof *name)) + if (copy_to_user(name, vx_new_utsname(), sizeof *name)) ret = -EFAULT; up_read(&uts_sem); --- linux-2.6.18.2/arch/mips/kernel/syscall.c 2006-09-20 16:57:58 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/mips/kernel/syscall.c 2006-09-20 17:01:44 +0200 @@ -231,7 +232,7 @@ out: */ asmlinkage int sys_uname(struct old_utsname __user * name) { - if (name && !copy_to_user(name, &system_utsname, sizeof (*name))) + if (name && !copy_to_user(name, vx_new_utsname(), sizeof (*name))) return 0; return -EFAULT; } --- linux-2.6.18.2/arch/mips/kernel/syscall.c 2006-09-20 16:57:58 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/mips/kernel/syscall.c 2006-09-20 17:01:44 +0200 @@ -242,6 +243,7 @@ asmlinkage int sys_uname(struct old_utsn asmlinkage int sys_olduname(struct oldold_utsname __user * name) { int error; + struct new_utsname *ptr; if (!name) return -EFAULT; --- linux-2.6.18.2/arch/mips/kernel/syscall.c 2006-09-20 16:57:58 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/mips/kernel/syscall.c 2006-09-20 17:01:44 +0200 @@ -248,15 +250,16 @@ ***** if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname))) return -EFAULT; - error = __copy_to_user(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN); + ptr = vx_new_utsname(); + error = __copy_to_user(&name->sysname,ptr->sysname,__OLD_UTS_LEN); error -= __put_user(0,name->sysname+__OLD_UTS_LEN); - error -= __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN); + error -= __copy_to_user(&name->nodename,ptr->nodename,__OLD_UTS_LEN); error -= __put_user(0,name->nodename+__OLD_UTS_LEN); - error -= __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN); + error -= __copy_to_user(&name->release,ptr->release,__OLD_UTS_LEN); error -= __put_user(0,name->release+__OLD_UTS_LEN); - error -= __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN); + error -= __copy_to_user(&name->version,ptr->version,__OLD_UTS_LEN); error -= __put_user(0,name->version+__OLD_UTS_LEN); - error -= __copy_to_user(&name->machine,&system_utsname.machine,__OLD_UTS_LEN); + error -= __copy_to_user(&name->machine,ptr->machine,__OLD_UTS_LEN); error = __put_user(0,name->machine+__OLD_UTS_LEN); error = error ? -EFAULT : 0; --- linux-2.6.18.2/arch/mips/kernel/sysirix.c 2006-09-20 16:57:58 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/mips/kernel/sysirix.c 2006-10-07 04:29:47 +0200 @@ -884,7 +885,7 @@ asmlinkage int irix_getdomainname(char _ down_read(&uts_sem); if (len > __NEW_UTS_LEN) len = __NEW_UTS_LEN; - err = copy_to_user(name, system_utsname.domainname, len) ? -EFAULT : 0; + err = copy_to_user(name, vx_new_uts(domainname), len) ? -EFAULT : 0; up_read(&uts_sem); return err; --- linux-2.6.18.2/arch/mips/kernel/sysirix.c 2006-09-20 16:57:58 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/mips/kernel/sysirix.c 2006-10-07 04:29:47 +0200 @@ -1127,11 +1128,11 @@ struct iuname { asmlinkage int irix_uname(struct iuname __user *buf) { down_read(&uts_sem); - if (copy_from_user(system_utsname.sysname, buf->sysname, 65) - || copy_from_user(system_utsname.nodename, buf->nodename, 65) - || copy_from_user(system_utsname.release, buf->release, 65) - || copy_from_user(system_utsname.version, buf->version, 65) - || copy_from_user(system_utsname.machine, buf->machine, 65)) { + if (copy_from_user(vx_new_uts(sysname), buf->sysname, 65) + || copy_from_user(vx_new_uts(nodename), buf->nodename, 65) + || copy_from_user(vx_new_uts(release), buf->release, 65) + || copy_from_user(vx_new_uts(version), buf->version, 65) + || copy_from_user(vx_new_uts(machine), buf->machine, 65)) { return -EFAULT; } up_read(&uts_sem); --- linux-2.6.18.2/arch/parisc/hpux/sys_hpux.c 2006-09-20 16:58:01 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/parisc/hpux/sys_hpux.c 2006-09-20 17:01:44 +0200 @@ -266,15 +267,15 @@ static int hpux_uname(struct hpux_utsnam down_read(&uts_sem); - error = __copy_to_user(&name->sysname,&system_utsname.sysname,HPUX_UTSLEN-1); + error = __copy_to_user(&name->sysname,vx_new_uts(sysname),HPUX_UTSLEN-1); error |= __put_user(0,name->sysname+HPUX_UTSLEN-1); - error |= __copy_to_user(&name->nodename,&system_utsname.nodename,HPUX_UTSLEN-1); + error |= __copy_to_user(&name->nodename,vx_new_uts(nodename),HPUX_UTSLEN-1); error |= __put_user(0,name->nodename+HPUX_UTSLEN-1); - error |= __copy_to_user(&name->release,&system_utsname.release,HPUX_UTSLEN-1); + error |= __copy_to_user(&name->release,vx_new_uts(release),HPUX_UTSLEN-1); error |= __put_user(0,name->release+HPUX_UTSLEN-1); - error |= __copy_to_user(&name->version,&system_utsname.version,HPUX_UTSLEN-1); + error |= __copy_to_user(&name->version,vx_new_uts(version),HPUX_UTSLEN-1); error |= __put_user(0,name->version+HPUX_UTSLEN-1); - error |= __copy_to_user(&name->machine,&system_utsname.machine,HPUX_UTSLEN-1); + error |= __copy_to_user(&name->machine,vx_new_uts(machine),HPUX_UTSLEN-1); error |= __put_user(0,name->machine+HPUX_UTSLEN-1); up_read(&uts_sem); --- linux-2.6.18.2/arch/parisc/hpux/sys_hpux.c 2006-09-20 16:58:01 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/parisc/hpux/sys_hpux.c 2006-09-20 17:01:44 +0200 @@ -373,8 +374,8 @@ int hpux_utssys(char *ubuf, int n, int t /* TODO: print a warning about using this? */ down_write(&uts_sem); error = -EFAULT; - if (!copy_from_user(system_utsname.sysname, ubuf, len)) { - system_utsname.sysname[len] = 0; + if (!copy_from_user(vx_new_uts(sysname), ubuf, len)) { + vx_new_uts(sysname)[len] = 0; error = 0; } up_write(&uts_sem); --- linux-2.6.18.2/arch/parisc/hpux/sys_hpux.c 2006-09-20 16:58:01 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/parisc/hpux/sys_hpux.c 2006-09-20 17:01:44 +0200 @@ -400,8 +401,8 @@ int hpux_utssys(char *ubuf, int n, int t /* TODO: print a warning about this? */ down_write(&uts_sem); error = -EFAULT; - if (!copy_from_user(system_utsname.release, ubuf, len)) { - system_utsname.release[len] = 0; + if (!copy_from_user(vx_new_uts(release), ubuf, len)) { + vx_new_uts(release)[len] = 0; error = 0; } up_write(&uts_sem); --- linux-2.6.18.2/arch/parisc/hpux/sys_hpux.c 2006-09-20 16:58:01 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/parisc/hpux/sys_hpux.c 2006-09-20 17:01:44 +0200 @@ -422,7 +423,7 @@ int hpux_getdomainname(char *name, int l down_read(&uts_sem); - nlen = strlen(system_utsname.domainname) + 1; + nlen = strlen(vx_new_uts(domainname)) + 1; if (nlen < len) len = nlen; --- linux-2.6.18.2/arch/parisc/hpux/sys_hpux.c 2006-09-20 16:58:01 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/parisc/hpux/sys_hpux.c 2006-09-20 17:01:44 +0200 @@ -428,7 +429,7 @@ ***** len = nlen; if(len > __NEW_UTS_LEN) goto done; - if(copy_to_user(name, system_utsname.domainname, len)) + if(copy_to_user(name, vx_new_uts(domainname), len)) goto done; err = 0; done: --- linux-2.6.18.2/arch/powerpc/kernel/syscalls.c 2006-06-18 04:52:17 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/powerpc/kernel/syscalls.c 2006-09-20 17:01:44 +0200 @@ -260,7 +261,7 @@ long ppc_newuname(struct new_utsname __u int err = 0; down_read(&uts_sem); - if (copy_to_user(name, &system_utsname, sizeof(*name))) + if (copy_to_user(name, vx_new_utsname(), sizeof(*name))) err = -EFAULT; up_read(&uts_sem); if (!err) --- linux-2.6.18.2/arch/powerpc/kernel/syscalls.c 2006-06-18 04:52:17 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/powerpc/kernel/syscalls.c 2006-09-20 17:01:44 +0200 @@ -273,7 +274,7 @@ int sys_uname(struct old_utsname __user int err = 0; down_read(&uts_sem); - if (copy_to_user(name, &system_utsname, sizeof(*name))) + if (copy_to_user(name, vx_new_utsname(), sizeof(*name))) err = -EFAULT; up_read(&uts_sem); if (!err) --- linux-2.6.18.2/arch/powerpc/kernel/syscalls.c 2006-06-18 04:52:17 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/powerpc/kernel/syscalls.c 2006-09-20 17:01:44 +0200 @@ -284,6 +285,7 @@ int sys_uname(struct old_utsname __user int sys_olduname(struct oldold_utsname __user *name) { int error; + struct new_utsname *ptr; if (!access_ok(VERIFY_WRITE, name, sizeof(struct oldold_utsname))) return -EFAULT; --- linux-2.6.18.2/arch/powerpc/kernel/syscalls.c 2006-06-18 04:52:17 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/powerpc/kernel/syscalls.c 2006-09-20 17:01:44 +0200 @@ -289,20 +291,16 @@ ***** return -EFAULT; down_read(&uts_sem); - error = __copy_to_user(&name->sysname, &system_utsname.sysname, - __OLD_UTS_LEN); + ptr = vx_new_utsname(); + error = __copy_to_user(&name->sysname, ptr->sysname, __OLD_UTS_LEN); error |= __put_user(0, name->sysname + __OLD_UTS_LEN); - error |= __copy_to_user(&name->nodename, &system_utsname.nodename, - __OLD_UTS_LEN); + error |= __copy_to_user(&name->nodename, ptr->nodename, __OLD_UTS_LEN); error |= __put_user(0, name->nodename + __OLD_UTS_LEN); - error |= __copy_to_user(&name->release, &system_utsname.release, - __OLD_UTS_LEN); + error |= __copy_to_user(&name->release, ptr->release, __OLD_UTS_LEN); error |= __put_user(0, name->release + __OLD_UTS_LEN); - error |= __copy_to_user(&name->version, &system_utsname.version, - __OLD_UTS_LEN); + error |= __copy_to_user(&name->version, ptr->version, __OLD_UTS_LEN); error |= __put_user(0, name->version + __OLD_UTS_LEN); - error |= __copy_to_user(&name->machine, &system_utsname.machine, - __OLD_UTS_LEN); + error |= __copy_to_user(&name->machine, ptr->machine, __OLD_UTS_LEN); error |= override_machine(name->machine); up_read(&uts_sem); --- linux-2.6.18.2/arch/sh/kernel/sys_sh.c 2005-08-29 22:24:55 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/sh/kernel/sys_sh.c 2006-09-20 17:01:44 +0200 @@ -267,7 +268,7 @@ asmlinkage int sys_uname(struct old_utsn if (!name) return -EFAULT; down_read(&uts_sem); - err=copy_to_user(name, &system_utsname, sizeof (*name)); + err=copy_to_user(name, vx_new_utsname(), sizeof (*name)); up_read(&uts_sem); return err?-EFAULT:0; } --- linux-2.6.18.2/arch/sh64/kernel/sys_sh64.c 2005-06-22 02:37:59 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/sh64/kernel/sys_sh64.c 2006-09-20 17:01:44 +0200 @@ -279,7 +280,7 @@ asmlinkage int sys_uname(struct old_utsn if (!name) return -EFAULT; down_read(&uts_sem); - err=copy_to_user(name, &system_utsname, sizeof (*name)); + err=copy_to_user(name, vx_new_utsname(), sizeof (*name)); up_read(&uts_sem); return err?-EFAULT:0; } --- linux-2.6.18.2/arch/sparc/kernel/sys_sparc.c 2006-09-20 16:58:04 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/sparc/kernel/sys_sparc.c 2006-09-20 19:57:58 +0200 @@ -475,7 +476,7 @@ asmlinkage int sys_getdomainname(char __ down_read(&uts_sem); - nlen = strlen(system_utsname.domainname) + 1; + nlen = strlen(vx_new_uts(domainname)) + 1; err = -EINVAL; if (nlen > len) goto out; --- linux-2.6.18.2/arch/sparc/kernel/sys_sparc.c 2006-09-20 16:58:04 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/sparc/kernel/sys_sparc.c 2006-09-20 19:57:58 +0200 @@ -481,7 +482,7 @@ ***** goto out; err = -EFAULT; - if (!copy_to_user(name, system_utsname.domainname, nlen)) + if (!copy_to_user(name, vx_new_uts(domainname), nlen)) err = 0; out: --- linux-2.6.18.2/arch/sparc/kernel/sys_sunos.c 2006-09-20 16:58:06 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/sparc/kernel/sys_sunos.c 2006-09-20 17:01:44 +0200 @@ -482,14 +483,16 @@ struct sunos_utsname { asmlinkage int sunos_uname(struct sunos_utsname __user *name) { int ret; + struct new_utsname *ptr; down_read(&uts_sem); - ret = copy_to_user(&name->sname[0], &system_utsname.sysname[0], sizeof(name->sname) - 1); + ptr = vx_new_utsname(); + ret = copy_to_user(&name->sname[0], ptr->sysname, sizeof(name->sname) - 1); if (!ret) { - ret |= __copy_to_user(&name->nname[0], &system_utsname.nodename[0], sizeof(name->nname) - 1); + ret |= __copy_to_user(&name->nname[0], ptr->nodename, sizeof(name->nname) - 1); ret |= __put_user('\0', &name->nname[8]); - ret |= __copy_to_user(&name->rel[0], &system_utsname.release[0], sizeof(name->rel) - 1); - ret |= __copy_to_user(&name->ver[0], &system_utsname.version[0], sizeof(name->ver) - 1); - ret |= __copy_to_user(&name->mach[0], &system_utsname.machine[0], sizeof(name->mach) - 1); + ret |= __copy_to_user(&name->rel[0], ptr->release, sizeof(name->rel) - 1); + ret |= __copy_to_user(&name->ver[0], ptr->version, sizeof(name->ver) - 1); + ret |= __copy_to_user(&name->mach[0], ptr->machine, sizeof(name->mach) - 1); } up_read(&uts_sem); return ret ? -EFAULT : 0; --- linux-2.6.18.2/arch/sparc64/kernel/sys_sparc.c 2006-09-20 16:58:06 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/sparc64/kernel/sys_sparc.c 2006-09-20 19:57:05 +0200 @@ -712,7 +713,7 @@ asmlinkage long sys_getdomainname(char _ down_read(&uts_sem); - nlen = strlen(system_utsname.domainname) + 1; + nlen = strlen(vx_new_uts(domainname)) + 1; err = -EINVAL; if (nlen > len) goto out; --- linux-2.6.18.2/arch/sparc64/kernel/sys_sparc.c 2006-09-20 16:58:06 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/sparc64/kernel/sys_sparc.c 2006-09-20 19:57:05 +0200 @@ -718,7 +719,7 @@ ***** goto out; err = -EFAULT; - if (!copy_to_user(name, system_utsname.domainname, nlen)) + if (!copy_to_user(name, vx_new_uts(domainname), nlen)) err = 0; out: --- linux-2.6.18.2/arch/sparc64/kernel/sys_sunos32.c 2006-09-20 16:58:06 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/sparc64/kernel/sys_sunos32.c 2006-09-20 17:01:44 +0200 @@ -437,18 +438,20 @@ struct sunos_utsname { asmlinkage int sunos_uname(struct sunos_utsname __user *name) { int ret; + struct new_utsname *ptr; down_read(&uts_sem); - ret = copy_to_user(&name->sname[0], &system_utsname.sysname[0], + ptr = vx_new_utsname(); + ret = copy_to_user(&name->sname[0], ptr->sysname, sizeof(name->sname) - 1); - ret |= copy_to_user(&name->nname[0], &system_utsname.nodename[0], + ret |= copy_to_user(&name->nname[0], ptr->nodename, sizeof(name->nname) - 1); ret |= put_user('\0', &name->nname[8]); - ret |= copy_to_user(&name->rel[0], &system_utsname.release[0], + ret |= copy_to_user(&name->rel[0], ptr->release, sizeof(name->rel) - 1); - ret |= copy_to_user(&name->ver[0], &system_utsname.version[0], + ret |= copy_to_user(&name->ver[0], ptr->version, sizeof(name->ver) - 1); - ret |= copy_to_user(&name->mach[0], &system_utsname.machine[0], + ret |= copy_to_user(&name->mach[0], ptr->machine, sizeof(name->mach) - 1); up_read(&uts_sem); return (ret ? -EFAULT : 0); --- linux-2.6.18.2/arch/sparc64/solaris/misc.c 2006-09-20 16:58:06 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/sparc64/solaris/misc.c 2006-09-20 17:01:44 +0200 @@ -248,7 +249,7 @@ asmlinkage int solaris_utssys(u32 buf, u /* Let's cheat */ err = set_utsfield(v->sysname, "SunOS", 1, 0); down_read(&uts_sem); - err |= set_utsfield(v->nodename, system_utsname.nodename, + err |= set_utsfield(v->nodename, vx_new_uts(nodename), 1, 1); up_read(&uts_sem); err |= set_utsfield(v->release, "2.6", 0, 0); --- linux-2.6.18.2/arch/sparc64/solaris/misc.c 2006-09-20 16:58:06 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/sparc64/solaris/misc.c 2006-09-20 17:01:44 +0200 @@ -272,7 +273,7 @@ asmlinkage int solaris_utsname(u32 buf) /* Why should we not lie a bit? */ down_read(&uts_sem); err = set_utsfield(v->sysname, "SunOS", 0, 0); - err |= set_utsfield(v->nodename, system_utsname.nodename, 1, 1); + err |= set_utsfield(v->nodename, vx_new_uts(nodename), 1, 1); err |= set_utsfield(v->release, "5.6", 0, 0); err |= set_utsfield(v->version, "Generic", 0, 0); err |= set_utsfield(v->machine, machine(), 0, 0); --- linux-2.6.18.2/arch/sparc64/solaris/misc.c 2006-09-20 16:58:06 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/sparc64/solaris/misc.c 2006-09-20 17:01:44 +0200 @@ -304,7 +305,7 @@ asmlinkage int solaris_sysinfo(int cmd, case SI_HOSTNAME: r = buffer + 256; down_read(&uts_sem); - for (p = system_utsname.nodename, q = buffer; + for (p = vx_new_uts(nodename), q = buffer; q < r && *p && *p != '.'; *q++ = *p++); up_read(&uts_sem); *q = 0; --- linux-2.6.18.2/arch/um/kernel/syscall.c 2006-09-20 16:58:06 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/um/kernel/syscall.c 2006-09-21 16:41:49 +0200 @@ -110,7 +112,7 @@ long sys_uname(struct old_utsname __user if (!name) return -EFAULT; down_read(&uts_sem); - err = copy_to_user(name, &system_utsname, sizeof (*name)); + err = copy_to_user(name, vx_new_utsname(), sizeof (*name)); up_read(&uts_sem); return err?-EFAULT:0; } --- linux-2.6.18.2/arch/um/kernel/syscall.c 2006-09-20 16:58:06 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/um/kernel/syscall.c 2006-09-21 16:41:49 +0200 @@ -118,6 +120,7 @@ long sys_uname(struct old_utsname __user long sys_olduname(struct oldold_utsname __user * name) { long error; + struct new_utsname *ptr; if (!name) return -EFAULT; --- linux-2.6.18.2/arch/um/kernel/syscall.c 2006-09-20 16:58:06 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/um/kernel/syscall.c 2006-09-21 16:41:49 +0200 @@ -126,19 +129,20 @@ long sys_olduname(struct oldold_utsname down_read(&uts_sem); - error = __copy_to_user(&name->sysname,&system_utsname.sysname, + ptr = vx_new_utsname(); + error = __copy_to_user(&name->sysname,ptr->sysname, __OLD_UTS_LEN); error |= __put_user(0,name->sysname+__OLD_UTS_LEN); - error |= __copy_to_user(&name->nodename,&system_utsname.nodename, + error |= __copy_to_user(&name->nodename,ptr->nodename, __OLD_UTS_LEN); error |= __put_user(0,name->nodename+__OLD_UTS_LEN); - error |= __copy_to_user(&name->release,&system_utsname.release, + error |= __copy_to_user(&name->release,ptr->release, __OLD_UTS_LEN); error |= __put_user(0,name->release+__OLD_UTS_LEN); - error |= __copy_to_user(&name->version,&system_utsname.version, + error |= __copy_to_user(&name->version,ptr->version, __OLD_UTS_LEN); error |= __put_user(0,name->version+__OLD_UTS_LEN); - error |= __copy_to_user(&name->machine,&system_utsname.machine, + error |= __copy_to_user(&name->machine,ptr->machine, __OLD_UTS_LEN); error |= __put_user(0,name->machine+__OLD_UTS_LEN); --- linux-2.6.18.2/arch/um/sys-x86_64/syscalls.c 2006-06-18 04:52:42 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/um/sys-x86_64/syscalls.c 2006-09-20 17:01:44 +0200 @@ -21,7 +22,7 @@ asmlinkage long sys_uname64(struct new_u { int err; down_read(&uts_sem); - err = copy_to_user(name, &system_utsname, sizeof (*name)); + err = copy_to_user(name, vx_new_utsname(), sizeof (*name)); up_read(&uts_sem); if (personality(current->personality) == PER_LINUX32) err |= copy_to_user(&name->machine, "i686", 5); --- linux-2.6.18.2/arch/x86_64/ia32/sys_ia32.c 2006-09-20 16:58:06 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/x86_64/ia32/sys_ia32.c 2006-09-25 15:40:02 +0200 @@ -779,6 +780,7 @@ asmlinkage long sys32_mmap2(unsigned lon asmlinkage long sys32_olduname(struct oldold_utsname __user * name) { int error; + struct new_utsname *ptr; if (!name) return -EFAULT; --- linux-2.6.18.2/arch/x86_64/ia32/sys_ia32.c 2006-09-20 16:58:06 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/x86_64/ia32/sys_ia32.c 2006-09-25 15:40:02 +0200 @@ -787,13 +789,14 @@ asmlinkage long sys32_olduname(struct ol down_read(&uts_sem); - error = __copy_to_user(&name->sysname,&system_utsname.sysname,__OLD_UTS_LEN); + ptr = vx_new_utsname(); + error = __copy_to_user(&name->sysname,ptr->sysname,__OLD_UTS_LEN); __put_user(0,name->sysname+__OLD_UTS_LEN); - __copy_to_user(&name->nodename,&system_utsname.nodename,__OLD_UTS_LEN); + __copy_to_user(&name->nodename,ptr->nodename,__OLD_UTS_LEN); __put_user(0,name->nodename+__OLD_UTS_LEN); - __copy_to_user(&name->release,&system_utsname.release,__OLD_UTS_LEN); + __copy_to_user(&name->release,ptr->release,__OLD_UTS_LEN); __put_user(0,name->release+__OLD_UTS_LEN); - __copy_to_user(&name->version,&system_utsname.version,__OLD_UTS_LEN); + __copy_to_user(&name->version,ptr->version,__OLD_UTS_LEN); __put_user(0,name->version+__OLD_UTS_LEN); { char *arch = "x86_64"; --- linux-2.6.18.2/arch/x86_64/ia32/sys_ia32.c 2006-09-20 16:58:06 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/x86_64/ia32/sys_ia32.c 2006-09-25 15:40:02 +0200 @@ -816,7 +819,7 @@ long sys32_uname(struct old_utsname __us if (!name) return -EFAULT; down_read(&uts_sem); - err=copy_to_user(name, &system_utsname, sizeof (*name)); + err=copy_to_user(name, vx_new_utsname(), sizeof (*name)); up_read(&uts_sem); if (personality(current->personality) == PER_LINUX32) err |= copy_to_user(&name->machine, "i686", 5); --- linux-2.6.18.2/arch/x86_64/kernel/sys_x86_64.c 2006-01-03 17:29:20 +0100 +++ linux-2.6.18.2-vs2.1.1/arch/x86_64/kernel/sys_x86_64.c 2006-09-20 17:01:44 +0200 @@ -148,7 +149,7 @@ asmlinkage long sys_uname(struct new_uts { int err; down_read(&uts_sem); - err = copy_to_user(name, &system_utsname, sizeof (*name)); + err = copy_to_user(name, vx_new_utsname(), sizeof (*name)); up_read(&uts_sem); if (personality(current->personality) == PER_LINUX32) err |= copy_to_user(&name->machine, "i686", 5); --- linux-2.6.18.2/arch/xtensa/kernel/syscalls.c 2006-09-20 16:58:06 +0200 +++ linux-2.6.18.2-vs2.1.1/arch/xtensa/kernel/syscalls.c 2006-09-20 17:01:44 +0200 @@ -128,7 +129,7 @@ out: int sys_uname(struct old_utsname * name) { - if (name && !copy_to_user(name, &system_utsname, sizeof (*name))) + if (name && !copy_to_user(name, vx_new_utsname(), sizeof (*name))) return 0; return -EFAULT; } --- linux-2.6.18.2/fs/exec.c 2006-09-20 16:58:34 +0200 +++ linux-2.6.18.2-vs2.1.1/fs/exec.c 2006-09-25 15:40:02 +0200 @@ -1322,7 +1325,7 @@ static void format_corename(char *corena case 'h': down_read(&uts_sem); rc = snprintf(out_ptr, out_end - out_ptr, - "%s", system_utsname.nodename); + "%s", vx_new_uts(nodename)); up_read(&uts_sem); if (rc > out_end - out_ptr) goto out; --- linux-2.6.18.2/fs/lockd/clntproc.c 2006-09-20 16:58:35 +0200 +++ linux-2.6.18.2-vs2.1.1/fs/lockd/clntproc.c 2006-09-25 15:40:02 +0200 @@ -129,7 +130,7 @@ static void nlmclnt_setlockargs(struct n nlmclnt_next_cookie(&argp->cookie); argp->state = nsm_local_state; memcpy(&lock->fh, NFS_FH(fl->fl_file->f_dentry->d_inode), sizeof(struct nfs_fh)); - lock->caller = system_utsname.nodename; + lock->caller = vx_new_uts(nodename); lock->oh.data = req->a_owner; lock->oh.len = snprintf(req->a_owner, sizeof(req->a_owner), "%u@%s", (unsigned int)fl->fl_u.nfs_fl.owner->pid, --- linux-2.6.18.2/fs/lockd/clntproc.c 2006-09-20 16:58:35 +0200 +++ linux-2.6.18.2-vs2.1.1/fs/lockd/clntproc.c 2006-09-25 15:40:02 +0200 @@ -133,7 +134,7 @@ ***** lock->oh.data = req->a_owner; lock->oh.len = snprintf(req->a_owner, sizeof(req->a_owner), "%u@%s", (unsigned int)fl->fl_u.nfs_fl.owner->pid, - system_utsname.nodename); + vx_new_uts(nodename)); lock->svid = fl->fl_u.nfs_fl.owner->pid; lock->fl.fl_start = fl->fl_start; lock->fl.fl_end = fl->fl_end; --- linux-2.6.18.2/fs/lockd/mon.c 2006-06-18 04:54:37 +0200 +++ linux-2.6.18.2-vs2.1.1/fs/lockd/mon.c 2006-09-25 15:40:02 +0200 @@ -152,7 +153,7 @@ xdr_encode_common(struct rpc_rqst *rqstp */ sprintf(buffer, "%u.%u.%u.%u", NIPQUAD(argp->addr)); if (!(p = xdr_encode_string(p, buffer)) - || !(p = xdr_encode_string(p, system_utsname.nodename))) + || !(p = xdr_encode_string(p, vx_new_uts(nodename)))) return ERR_PTR(-EIO); *p++ = htonl(argp->prog); *p++ = htonl(argp->vers); --- linux-2.6.18.2/fs/nfs/nfsroot.c 2006-02-18 14:40:23 +0100 +++ linux-2.6.18.2-vs2.1.1/fs/nfs/nfsroot.c 2006-09-25 15:40:02 +0200 @@ -312,7 +331,7 @@ static int __init root_nfs_name(char *na /* Override them by options set on kernel command-line */ root_nfs_parse(name, buf); - cp = system_utsname.nodename; + cp = vx_new_uts(nodename); if (strlen(buf) + strlen(cp) > NFS_MAXPATHLEN) { printk(KERN_ERR "Root-NFS: Pathname for remote directory too long.\n"); return -1; --- linux-2.6.18.2/fs/proc/proc_misc.c 2006-09-20 16:58:35 +0200 +++ linux-2.6.18.2-vs2.1.1/fs/proc/proc_misc.c 2006-09-20 18:36:46 +0200 @@ -242,8 +262,9 @@ static int version_read_proc(char *page, { int len; - strcpy(page, linux_banner); - len = strlen(page); + len = sprintf(page, vx_linux_banner, + vx_new_uts(release), + vx_new_uts(version)); return proc_calc_metrics(page, start, off, count, eof, len); } --- linux-2.6.18.2/include/asm-i386/elf.h 2006-09-20 16:58:40 +0200 +++ linux-2.6.18.2-vs2.1.1/include/asm-i386/elf.h 2006-09-25 15:40:02 +0200 @@ -112,7 +112,7 @@ typedef struct user_fxsr_struct elf_fpxr For the moment, we have only optimizations for the Intel generations, but that could change... */ -#define ELF_PLATFORM (system_utsname.machine) +#define ELF_PLATFORM (vx_new_uts(machine)) #define SET_PERSONALITY(ex, ibcs2) do { } while (0) --- linux-2.6.18.2/include/linux/kernel.h 2006-09-20 16:58:43 +0200 +++ linux-2.6.18.2-vs2.1.1/include/linux/kernel.h 2006-09-20 17:01:45 +0200 @@ -17,6 +17,7 @@ #include extern const char linux_banner[]; +extern const char vx_linux_banner[]; #define INT_MAX ((int)(~0U>>1)) #define INT_MIN (-INT_MAX - 1) --- linux-2.6.18.2/init/version.c 2006-09-20 16:58:44 +0200 +++ linux-2.6.18.2-vs2.1.1/init/version.c 2006-09-20 17:01:45 +0200 @@ -32,3 +32,8 @@ EXPORT_SYMBOL(system_utsname); const char linux_banner[] = "Linux version " UTS_RELEASE " (" LINUX_COMPILE_BY "@" LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") " UTS_VERSION "\n"; + +const char vx_linux_banner[] = + "Linux version %s (" LINUX_COMPILE_BY "@" + LINUX_COMPILE_HOST ") (" LINUX_COMPILER ") %s\n"; + --- linux-2.6.18.2/kernel/sys.c 2006-09-20 16:58:44 +0200 +++ linux-2.6.18.2-vs2.1.1/kernel/sys.c 2006-09-25 15:40:02 +0200 @@ -1675,7 +1692,7 @@ asmlinkage long sys_newuname(struct new_ int errno = 0; down_read(&uts_sem); - if (copy_to_user(name,&system_utsname,sizeof *name)) + if (copy_to_user(name, vx_new_utsname(), sizeof *name)) errno = -EFAULT; up_read(&uts_sem); return errno; --- linux-2.6.18.2/kernel/sys.c 2006-09-20 16:58:44 +0200 +++ linux-2.6.18.2-vs2.1.1/kernel/sys.c 2006-09-25 15:40:02 +0200 @@ -1693,8 +1710,10 @@ ***** down_write(&uts_sem); errno = -EFAULT; if (!copy_from_user(tmp, name, len)) { - memcpy(system_utsname.nodename, tmp, len); - system_utsname.nodename[len] = 0; + char *ptr = vx_new_uts(nodename); + + memcpy(ptr, tmp, len); + ptr[len] = 0; errno = 0; } up_write(&uts_sem); --- linux-2.6.18.2/kernel/sys.c 2006-09-20 16:58:44 +0200 +++ linux-2.6.18.2-vs2.1.1/kernel/sys.c 2006-09-25 15:40:02 +0200 @@ -1706,6 +1725,7 @@ asmlinkage long sys_sethostname(char __u asmlinkage long sys_gethostname(char __user *name, int len) { int i, errno; + char *ptr; if (len < 0) return -EINVAL; --- linux-2.6.18.2/kernel/sys.c 2006-09-20 16:58:44 +0200 +++ linux-2.6.18.2-vs2.1.1/kernel/sys.c 2006-09-25 15:40:02 +0200 @@ -1710,7 +1730,8 @@ ***** if (len < 0) return -EINVAL; down_read(&uts_sem); - i = 1 + strlen(system_utsname.nodename); + ptr = vx_new_uts(nodename); + i = 1 + strlen(ptr); if (i > len) i = len; errno = 0; --- linux-2.6.18.2/kernel/sys.c 2006-09-20 16:58:44 +0200 +++ linux-2.6.18.2-vs2.1.1/kernel/sys.c 2006-09-25 15:40:02 +0200 @@ -1714,7 +1735,7 @@ ***** if (i > len) i = len; errno = 0; - if (copy_to_user(name, system_utsname.nodename, i)) + if (copy_to_user(name, ptr, i)) errno = -EFAULT; up_read(&uts_sem); return errno; --- linux-2.6.18.2/kernel/sys.c 2006-09-20 16:58:44 +0200 +++ linux-2.6.18.2-vs2.1.1/kernel/sys.c 2006-09-25 15:40:02 +0200 @@ -1739,8 +1760,10 @@ asmlinkage long sys_setdomainname(char _ down_write(&uts_sem); errno = -EFAULT; if (!copy_from_user(tmp, name, len)) { - memcpy(system_utsname.domainname, tmp, len); - system_utsname.domainname[len] = 0; + char *ptr = vx_new_uts(domainname); + + memcpy(ptr, tmp, len); + ptr[len] = 0; errno = 0; } up_write(&uts_sem); --- linux-2.6.18.2/net/sunrpc/clnt.c 2006-09-20 16:58:54 +0200 +++ linux-2.6.18.2-vs2.1.1/net/sunrpc/clnt.c 2006-09-25 15:40:02 +0200 @@ -175,10 +176,10 @@ rpc_new_client(struct rpc_xprt *xprt, ch } /* save the nodename */ - clnt->cl_nodelen = strlen(system_utsname.nodename); + clnt->cl_nodelen = strlen(vx_new_uts(nodename)); if (clnt->cl_nodelen > UNX_MAXNODENAME) clnt->cl_nodelen = UNX_MAXNODENAME; - memcpy(clnt->cl_nodename, system_utsname.nodename, clnt->cl_nodelen); + memcpy(clnt->cl_nodename, vx_new_uts(nodename), clnt->cl_nodelen); return clnt; out_no_auth: