Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions
usercopy_32.c File Reference
#include <linux/mm.h>
#include <linux/highmem.h>
#include <linux/blkdev.h>
#include <linux/module.h>
#include <linux/backing-dev.h>
#include <linux/interrupt.h>
#include <asm/uaccess.h>
#include <asm/mmx.h>
#include <asm/asm.h>

Go to the source code of this file.

Macros

#define movsl_is_ok(a1, a2, n)   __movsl_is_ok((unsigned long)(a1), (unsigned long)(a2), (n))
 
#define __do_clear_user(addr, size)
 
#define __copy_user(to, from, size)
 
#define __copy_user_zeroing(to, from, size)
 

Functions

unsigned long clear_user (void __user *to, unsigned long n)
 
 EXPORT_SYMBOL (clear_user)
 
unsigned long __clear_user (void __user *to, unsigned long n)
 
 EXPORT_SYMBOL (__clear_user)
 
unsigned long __copy_user_zeroing_intel (void *to, const void __user *from, unsigned long size)
 
unsigned long __copy_user_intel (void __user *to, const void *from, unsigned long size)
 
unsigned long __copy_user_zeroing_intel_nocache (void *to, const void __user *from, unsigned long size)
 
unsigned long __copy_to_user_ll (void __user *to, const void *from, unsigned long n)
 
 EXPORT_SYMBOL (__copy_to_user_ll)
 
unsigned long __copy_from_user_ll (void *to, const void __user *from, unsigned long n)
 
 EXPORT_SYMBOL (__copy_from_user_ll)
 
unsigned long __copy_from_user_ll_nozero (void *to, const void __user *from, unsigned long n)
 
 EXPORT_SYMBOL (__copy_from_user_ll_nozero)
 
unsigned long __copy_from_user_ll_nocache (void *to, const void __user *from, unsigned long n)
 
 EXPORT_SYMBOL (__copy_from_user_ll_nocache)
 
unsigned long __copy_from_user_ll_nocache_nozero (void *to, const void __user *from, unsigned long n)
 
 EXPORT_SYMBOL (__copy_from_user_ll_nocache_nozero)
 
unsigned long copy_to_user (void __user *to, const void *from, unsigned long n)
 
 EXPORT_SYMBOL (copy_to_user)
 
unsigned long _copy_from_user (void *to, const void __user *from, unsigned long n)
 
 EXPORT_SYMBOL (_copy_from_user)
 
void copy_from_user_overflow (void)
 
 EXPORT_SYMBOL (copy_from_user_overflow)
 

Macro Definition Documentation

#define __copy_user (   to,
  from,
  size 
)

Definition at line 498 of file usercopy_32.c.

#define __copy_user_zeroing (   to,
  from,
  size 
)

Definition at line 531 of file usercopy_32.c.

#define __do_clear_user (   addr,
  size 
)
Value:
do { \
int __d0; \
might_fault(); \
__asm__ __volatile__( \
ASM_STAC "\n" \
"0: rep; stosl\n" \
" movl %2,%0\n" \
"1: rep; stosb\n" \
"2: " ASM_CLAC "\n" \
".section .fixup,\"ax\"\n" \
"3: lea 0(%2,%0,4),%0\n" \
" jmp 2b\n" \
".previous\n" \
: "=&c"(size), "=&D" (__d0) \
: "r"(size & 3), "0"(size / 4), "1"(addr), "a"(0)); \
} while (0)

Definition at line 40 of file usercopy_32.c.

#define movsl_is_ok (   a1,
  a2,
  n 
)    __movsl_is_ok((unsigned long)(a1), (unsigned long)(a2), (n))

Definition at line 33 of file usercopy_32.c.

Function Documentation

unsigned long __clear_user ( void __user to,
unsigned long  n 
)

__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 92 of file usercopy_32.c.

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

Definition at line 640 of file usercopy_32.c.

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

Definition at line 667 of file usercopy_32.c.

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

Definition at line 684 of file usercopy_32.c.

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

Definition at line 653 of file usercopy_32.c.

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

Definition at line 570 of file usercopy_32.c.

unsigned long __copy_user_intel ( void __user to,
const void from,
unsigned long  size 
)
unsigned long __copy_user_zeroing_intel ( void to,
const void __user from,
unsigned long  size 
)
unsigned long __copy_user_zeroing_intel_nocache ( void to,
const void __user from,
unsigned long  size 
)
unsigned long _copy_from_user ( void to,
const void __user from,
unsigned long  n 
)

copy_from_user: - Copy a block of data from user space. : Destination address, in kernel space. : Source address, in user space.
: Number of bytes to copy.

Context: User context only. This function may sleep.

Copy data from user space to kernel space.

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

If some data could not be copied, this function will pad the copied data to the requested size using zero bytes.

Definition at line 740 of file usercopy_32.c.

unsigned long clear_user ( void __user to,
unsigned long  n 
)

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.

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

Definition at line 71 of file usercopy_32.c.

void copy_from_user_overflow ( void  )

Definition at line 750 of file usercopy_32.c.

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

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 715 of file usercopy_32.c.

EXPORT_SYMBOL ( clear_user  )
EXPORT_SYMBOL ( __clear_user  )
EXPORT_SYMBOL ( __copy_to_user_ll  )
EXPORT_SYMBOL ( __copy_from_user_ll  )
EXPORT_SYMBOL ( __copy_from_user_ll_nozero  )
EXPORT_SYMBOL ( __copy_from_user_ll_nocache  )
EXPORT_SYMBOL ( copy_to_user  )
EXPORT_SYMBOL ( _copy_from_user  )
EXPORT_SYMBOL ( copy_from_user_overflow  )