Changeset View
Changeset View
Standalone View
Standalone View
sys/compat/linuxkpi/common/include/asm/uaccess.h
Context not available. | |||||
#ifndef _ASM_UACCESS_H_ | #ifndef _ASM_UACCESS_H_ | ||||
#define _ASM_UACCESS_H_ | #define _ASM_UACCESS_H_ | ||||
#include <linux/uaccess.h> | /* | ||||
hselasky: Is this code supposed to be used? Or just remove it? | |||||
Not Done Inline ActionsI wanted to discuss about this. user_access_{begin|end} are now empty implementation in linux/uaccess.h. is that ok or should we use stac()/clac()? If the generic implementation in linux/uaccess.h is fine that we can delete this commented code. johalun0_gmail.com: I wanted to discuss about this.
user_access_{begin|end} are now empty implementation in… | |||||
Not Done Inline ActionsFrom what I know there is no platform specific handling regarding user-memory access in the LinuxKPI. hselasky: From what I know there is no platform specific handling regarding user-memory access in the… | |||||
static inline long | Disable. Need __{get,put}_user_size() functions... | ||||
copy_to_user(void *to, const void *from, unsigned long n) | Use defaults in linux/uaccess.h for now. | ||||
{ | |||||
if (linux_copyout(from, to, n) != 0) | |||||
return n; | |||||
return 0; | |||||
} | |||||
#define __copy_to_user(...) copy_to_user(__VA_ARGS__) | |||||
static inline long | #define user_access_begin() stac() | ||||
copy_from_user(void *to, const void *from, unsigned long n) | #define user_access_end() clac() | ||||
{ | |||||
if (linux_copyin(from, to, n) != 0) | #define unsafe_put_user(x, ptr, err_label) \ | ||||
return n; | do { \ | ||||
return 0; | int __error; \ | ||||
} | __typeof__(*(ptr)) __x = (x); \ | ||||
#define __copy_from_user(...) copy_from_user(__VA_ARGS__) | __put_user_size(__x, (ptr), sizeof(*(ptr)), \ | ||||
#define __copy_in_user(...) copy_from_user(__VA_ARGS__) | __error, -EFAULT); \ | ||||
if (unlikely(__error)) goto err_label; \ | |||||
} while (0) | |||||
#define unsafe_get_user(x, ptr, err_label) \ | |||||
do { \ | |||||
int __error; \ | |||||
__inttype(*(ptr)) __x; \ | |||||
__get_user_size(__x, (ptr), sizeof(*(ptr)), \ | |||||
__error, -EFAULT); \ | |||||
(x) = (__force __typeof__(*(ptr)))__x; \ | |||||
if (unlikely(__error)) goto err_label; \ | |||||
} while (0) | |||||
*/ | |||||
#endif /* _ASM_UACCESS_H_ */ | #endif /* _ASM_UACCESS_H_ */ | ||||
Context not available. |
Is this code supposed to be used? Or just remove it?