aboutsummaryrefslogtreecommitdiffstats
path: root/arch/um/sys-x86_64/syscalls.c
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-06-02 11:39:11 -0400
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-06-02 11:39:11 -0400
commit1c3f45ab2f7f879ea482501c83899505c31f7539 (patch)
tree672465b3b9b3e2e26a8caf74ed64aa6885c52c13 /arch/um/sys-x86_64/syscalls.c
parent4bcff1b37e7c3aed914d1ce5b45994adc7dbf455 (diff)
parente0d6d71440a3a35c6fc2dde09f8e8d4d7bd44dda (diff)
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'arch/um/sys-x86_64/syscalls.c')
-rw-r--r--arch/um/sys-x86_64/syscalls.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/arch/um/sys-x86_64/syscalls.c b/arch/um/sys-x86_64/syscalls.c
index dd9914642b8e..6f44f40204ed 100644
--- a/arch/um/sys-x86_64/syscalls.c
+++ b/arch/um/sys-x86_64/syscalls.c
@@ -15,6 +15,7 @@
15#include "asm/unistd.h" 15#include "asm/unistd.h"
16#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 */
17#include "choose-mode.h" 17#include "choose-mode.h"
18#include "kern.h"
18 19
19asmlinkage long sys_uname64(struct new_utsname __user * name) 20asmlinkage long sys_uname64(struct new_utsname __user * name)
20{ 21{
@@ -132,23 +133,27 @@ static long arch_prctl_tt(int code, unsigned long addr)
132 133
133#ifdef CONFIG_MODE_SKAS 134#ifdef CONFIG_MODE_SKAS
134 135
136/* XXX: Must also call arch_prctl in the host, beside saving the segment bases! */
135static long arch_prctl_skas(int code, unsigned long addr) 137static long arch_prctl_skas(int code, unsigned long addr)
136{ 138{
137 long ret = 0; 139 long ret = 0;
138 140
139 switch(code){ 141 switch(code){
140 case ARCH_SET_GS:
141 current->thread.regs.regs.skas.regs[GS_BASE / sizeof(unsigned long)] = addr;
142 break;
143 case ARCH_SET_FS: 142 case ARCH_SET_FS:
144 current->thread.regs.regs.skas.regs[FS_BASE / sizeof(unsigned long)] = addr; 143 current->thread.regs.regs.skas.regs[FS_BASE / sizeof(unsigned long)] = addr;
145 break; 144 break;
145 case ARCH_SET_GS:
146 current->thread.regs.regs.skas.regs[GS_BASE / sizeof(unsigned long)] = addr;
147 break;
146 case ARCH_GET_FS: 148 case ARCH_GET_FS:
147 ret = put_user(current->thread.regs.regs.skas.regs[GS / sizeof(unsigned long)], &addr); 149 ret = put_user(current->thread.regs.regs.skas.
150 regs[FS_BASE / sizeof(unsigned long)],
151 (unsigned long __user *)addr);
148 break; 152 break;
149 case ARCH_GET_GS: 153 case ARCH_GET_GS:
150 ret = put_user(current->thread.regs.regs.skas.regs[FS / sizeof(unsigned \ 154 ret = put_user(current->thread.regs.regs.skas.
151long)], &addr); 155 regs[GS_BASE / sizeof(unsigned long)],
156 (unsigned long __user *)addr);
152 break; 157 break;
153 default: 158 default:
154 ret = -EINVAL; 159 ret = -EINVAL;