Add generic sys_olduname()
authorChristoph Hellwig <hch@lst.de>
Wed, 10 Mar 2010 23:21:21 +0000 (15:21 -0800)
committerLinus Torvalds <torvalds@linux-foundation.org>
Fri, 12 Mar 2010 23:52:32 +0000 (15:52 -0800)
Add generic implementations of the old and really old uname system calls.
Note that sh only implements sys_olduname but not sys_oldolduname, but I'm
not going to bother with another ifdef for that special case.

m32r implemented an old uname but never wired it up, so kill it, too.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Cc: Paul Mundt <lethal@linux-sh.org>
Cc: Jeff Dike <jdike@addtoit.com>
Cc: Hirokazu Takata <takata@linux-m32r.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Ingo Molnar <mingo@elte.hu>
Cc: H. Peter Anvin <hpa@zytor.com>
Cc: Al Viro <viro@zeniv.linux.org.uk>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Heiko Carstens <heiko.carstens@de.ibm.com>
Cc: Martin Schwidefsky <schwidefsky@de.ibm.com>
Cc: "Luck, Tony" <tony.luck@intel.com>
Cc: James Morris <jmorris@namei.org>
Cc: Andreas Schwab <schwab@linux-m68k.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
19 files changed:
arch/m32r/kernel/sys_m32r.c
arch/mips/include/asm/unistd.h
arch/mips/kernel/syscall.c
arch/powerpc/include/asm/unistd.h
arch/powerpc/kernel/syscalls.c
arch/sh/include/asm/syscalls.h
arch/sh/include/asm/unistd_32.h
arch/sh/include/asm/unistd_64.h
arch/sh/kernel/sys_sh.c
arch/um/kernel/syscall.c
arch/x86/ia32/ia32entry.S
arch/x86/ia32/sys_ia32.c
arch/x86/include/asm/sys_ia32.h
arch/x86/include/asm/syscalls.h
arch/x86/include/asm/unistd_32.h
arch/x86/include/asm/unistd_64.h
arch/x86/kernel/sys_i386_32.c
include/linux/syscalls.h
kernel/sys.c

index cf2e7279ce9bf593e0dc2f2f6b0e105d00a8e1d8..0a00f467edfa9645f49ea0d7b614c905921dcc44 100644 (file)
@@ -76,17 +76,6 @@ asmlinkage int sys_tas(int __user *addr)
        return oldval;
 }
 
-asmlinkage int sys_uname(struct old_utsname __user * name)
-{
-       int err;
-       if (!name)
-               return -EFAULT;
-       down_read(&uts_sem);
-       err = copy_to_user(name, utsname(), sizeof (*name));
-       up_read(&uts_sem);
-       return err?-EFAULT:0;
-}
-
 asmlinkage int sys_cacheflush(void *addr, int bytes, int cache)
 {
        /* This should flush more selectively ...  */
index 97fe472095f214cd7479e2fac9674826d79162ba..1b5a6648eb86dda1598877acf8fd4a9ac9b301c1 100644 (file)
 #define __ARCH_WANT_SYS_LLSEEK
 #define __ARCH_WANT_SYS_NICE
 #define __ARCH_WANT_SYS_OLD_GETRLIMIT
+#define __ARCH_WANT_SYS_OLD_UNAME
 #define __ARCH_WANT_SYS_OLDUMOUNT
 #define __ARCH_WANT_SYS_SIGPENDING
 #define __ARCH_WANT_SYS_SIGPROCMASK
index 257bf0141775e905a3734e77719c1d6c6952d585..e96b1c30c7aac6c708d4b55aa5a09f2fb7af31f9 100644 (file)
@@ -215,48 +215,6 @@ out:
        return error;
 }
 
