git://git.onelab.eu
/
linux-2.6.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
vserver 1.9.5.x5
[linux-2.6.git]
/
arch
/
um
/
sys-i386
/
ldt.c
diff --git
a/arch/um/sys-i386/ldt.c
b/arch/um/sys-i386/ldt.c
index
33e3021
..
e97b988
100644
(file)
--- a/
arch/um/sys-i386/ldt.c
+++ b/
arch/um/sys-i386/ldt.c
@@
-13,17
+13,23
@@
#ifdef CONFIG_MODE_TT
extern int modify_ldt(int func, void *ptr, unsigned long bytecount);
#ifdef CONFIG_MODE_TT
extern int modify_ldt(int func, void *ptr, unsigned long bytecount);
-int sys_modify_ldt_tt(int func, void *ptr, unsigned long bytecount)
+/* XXX this needs copy_to_user and copy_from_user */
+
+int sys_modify_ldt_tt(int func, void __user *ptr, unsigned long bytecount)
{
{
- if(verify_area(VERIFY_READ, ptr, bytecount)) return(-EFAULT);
- return(modify_ldt(func, ptr, bytecount));
+ if (verify_area(VERIFY_READ, ptr, bytecount))
+ return -EFAULT;
+
+ return modify_ldt(func, ptr, bytecount);
}
#endif
#ifdef CONFIG_MODE_SKAS
extern int userspace_pid;
}
#endif
#ifdef CONFIG_MODE_SKAS
extern int userspace_pid;
-int sys_modify_ldt_skas(int func, void *ptr, unsigned long bytecount)
+#include "skas_ptrace.h"
+
+int sys_modify_ldt_skas(int func, void __user *ptr, unsigned long bytecount)
{
struct ptrace_ldt ldt;
void *buf;
{
struct ptrace_ldt ldt;
void *buf;
@@
-72,7
+78,7
@@
int sys_modify_ldt_skas(int func, void *ptr, unsigned long bytecount)
}
#endif
}
#endif
-int sys_modify_ldt(int func, void *ptr, unsigned long bytecount)
+int sys_modify_ldt(int func, void
__user
*ptr, unsigned long bytecount)
{
return(CHOOSE_MODE_PROC(sys_modify_ldt_tt, sys_modify_ldt_skas, func,
ptr, bytecount));
{
return(CHOOSE_MODE_PROC(sys_modify_ldt_tt, sys_modify_ldt_skas, func,
ptr, bytecount));