Linux Kernel
3.7.1
|
#include <asm/page.h>
#include <asm/cache.h>
#include <asm/errno.h>
#include <asm-generic/uaccess-unaligned.h>
Go to the source code of this file.
Data Structures | |
struct | exception_table_entry |
struct | exception_data |
Functions | |
int | __get_kernel_bad (void) |
int | __get_user_bad (void) |
int | __put_kernel_bad (void) |
int | __put_user_bad (void) |
unsigned long | lcopy_to_user (void __user *, const void *, unsigned long) |
unsigned long | lcopy_from_user (void *, const void __user *, unsigned long) |
unsigned long | lcopy_in_user (void __user *, const void __user *, unsigned long) |
long | strncpy_from_user (char *, const char __user *, long) |
unsigned | lclear_user (void __user *, unsigned long) |
long | lstrnlen_user (const char __user *, long) |
unsigned long | copy_to_user (void __user *dst, const void *src, unsigned long len) |
unsigned long | __copy_from_user (void *dst, const void __user *src, unsigned long len) |
unsigned long | copy_in_user (void __user *dst, const void __user *src, unsigned long len) |
void | copy_from_user_overflow (void) __compiletime_warning("copy_from_user() buffer size is not provably correct") |
int | fixup_exception (struct pt_regs *regs) |
#define __clear_user lclear_user |
#define __copy_from_user_inatomic __copy_from_user |
#define __copy_in_user copy_in_user |
#define __copy_to_user copy_to_user |
#define __copy_to_user_inatomic __copy_to_user |
#define __get_kernel_asm | ( | ldx, | |
ptr | |||
) |
#define __get_user | ( | x, | |
ptr | |||
) |
#define __get_user_asm | ( | ldx, | |
ptr | |||
) |
#define ASM_EXCEPTIONTABLE_ENTRY | ( | fault_addr, | |
except_addr | |||
) |
#define clear_user lclear_user |
#define get_fs | ( | void | ) | (current_thread_info()->addr_limit) |
#define get_user __get_user |
#define KERNEL_DS ((mm_segment_t){0}) |
#define LDD_KERNEL | ( | ptr | ) | __get_kernel_bad(); |
#define LDD_USER | ( | ptr | ) | __get_user_bad(); |
#define put_user __put_user |
#define set_fs | ( | x | ) | (current_thread_info()->addr_limit = (x)) |
#define strlen_user | ( | str | ) | lstrnlen_user(str, 0x7fffffffL) |
#define strnlen_user lstrnlen_user |
#define USER_DS ((mm_segment_t){1}) |
Definition at line 4 of file usercopy.c.
Definition at line 28 of file usercopy_64.c.
copy_to_user: - Copy a block of data into user space. : Destination address, in user space. : Source address, in kernel space.
: Number of bytes to copy.
Context: User context only. This function may sleep.
Copy data from kernel space to user space.
Returns number of bytes that could not be copied. On success, this will be zero.
Definition at line 21 of file usercopy_64.c.
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 .