2 * Copyright (C) 2000 - 2003 Jeff Dike (jdike@addtoit.com)
3 * Licensed under the GPL
6 #include "linux/sched.h"
7 #include "asm/uaccess.h"
9 int copy_from_user_tt(void *to, const void __user *from, int n)
11 if(!access_ok_tt(VERIFY_READ, from, n))
14 return(__do_copy_from_user(to, from, n, ¤t->thread.fault_addr,
15 ¤t->thread.fault_catcher));
18 int copy_to_user_tt(void __user *to, const void *from, int n)
20 if(!access_ok_tt(VERIFY_WRITE, to, n))
23 return(__do_copy_to_user(to, from, n, ¤t->thread.fault_addr,
24 ¤t->thread.fault_catcher));
27 int strncpy_from_user_tt(char *dst, const char __user *src, int count)
31 if(!access_ok_tt(VERIFY_READ, src, 1))
34 n = __do_strncpy_from_user(dst, src, count,
35 ¤t->thread.fault_addr,
36 ¤t->thread.fault_catcher);
37 if(n < 0) return(-EFAULT);
41 int __clear_user_tt(void __user *mem, int len)
43 return(__do_clear_user(mem, len,
44 ¤t->thread.fault_addr,
45 ¤t->thread.fault_catcher));
48 int clear_user_tt(void __user *mem, int len)
50 if(!access_ok_tt(VERIFY_WRITE, mem, len))
53 return(__do_clear_user(mem, len, ¤t->thread.fault_addr,
54 ¤t->thread.fault_catcher));
57 int strnlen_user_tt(const void __user *str, int len)
59 return(__do_strnlen_user(str, len,
60 ¤t->thread.fault_addr,
61 ¤t->thread.fault_catcher));
65 * Overrides for Emacs so that we follow Linus's tabbing style.
66 * Emacs will notice this stuff at the end of the file and automatically
67 * adjust the settings for this buffer only. This must remain at the end
69 * ---------------------------------------------------------------------------
71 * c-file-style: "linux"