-/*
- * Compacrapability ...
- */
-SYSCALL_DEFINE1(uname, struct old_utsname __user *, name)
-{
-       if (name && !copy_to_user(name, utsname(), sizeof (*name)))
-               return 0;
-       return -EFAULT;
-}
-
-/*
- * Compacrapability ...
- */
-SYSCALL_DEFINE1(olduname, struct oldold_utsname __user *, name)
-{
-       int error;
-
-       if (!name)
-               return -EFAULT;
-       if (!access_ok(VERIFY_WRITE, name, sizeof(struct oldold_utsname)))
-               return -EFAULT;
-
-       error = __copy_to_user(&name->sysname, &utsname()->sysname,
-                              __OLD_UTS_LEN);
-       error -= __put_user(0, name->sysname + __OLD_UTS_LEN);
-       error -= __copy_to_user(&name->nodename, &utsname()->nodename,
-                               __OLD_UTS_LEN);
-       error -= __put_user(0, name->nodename + __OLD_UTS_LEN);
-       error -= __copy_to_user(&name->release, &utsname()->release,
-                               __OLD_UTS_LEN);
-       error -= __put_user(0, name->release + __OLD_UTS_LEN);
-       error -= __copy_to_user(&name->version, &utsname()->version,
-                               __OLD_UTS_LEN);
-       error -= __put_user(0, name->version + __OLD_UTS_LEN);
-       error -= __copy_to_user(&name->machine, &utsname()->machine,
-                               __OLD_UTS_LEN);
-       error = __put_user(0, name->machine + __OLD_UTS_LEN);
-       error = error ? -EFAULT : 0;
-
-       return error;
-}
-
 SYSCALL_DEFINE1(set_thread_area, unsigned long, addr)
 {
        struct thread_info *ti = task_thread_info(current);
index c13821fe87419930a3d9ffeeb5434b6526ca1182..f0a10266e7f7b0245180661ae3dc0de2cd92390e 100644 (file)
 #define __ARCH_WANT_SYS_LLSEEK
 #define __ARCH_WANT_SYS_NICE
 #define __ARCH_WANT_SYS_OLD_GETRLIMIT
+#define __ARCH_WANT_SYS_OLD_UNAME
 #define __ARCH_WANT_SYS_OLDUMOUNT
 #define __ARCH_WANT_SYS_SIGPENDING
 #define __ARCH_WANT_SYS_SIGPROCMASK
index 69d3c5d50a54a2295d33fa4e94b629ea0b09f4a7..f2496f2faeccc37231110392363d0914d599e5b5 100644 (file)
@@ -116,63 +116,6 @@ long ppc64_personality(unsigned long personality)
 }
 #endif
 
-#ifdef CONFIG_PPC64
-#define OVERRIDE_MACHINE    (personality(current->personality) == PER_LINUX32)
-#else
-#define OVERRIDE_MACHINE    0
-#endif
-
-static inline int override_machine(char __user *mach)
-{
-       if (OVERRIDE_MACHINE) {
-               /* change ppc64 to ppc */
-               if (__put_user(0, mach+3) || __put_user(0, mach+4))
-                       return -EFAULT;
-       }
-       return 0;
-}
-
-int sys_uname(struct old_utsname __user *name)
-{
-       int err = 0;
-       
-       down_read(&uts_sem);
-       if (copy_to_user(name, utsname(), sizeof(*name)))
-               err = -EFAULT;
-       up_read(&uts_sem);
-       if (!err)
-               err = override_machine(name->machine);
-       return err;
-}
-
-int sys_olduname(struct oldold_utsname __user *name)
-{
-       int error;
-
-       if (!access_ok(VERIFY_WRITE, name, sizeof(struct oldold_utsname)))
-               return -EFAULT;
-  
-       down_read(&uts_sem);
-       error = __copy_to_user(&name->sysname, &utsname()->sysname,
-                              __OLD_UTS_LEN);
-       error |= __put_user(0, name->sysname + __OLD_UTS_LEN);
-       error |= __copy_to_user(&name->nodename, &utsname()->nodename,
-                               __OLD_UTS_LEN);
-       error |= __put_user(0, name->nodename + __OLD_UTS_LEN);
-       error |= __copy_to_user(&name->release, &utsname()->release,
-                               __OLD_UTS_LEN);
-       error |= __put_user(0, name->release + __OLD_UTS_LEN);
-       error |= __copy_to_user(&name->version, &utsname()->version,
-                               __OLD_UTS_LEN);
-       error |= __put_user(0, name->version + __OLD_UTS_LEN);
-       error |= __copy_to_user(&name->machine, &utsname()->machine,
-                               __OLD_UTS_LEN);
-       error |= override_machine(name->machine);
-       up_read(&uts_sem);
-
-       return error? -EFAULT: 0;
-}
-
 long ppc_fadvise64_64(int fd, int advice, u32 offset_high, u32 offset_low,
                      u32 len_high, u32 len_low)
 {
index c1ce2862f7be50e14ba669c6e426faaa04d8c058..507725af2e549e6e024064dd749f7636bce3f375 100644 (file)
@@ -3,15 +3,12 @@
 
 #ifdef __KERNEL__
 
-struct old_utsname;
-
 asmlinkage int old_mmap(unsigned long addr, unsigned long len,
                        unsigned long prot, unsigned long flags,
                        int fd, unsigned long off);
 asmlinkage long sys_mmap2(unsigned long addr, unsigned long len,
                          unsigned long prot, unsigned long flags,
                          unsigned long fd, unsigned long pgoff);
-asmlinkage int sys_uname(struct old_utsname __user *name);
 
 #ifdef CONFIG_SUPERH32
 # include "syscalls_32.h"
index a48f65e2e4295807a4d6bada2a353afc8398335e..0e7f0fc8f0864f11b7108d36674b90ad5c508b74 100644 (file)
 #define __ARCH_WANT_SYS_LLSEEK
 #define __ARCH_WANT_SYS_NICE
 #define __ARCH_WANT_SYS_OLD_GETRLIMIT
+#define __ARCH_WANT_SYS_OLD_UNAME
 #define __ARCH_WANT_SYS_OLDUMOUNT
 #define __ARCH_WANT_SYS_SIGPENDING
 #define __ARCH_WANT_SYS_SIGPROCMASK
index 7709b2b8f752f55fd4ccb0ee3eb4b76a19805eff..0580c33a1e04725811ebcc2cfe13caa1a3a11362 100644 (file)
 #define __ARCH_WANT_SYS_LLSEEK
 #define __ARCH_WANT_SYS_NICE
 #define __ARCH_WANT_SYS_OLD_GETRLIMIT
+#define __ARCH_WANT_SYS_OLD_UNAME
 #define __ARCH_WANT_SYS_OLDUMOUNT
 #define __ARCH_WANT_SYS_SIGPENDING
 #define __ARCH_WANT_SYS_SIGPROCMASK
index c18cfaa67fddf3299ed5db9db6b9710c03fae289..81f58371613dc71c97e2cc576d91eae8266d6934 100644 (file)
@@ -93,14 +93,3 @@ asmlinkage int sys_cacheflush(unsigned long addr, unsigned long len, int op)
        up_read(&current->mm->mmap_sem);
        return 0;
 }
-
-asmlinkage int sys_uname(struct old_utsname __user *name)
-{
-       int err;
-       if (!name)
-               return -EFAULT;
-       down_read(&uts_sem);
-       err = copy_to_user(name, utsname(), sizeof(*name));
-       up_read(&uts_sem);
-       return err?-EFAULT:0;
-}
index cccab850c27ec221a5bf6d13a9e155a580c40a40..4393173923f5f408019456a3428d9d7d1c1f75e5 100644 (file)
@@ -51,51 +51,6 @@ long old_mmap(unsigned long addr, unsigned long len,
        return err;
 }
 
