Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
uaccess.h File Reference
#include <linux/thread_info.h>
#include <linux/errno.h>
#include <asm/memory.h>
#include <asm-generic/uaccess.h>

Go to the source code of this file.

Macros

#define __copy_from_user   __copy_from_user
 
#define __copy_to_user   __copy_to_user
 
#define __strncpy_from_user   __strncpy_from_user
 
#define __strnlen_user   __strnlen_user
 
#define __clear_user   __clear_user
 
#define __kernel_ok   (segment_eq(get_fs(), KERNEL_DS))
 
#define __user_ok(addr, size)
 
#define __access_ok(addr, size)   (__kernel_ok || __user_ok((addr), (size)))
 

Functions

unsigned long __must_check __copy_from_user (void *to, const void __user *from, unsigned long n)
 
unsigned long __must_check __copy_to_user (void __user *to, const void *from, unsigned long n)
 
unsigned long __must_check __clear_user (void __user *addr, unsigned long n)
 
unsigned long __must_check __strncpy_from_user (char *to, const char __user *from, unsigned long count)
 
unsigned long __strnlen_user (const char __user *s, long n)
 
int fixup_exception (struct pt_regs *regs)
 

Macro Definition Documentation

#define __access_ok (   addr,
  size 
)    (__kernel_ok || __user_ok((addr), (size)))

Definition at line 29 of file uaccess.h.

#define __clear_user   __clear_user

Definition at line 24 of file uaccess.h.

#define __copy_from_user   __copy_from_user

Definition at line 20 of file uaccess.h.

#define __copy_to_user   __copy_to_user

Definition at line 21 of file uaccess.h.

#define __kernel_ok   (segment_eq(get_fs(), KERNEL_DS))

Definition at line 26 of file uaccess.h.

#define __strncpy_from_user   __strncpy_from_user

Definition at line 22 of file uaccess.h.

#define __strnlen_user   __strnlen_user

Definition at line 23 of file uaccess.h.

#define __user_ok (   addr,
  size 
)
Value:
(((size) <= TASK_SIZE) \
&& ((addr) <= TASK_SIZE - (size)))

Definition at line 27 of file uaccess.h.

Function Documentation

unsigned long __must_check __clear_user ( void __user addr,
unsigned long  size 
)

__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 158 of file uaccess_with_memcpy.c.

unsigned long __must_check __copy_from_user ( void to,
const void __user from,
unsigned long  n 
)
unsigned long __must_check __copy_to_user ( void __user to,
const void from,
unsigned long  n 
)

Definition at line 107 of file uaccess_with_memcpy.c.

unsigned long __must_check __strncpy_from_user ( char to,
const char __user from,
unsigned long  count 
)
unsigned long __strnlen_user ( const char __user s,
long  n 
)
int fixup_exception ( struct pt_regs regs)

Definition at line 7 of file extable.c.