Linux Kernel
3.7.1
|
Go to the source code of this file.
Data Structures | |
struct | exception_table_entry |
Macros | |
#define | HAVE_ARCH_UNMAPPED_AREA /* we decide where to put mmaps */ |
#define | __ptr(x) ((unsigned long __force *)(x)) |
#define | VERIFY_READ 0 |
#define | VERIFY_WRITE 1 |
#define | __range_ok(addr, size) ___range_ok((unsigned long) (addr), (unsigned long) (size)) |
#define | access_ok(type, addr, size) (__range_ok((void __user *)(addr), (size)) == 0) |
#define | __access_ok(addr, size) (__range_ok((addr), (size)) == 0) |
#define | __put_user(x, ptr) |
#define | put_user(x, ptr) |
#define | __put_user_asm(err, x, ptr, bwl, con) |
#define | __get_user(x, ptr) |
#define | get_user(x, ptr) |
#define | __get_user_asm(err, x, ptr, bwl, con) |
#define | ____force(x) (__force void *)(void __user *)(x) |
#define | clear_user(dst, count) (memset(____force(dst), 0, (count)), 0) |
#define | __copy_from_user_inatomic(to, from, n) (memcpy((to), ____force(from), (n)), 0) |
#define | __copy_to_user_inatomic(to, from, n) (memcpy(____force(to), (from), (n)), 0) |
#define | __clear_user clear_user |
#define | strlen_user(str) strnlen_user(str, 32767) |
Functions | |
unsigned long | search_exception_table (unsigned long) |
int | __put_user_bad (void) |
int | __get_user_bad (void) |
long | strncpy_from_user (char *dst, const char __user *src, long count) |
long | strnlen_user (const char __user *src, long count) |
#define __access_ok | ( | addr, | |
size | |||
) | (__range_ok((addr), (size)) == 0) |
#define __clear_user clear_user |
#define __get_user | ( | x, | |
ptr | |||
) |
#define HAVE_ARCH_UNMAPPED_AREA /* we decide where to put mmaps */ |
#define strlen_user | ( | str | ) | strnlen_user(str, 32767) |
strncpy_from_user: - Copy a NUL terminated string from userspace. : Destination address, in kernel space. This buffer must be at least bytes long. : Source address, in user space. : Maximum number of bytes to copy, including the trailing NUL.
Copies a NUL-terminated string from userspace to kernel space.
On success, returns the length of the string (not including the trailing NUL).
If access to userspace fails, returns -EFAULT (some data may have been copied).
If is smaller than the length of the string, copies bytes and returns .
strnlen_user: - Get the size of a user string INCLUDING final NUL. : The string to measure. : Maximum count (including NUL character)
Context: User context only. This function may sleep.
Get the size of a NUL-terminated string in user space.
Returns the size of the string INCLUDING the terminating NUL. If the string is too long, returns 'count+1'. On exception (or invalid count), returns 0.