-long sys_uname(struct old_utsname __user * name)
-{
-       long err;
-       if (!name)
-               return -EFAULT;
-       down_read(&uts_sem);
-       err = copy_to_user(name, utsname(), sizeof (*name));
-       up_read(&uts_sem);
-       return err?-EFAULT:0;
-}
-
-long sys_olduname(struct oldold_utsname __user * name)
-{
-       long error;
-
-       if (!name)
-               return -EFAULT;
-       if (!access_ok(VERIFY_WRITE,name,sizeof(struct oldold_utsname)))
-               return -EFAULT;
-
-       down_read(&uts_sem);
-
-       error = __copy_to_user(&name->sysname, &utsname()->sysname,
-                              __OLD_UTS_LEN);
-       error |= __put_user(0, name->sysname + __OLD_UTS_LEN);
-       error |= __copy_to_user(&name->nodename, &utsname()->nodename,
-                               __OLD_UTS_LEN);
-       error |= __put_user(0, name->nodename + __OLD_UTS_LEN);
-       error |= __copy_to_user(&name->release, &utsname()->release,
-                               __OLD_UTS_LEN);
-       error |= __put_user(0, name->release + __OLD_UTS_LEN);
-       error |= __copy_to_user(&name->version, &utsname()->version,
-                               __OLD_UTS_LEN);
-       error |= __put_user(0, name->version + __OLD_UTS_LEN);
-       error |= __copy_to_user(&name->machine, &utsname()->machine,
-                               __OLD_UTS_LEN);
-       error |= __put_user(0, name->machine + __OLD_UTS_LEN);
-
-       up_read(&uts_sem);
-
-       error = error ? -EFAULT : 0;
-
-       return error;
-}
-
 int kernel_execve(const char *filename, char *const argv[], char *const envp[])
 {
        mm_segment_t fs;
index 34f821802c23aca3fc6ea03951df045675359fbc..59b4556a5b92288eb23b8cb09fc28c6ea2bd2e5d 100644 (file)
@@ -563,7 +563,7 @@ ia32_sys_call_table:
        .quad quiet_ni_syscall                  /* old mpx syscall holder */
        .quad sys_setpgid
        .quad quiet_ni_syscall                  /* old ulimit syscall holder */
-       .quad sys32_olduname
+       .quad sys_olduname
        .quad sys_umask         /* 60 */
        .quad sys_chroot
        .quad compat_sys_ustat
@@ -613,7 +613,7 @@ ia32_sys_call_table:
        .quad compat_sys_newstat
        .quad compat_sys_newlstat
        .quad compat_sys_newfstat
-       .quad sys32_uname
+       .quad sys_uname
        .quad stub32_iopl               /* 110 */
        .quad sys_vhangup
        .quad quiet_ni_syscall  /* old "idle" system call */
index 56c99f46e289afac94576007f6b8478efe4507ef..74c35431b7d830ebb4ca7979945cdbf19714f8ff 100644 (file)
@@ -448,58 +448,6 @@ asmlinkage long sys32_sendfile(int out_fd, int in_fd,
        return ret;
 }
 
-asmlinkage long sys32_olduname(struct oldold_utsname __user *name)
-{
-       char *arch = "x86_64";
-       int err;
-
-       if (!name)
-               return -EFAULT;
-       if (!access_ok(VERIFY_WRITE, name, sizeof(struct oldold_utsname)))
-               return -EFAULT;
-
-       down_read(&uts_sem);
-
-       err = __copy_to_user(&name->sysname, &utsname()->sysname,
-                            __OLD_UTS_LEN);
-       err |= __put_user(0, name->sysname+__OLD_UTS_LEN);
-       err |= __copy_to_user(&name->nodename, &utsname()->nodename,
-                             __OLD_UTS_LEN);
-       err |= __put_user(0, name->nodename+__OLD_UTS_LEN);
-       err |= __copy_to_user(&name->release, &utsname()->release,
-                             __OLD_UTS_LEN);
-       err |= __put_user(0, name->release+__OLD_UTS_LEN);
-       err |= __copy_to_user(&name->version, &utsname()->version,
-                             __OLD_UTS_LEN);
-       err |= __put_user(0, name->version+__OLD_UTS_LEN);
-
-       if (personality(current->personality) == PER_LINUX32)
-               arch = "i686";
-
-       err |= __copy_to_user(&name->machine, arch, strlen(arch) + 1);
-
-       up_read(&uts_sem);
-
-       err = err ? -EFAULT : 0;
-
-       return err;
-}
-
-long sys32_uname(struct old_utsname __user *name)
-{
-       int err;
-
-       if (!name)
-               return -EFAULT;
-       down_read(&uts_sem);
-       err = copy_to_user(name, utsname(), sizeof(*name));
-       up_read(&uts_sem);
-       if (personality(current->personality) == PER_LINUX32)
-               err |= copy_to_user(&name->machine, "i686", 5);
-
-       return err ? -EFAULT : 0;
-}
-
 asmlinkage long sys32_execve(char __user *name, compat_uptr_t __user *argv,
                             compat_uptr_t __user *envp, struct pt_regs *regs)
 {
index 7d348d80366980430082211285e3935c273c6961..3ad421784ae7ae477db33707feee7cdd0ddc3bed 100644 (file)
@@ -54,11 +54,6 @@ asmlinkage long sys32_pwrite(unsigned int, char __user *, u32, u32, u32);
 asmlinkage long sys32_personality(unsigned long);
 asmlinkage long sys32_sendfile(int, int, compat_off_t __user *, s32);
 
-struct oldold_utsname;
-struct old_utsname;
-asmlinkage long sys32_olduname(struct oldold_utsname __user *);
-long sys32_uname(struct old_utsname __user *);
-
 asmlinkage long sys32_execve(char __user *, compat_uptr_t __user *,
                             compat_uptr_t __user *, struct pt_regs *);
 asmlinkage long sys32_clone(unsigned int, unsigned int, struct pt_regs *);
index 47cd606c353757acf3742901c8fddde005c7fc53..5c044b43e9a7359ce834b54e5b6f8d736d95e5cc 100644 (file)
@@ -50,13 +50,6 @@ asmlinkage int sys_sigaction(int, const struct old_sigaction __user *,
                             struct old_sigaction __user *);
 unsigned long sys_sigreturn(struct pt_regs *);
 
-/* kernel/sys_i386_32.c */
-struct oldold_utsname;
-struct old_utsname;
-
-asmlinkage int sys_uname(struct old_utsname __user *);
-asmlinkage int sys_olduname(struct oldold_utsname __user *);
-
 /* kernel/vm86_32.c */
 int sys_vm86old(struct vm86_struct __user *, struct pt_regs *);
 int sys_vm86(unsigned long, unsigned long, struct pt_regs *);
index 45e64a17b86e273818f895d9dad3e3208fd5ed4b..beb9b5f8f8a4183299d8cfbdd9816cf0391ab2ed 100644 (file)
 #define __ARCH_WANT_SYS_LLSEEK
 #define __ARCH_WANT_SYS_NICE
 #define __ARCH_WANT_SYS_OLD_GETRLIMIT
+#define __ARCH_WANT_SYS_OLD_UNAME
 #define __ARCH_WANT_SYS_OLD_MMAP
 #define __ARCH_WANT_SYS_OLD_SELECT
 #define __ARCH_WANT_SYS_OLDUMOUNT
index 83e2d6dc50380ea806ddd0bde444b9fed1d8eaf0..ff4307b0e81e13544c5f34455713214d58c4e464 100644 (file)
@@ -680,6 +680,7 @@ __SYSCALL(__NR_recvmmsg, sys_recvmmsg)
 #define __ARCH_WANT_SYS_LLSEEK
 #define __ARCH_WANT_SYS_NICE
 #define __ARCH_WANT_SYS_OLD_GETRLIMIT
+#define __ARCH_WANT_SYS_OLD_UNAME
 #define __ARCH_WANT_SYS_OLDUMOUNT
 #define __ARCH_WANT_SYS_SIGPENDING
 #define __ARCH_WANT_SYS_SIGPROCMASK
index 8b5c348fdcf245210a7a941e984b33adf0aa818d..196552bb412c76a129cc8f63ad6e836b91dd51ee 100644 (file)
 
 #include <asm/syscalls.h>
 
-/*
- * Old cruft
- */
-asmlinkage int sys_uname(struct old_utsname __user *name)
-{
-       int err;
-       if (!name)
-               return -EFAULT;
-       down_read(&uts_sem);
-       err = copy_to_user(name, utsname(), sizeof(*name));
-       up_read(&uts_sem);
-       return err? -EFAULT:0;
-}
-
-asmlinkage int sys_olduname(struct oldold_utsname __user *name)
-{
-       int error;
-
-       if (!name)
-               return -EFAULT;
-       if (!access_ok(VERIFY_WRITE, name, sizeof(struct oldold_utsname)))
-               return -EFAULT;
-
-       down_read(&uts_sem);
-
-       error = __copy_to_user(&name->sysname, &utsname()->sysname,
-                              __OLD_UTS_LEN);
-       error |= __put_user(0, name->sysname + __OLD_UTS_LEN);
-       error |= __copy_to_user(&name->nodename, &utsname()->nodename,
-                               __OLD_UTS_LEN);
-       error |= __put_user(0, name->nodename + __OLD_UTS_LEN);
-       error |= __copy_to_user(&name->release, &utsname()->release,
-                               __OLD_UTS_LEN);
-       error |= __put_user(0, name->release + __OLD_UTS_LEN);
-       error |= __copy_to_user(&name->version, &utsname()->version,
-                               __OLD_UTS_LEN);
-       error |= __put_user(0, name->version + __OLD_UTS_LEN);
-       error |= __copy_to_user(&name->machine, &utsname()->machine,
-                               __OLD_UTS_LEN);
-       error |= __put_user(0, name->machine + __OLD_UTS_LEN);
-
-       up_read(&uts_sem);
-
-       error = error ? -EFAULT : 0;
-
-       return error;
-}
-
-
 /*
  * Do a system call from kernel instead of calling sys_execve so we
  * end up with proper pt_regs.
index fbb61ae70e06447ed2ce3906231963b02ba708c9..44f2ad0e88252de06c20e157a9f1055a1c8d82eb 100644 (file)
@@ -31,6 +31,8 @@ struct msqid_ds;
 struct new_utsname;
 struct nfsctl_arg;
 struct __old_kernel_stat;
+struct oldold_utsname;
+struct old_utsname;
 struct pollfd;
 struct rlimit;
 struct rusage;
@@ -655,6 +657,8 @@ asmlinkage long sys_gethostname(char __user *name, int len);
 asmlinkage long sys_sethostname(char __user *name, int len);
 asmlinkage long sys_setdomainname(char __user *name, int len);
 asmlinkage long sys_newuname(struct new_utsname __user *name);
+asmlinkage long sys_uname(struct old_utsname __user *);
+asmlinkage long sys_olduname(struct oldold_utsname __user *);
 
 asmlinkage long sys_getrlimit(unsigned int resource,
                                struct rlimit __user *rlim);
index e483eb5530e407c43cd86e732202562ca885ec8b..8298878f4f7116ec8b04d6babbd016cfa2edb026 100644 (file)
@@ -1138,6 +1138,60 @@ SYSCALL_DEFINE1(newuname, struct new_utsname __user *, name)
        return errno;
 }
 
+#ifdef __ARCH_WANT_SYS_OLD_UNAME
+/*
+ * Old cruft
+ */
+SYSCALL_DEFINE1(uname, struct old_utsname __user *, name)
+{
+       int error = 0;
+
+       if (!name)
+               return -EFAULT;
+
+       down_read(&uts_sem);
+       if (copy_to_user(name, utsname(), sizeof(*name)))
+               error = -EFAULT;
+       up_read(&uts_sem);
+
+       if (!error && override_architecture(name))
+               error = -EFAULT;
+       return error;
+}
+
+SYSCALL_DEFINE1(olduname, struct oldold_utsname __user *, name)
+{
+       int error;
+
+       if (!name)
+               return -EFAULT;
+       if (!access_ok(VERIFY_WRITE, name, sizeof(struct oldold_utsname)))
+               return -EFAULT;
+
+       down_read(&uts_sem);
+       error = __copy_to_user(&name->sysname, &utsname()->sysname,
+                              __OLD_UTS_LEN);
+       error |= __put_user(0, name->sysname + __OLD_UTS_LEN);
+       error |= __copy_to_user(&name->nodename, &utsname()->nodename,
+                               __OLD_UTS_LEN);
+       error |= __put_user(0, name->nodename + __OLD_UTS_LEN);
+       error |= __copy_to_user(&name->release, &utsname()->release,
+                               __OLD_UTS_LEN);
+       error |= __put_user(0, name->release + __OLD_UTS_LEN);
+       error |= __copy_to_user(&name->version, &utsname()->version,
+                               __OLD_UTS_LEN);
+       error |= __put_user(0, name->version + __OLD_UTS_LEN);
+       error |= __copy_to_user(&name->machine, &utsname()->machine,
+                               __OLD_UTS_LEN);
+       error |= __put_user(0, name->machine + __OLD_UTS_LEN);
+       up_read(&uts_sem);
+
+       if (!error && override_architecture(name))
+               error = -EFAULT;
+       return error ? -EFAULT : 0;
+}
+#endif
+
 SYSCALL_DEFINE2(sethostname, char __user *, name, int, len)
 {
        int errno;