vserver 1.9.5.x5
[linux-2.6.git] / arch / sparc / kernel / sys_sparc.c
index 925efe9..4b5df5e 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/utsname.h>
 #include <linux/smp.h>
 #include <linux/smp_lock.h>
+#include <linux/vs_cvirt.h>
 
 #include <asm/uaccess.h>
 #include <asm/ipc.h>
@@ -136,7 +137,8 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void __user
                        if (!ptr)
                                goto out;
                        err = -EFAULT;
-                       if(get_user(fourth.__pad, (void __user **)ptr))
+                       if (get_user(fourth.__pad,
+                                    (void __user * __user *)ptr))
                                goto out;
                        err = sys_semctl (first, second, third, fourth);
                        goto out;
@@ -165,7 +167,9 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void __user
                                goto out;
                                }
                        case 1: default:
-                               err = sys_msgrcv (first, (struct msgbuf *) ptr, second, fifth, third);
+                               err = sys_msgrcv (first,
+                                                 (struct msgbuf __user *) ptr,
+                                                 second, fifth, third);
                                goto out;
                        }
                case MSGGET:
@@ -194,7 +198,7 @@ asmlinkage int sys_ipc (uint call, int first, int second, int third, void __user
                                goto out;
                                }
                        case 1: /* iBCS2 emulator entry point */
-                               err = do_shmat (first, (char __user *) ptr, second, (ulong __user *) third);
+                               err = -EINVAL;
                                goto out;
                        }
                case SHMDT: 
@@ -371,7 +375,7 @@ sparc_breakpoint (struct pt_regs *regs)
        info.si_signo = SIGTRAP;
        info.si_errno = 0;
        info.si_code = TRAP_BRKPT;
-       info.si_addr = (void *)regs->pc;
+       info.si_addr = (void __user *)regs->pc;
        info.si_trapno = 0;
        force_sig_info(SIGTRAP, &info, current);
 
@@ -467,13 +471,13 @@ asmlinkage int sys_getdomainname(char __user *name, int len)
        
        down_read(&uts_sem);
        
-       nlen = strlen(system_utsname.domainname) + 1;
+       nlen = strlen(vx_new_uts(domainname)) + 1;
 
        if (nlen < len)
                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: