diff options
Diffstat (limited to 'arch/um/include/um_uaccess.h')
-rw-r--r-- | arch/um/include/um_uaccess.h | 64 |
1 files changed, 12 insertions, 52 deletions
diff --git a/arch/um/include/um_uaccess.h b/arch/um/include/um_uaccess.h index 5126a99b5961..fdfc06b85605 100644 --- a/arch/um/include/um_uaccess.h +++ b/arch/um/include/um_uaccess.h @@ -1,26 +1,16 @@ /* - * Copyright (C) 2002 Jeff Dike (jdike@karaya.com) + * Copyright (C) 2002 - 2007 Jeff Dike (jdike@{addtoit,linux.intel}.com) * Licensed under the GPL */ #ifndef __ARCH_UM_UACCESS_H #define __ARCH_UM_UACCESS_H -#include "choose-mode.h" - -#ifdef CONFIG_MODE_TT -#include "uaccess-tt.h" -#endif - -#ifdef CONFIG_MODE_SKAS -#include "uaccess-skas.h" -#endif - #include "asm/fixmap.h" #define __under_task_size(addr, size) \ (((unsigned long) (addr) < TASK_SIZE) && \ - (((unsigned long) (addr) + (size)) < TASK_SIZE)) + (((unsigned long) (addr) + (size)) < TASK_SIZE)) #define __access_ok_vsyscall(type, addr, size) \ ((type == VERIFY_READ) && \ @@ -35,20 +25,14 @@ (__addr_range_nowrap(addr, size) && \ (__under_task_size(addr, size) || \ __access_ok_vsyscall(type, addr, size) || \ - segment_eq(get_fs(), KERNEL_DS) || \ - CHOOSE_MODE_PROC(access_ok_tt, access_ok_skas, type, addr, size))) + segment_eq(get_fs(), KERNEL_DS))) -static inline int copy_from_user(void *to, const void __user *from, int n) -{ - return(CHOOSE_MODE_PROC(copy_from_user_tt, copy_from_user_skas, to, - from, n)); -} +extern int copy_from_user(void *to, const void __user *from, int n); +extern int copy_to_user(void __user *to, const void *from, int n); -static inline int copy_to_user(void __user *to, const void *from, int n) -{ - return(CHOOSE_MODE_PROC(copy_to_user_tt, copy_to_user_skas, to, - from, n)); -} +extern int __do_copy_to_user(void *to, const void *from, int n, + void **fault_addr, jmp_buf **fault_catcher); +extern void __do_copy(void *to, const void *from, int n); /* * strncpy_from_user: - Copy a NUL terminated string from userspace. @@ -69,11 +53,7 @@ static inline int copy_to_user(void __user *to, const void *from, int n) * and returns @count. */ -static inline int strncpy_from_user(char *dst, const char __user *src, int count) -{ - return(CHOOSE_MODE_PROC(strncpy_from_user_tt, strncpy_from_user_skas, - dst, src, count)); -} +extern int strncpy_from_user(char *dst, const char __user *src, int count); /* * __clear_user: - Zero a block of memory in user space, with less checking. @@ -86,10 +66,7 @@ static inline int strncpy_from_user(char *dst, const char __user *src, int count * Returns number of bytes that could not be cleared. * On success, this will be zero. */ -static inline int __clear_user(void *mem, int len) -{ - return(CHOOSE_MODE_PROC(__clear_user_tt, __clear_user_skas, mem, len)); -} +extern int __clear_user(void __user *mem, int len); /* * clear_user: - Zero a block of memory in user space. @@ -101,10 +78,7 @@ static inline int __clear_user(void *mem, int len) * Returns number of bytes that could not be cleared. * On success, this will be zero. */ -static inline int clear_user(void __user *mem, int len) -{ - return(CHOOSE_MODE_PROC(clear_user_tt, clear_user_skas, mem, len)); -} +extern int clear_user(void __user *mem, int len); /* * strlen_user: - Get the size of a string in user space. @@ -117,20 +91,6 @@ static inline int clear_user(void __user *mem, int len) * On exception, returns 0. * If the string is too long, returns a value greater than @n. */ -static inline int strnlen_user(const void __user *str, long len) -{ - return(CHOOSE_MODE_PROC(strnlen_user_tt, strnlen_user_skas, str, len)); -} +extern int strnlen_user(const void __user *str, int len); #endif - -/* - * Overrides for Emacs so that we follow Linus's tabbing style. - * Emacs will notice this stuff at the end of the file and automatically - * adjust the settings for this buffer only. This must remain at the end - * of the file. - * --------------------------------------------------------------------------- - * Local variables: - * c-file-style: "linux" - * End: - */ |