2 * Copyright (C) 2002 Jeff Dike (jdike@karaya.com)
3 * Licensed under the GPL
6 #ifndef __SKAS_UACCESS_H
7 #define __SKAS_UACCESS_H
11 #define access_ok_skas(type, addr, size) \
12 ((segment_eq(get_fs(), KERNEL_DS)) || \
13 (((unsigned long) (addr) < TASK_SIZE) && \
14 ((unsigned long) (addr) + (size) <= TASK_SIZE)))
16 static inline int verify_area_skas(int type, const void * addr,
19 return(access_ok_skas(type, addr, size) ? 0 : -EFAULT);
22 extern int copy_from_user_skas(void *to, const void *from, int n);
23 extern int copy_to_user_skas(void *to, const void *from, int n);
24 extern int strncpy_from_user_skas(char *dst, const char *src, int count);
25 extern int __clear_user_skas(void *mem, int len);
26 extern int clear_user_skas(void *mem, int len);
27 extern int strnlen_user_skas(const void *str, int len);
32 * Overrides for Emacs so that we follow Linus's tabbing style.
33 * Emacs will notice this stuff at the end of the file and automatically
34 * adjust the settings for this buffer only. This must remain at the end
36 * ---------------------------------------------------------------------------
38 * c-file-style: "linux"