diff options
Diffstat (limited to 'arch/um/sys-x86_64/syscalls.c')
-rw-r--r-- | arch/um/sys-x86_64/syscalls.c | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/arch/um/sys-x86_64/syscalls.c b/arch/um/sys-x86_64/syscalls.c index 68205a03364c..dd9914642b8e 100644 --- a/arch/um/sys-x86_64/syscalls.c +++ b/arch/um/sys-x86_64/syscalls.c | |||
@@ -7,6 +7,8 @@ | |||
7 | #include "linux/linkage.h" | 7 | #include "linux/linkage.h" |
8 | #include "linux/slab.h" | 8 | #include "linux/slab.h" |
9 | #include "linux/shm.h" | 9 | #include "linux/shm.h" |
10 | #include "linux/utsname.h" | ||
11 | #include "linux/personality.h" | ||
10 | #include "asm/uaccess.h" | 12 | #include "asm/uaccess.h" |
11 | #define __FRAME_OFFSETS | 13 | #define __FRAME_OFFSETS |
12 | #include "asm/ptrace.h" | 14 | #include "asm/ptrace.h" |
@@ -14,11 +16,15 @@ | |||
14 | #include "asm/prctl.h" /* XXX This should get the constants from libc */ | 16 | #include "asm/prctl.h" /* XXX This should get the constants from libc */ |
15 | #include "choose-mode.h" | 17 | #include "choose-mode.h" |
16 | 18 | ||
17 | asmlinkage long wrap_sys_shmat(int shmid, char __user *shmaddr, int shmflg) | 19 | asmlinkage long sys_uname64(struct new_utsname __user * name) |
18 | { | 20 | { |
19 | unsigned long raddr; | 21 | int err; |
20 | 22 | down_read(&uts_sem); | |
21 | return do_shmat(shmid, shmaddr, shmflg, &raddr) ?: (long) raddr; | 23 | err = copy_to_user(name, &system_utsname, sizeof (*name)); |
24 | up_read(&uts_sem); | ||
25 | if (personality(current->personality) == PER_LINUX32) | ||
26 | err |= copy_to_user(&name->machine, "i686", 5); | ||
27 | return err ? -EFAULT : 0; | ||
22 | } | 28 | } |
23 | 29 | ||
24 | #ifdef CONFIG_MODE_TT | 30 | #ifdef CONFIG_MODE_TT |
@@ -38,6 +44,8 @@ long sys_modify_ldt_tt(int func, void *ptr, unsigned long bytecount) | |||
38 | #ifdef CONFIG_MODE_SKAS | 44 | #ifdef CONFIG_MODE_SKAS |
39 | extern int userspace_pid[]; | 45 | extern int userspace_pid[]; |
40 | 46 | ||
47 | #include "skas_ptrace.h" | ||
48 | |||
41 | long sys_modify_ldt_skas(int func, void *ptr, unsigned long bytecount) | 49 | long sys_modify_ldt_skas(int func, void *ptr, unsigned long bytecount) |
42 | { | 50 | { |
43 | struct ptrace_ldt ldt; | 51 | struct ptrace_ldt ldt; |