Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
usercopy.c File Reference
#include <linux/prefetch.h>
#include <linux/string.h>
#include <linux/thread_info.h>
#include <asm/uaccess.h>

Go to the source code of this file.

Macros

#define __do_strncpy_from_user(dst, src, count, res)
 
#define __do_clear_user(addr, size)
 

Functions

unsigned long __generic_copy_to_user (void __user *to, const void *from, unsigned long n)
 
unsigned long __generic_copy_from_user (void *to, const void __user *from, unsigned long n)
 
long __strncpy_from_user (char *dst, const char __user *src, long count)
 
long strncpy_from_user (char *dst, const char __user *src, long count)
 
unsigned long clear_user (void __user *to, unsigned long n)
 
unsigned long __clear_user (void __user *to, unsigned long n)
 
long strnlen_user (const char __user *s, long n)
 

Macro Definition Documentation

#define __do_clear_user (   addr,
  size 
)

Definition at line 179 of file usercopy.c.

#define __do_strncpy_from_user (   dst,
  src,
  count,
  res 
)

Definition at line 75 of file usercopy.c.

Function Documentation

unsigned long __clear_user ( void __user mem,
unsigned long  len 
)

__clear_user: - Zero a block of memory in user space, with less checking. : Destination address, in user space.
: Number of bytes to zero.

Zero a block of memory in user space. Caller must check the specified block with access_ok() before calling this function.

Returns number of bytes that could not be cleared. On success, this will be zero.

Definition at line 232 of file usercopy.c.

unsigned long __generic_copy_from_user ( void to,
const void __user from,
unsigned long  n 
)

Definition at line 24 of file usercopy.c.

unsigned long __generic_copy_to_user ( void __user to,
const void from,
unsigned long  n 
)

Definition at line 15 of file usercopy.c.

long __strncpy_from_user ( char dst,
const char __user src,
long  count 
)

Definition at line 113 of file usercopy.c.

unsigned long clear_user ( void __user mem,
unsigned long  len 
)

clear_user: - Zero a block of memory in user space. : Destination address, in user space.
: Number of bytes to zero.

Zero a block of memory in user space. Caller must check the specified block with access_ok() before calling this function.

Returns number of bytes that could not be cleared. On success, this will be zero.

Definition at line 224 of file usercopy.c.

long strncpy_from_user ( char dst,
const char __user src,
long  count 
)

Definition at line 121 of file usercopy.c.

long strnlen_user ( const char __user s,
long  n 
)

Definition at line 315 of file usercopy.c.