Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros | Functions | Variables
uaccess_std.c File Reference
#include <linux/errno.h>
#include <linux/mm.h>
#include <linux/uaccess.h>
#include <asm/futex.h>
#include "uaccess.h"

Go to the source code of this file.

Macros

#define AHI   "ahi"
 
#define ALR   "alr"
 
#define CLR   "clr"
 
#define LHI   "lhi"
 
#define SLR   "slr"
 
#define __futex_atomic_op(insn, ret, oldval, newval, uaddr, oparg)
 

Functions

size_t copy_from_user_std (size_t size, const void __user *ptr, void *x)
 
size_t copy_to_user_std (size_t size, void __user *ptr, const void *x)
 
size_t strnlen_user_std (size_t size, const char __user *src)
 
size_t strncpy_from_user_std (size_t size, const char __user *src, char *dst)
 
int futex_atomic_op_std (int op, u32 __user *uaddr, int oparg, int *old)
 
int futex_atomic_cmpxchg_std (u32 *uval, u32 __user *uaddr, u32 oldval, u32 newval)
 

Variables

struct uaccess_ops uaccess_std
 

Macro Definition Documentation

#define __futex_atomic_op (   insn,
  ret,
  oldval,
  newval,
  uaddr,
  oparg 
)
Value:
asm volatile( \
" sacf 256\n" \
"0: l %1,0(%6)\n" \
"1:"insn \
"2: cs %1,%2,0(%6)\n" \
"3: jl 1b\n" \
" lhi %0,0\n" \
"4: sacf 0\n" \
EX_TABLE(0b,4b) EX_TABLE(2b,4b) EX_TABLE(3b,4b) \
: "=d" (ret), "=&d" (oldval), "=&d" (newval), \
"=m" (*uaddr) \
: "0" (-EFAULT), "d" (oparg), "a" (uaddr), \
"m" (*uaddr) : "cc");

Definition at line 241 of file uaccess_std.c.

#define AHI   "ahi"

Definition at line 17 of file uaccess_std.c.

#define ALR   "alr"

Definition at line 18 of file uaccess_std.c.

#define CLR   "clr"

Definition at line 19 of file uaccess_std.c.

#define LHI   "lhi"

Definition at line 20 of file uaccess_std.c.

#define SLR   "slr"

Definition at line 21 of file uaccess_std.c.

Function Documentation

size_t copy_from_user_std ( size_t  size,
const void __user ptr,
void x 
)

Definition at line 30 of file uaccess_std.c.

size_t copy_to_user_std ( size_t  size,
void __user ptr,
const void x 
)

Definition at line 80 of file uaccess_std.c.

int futex_atomic_cmpxchg_std ( u32 uval,
u32 __user uaddr,
u32  oldval,
u32  newval 
)

Definition at line 288 of file uaccess_std.c.

int futex_atomic_op_std ( int  op,
u32 __user uaddr,
int  oparg,
int old 
)

Definition at line 256 of file uaccess_std.c.

size_t strncpy_from_user_std ( size_t  size,
const char __user src,
char dst 
)

Definition at line 207 of file uaccess_std.c.

size_t strnlen_user_std ( size_t  size,
const char __user src 
)

Definition at line 186 of file uaccess_std.c.

Variable Documentation

struct uaccess_ops uaccess_std
Initial value:
= {
.copy_from_user = copy_from_user_std_check,
.copy_from_user_small = copy_from_user_std,
.copy_to_user = copy_to_user_std_check,
.copy_to_user_small = copy_to_user_std,
.copy_in_user = copy_in_user_std,
.clear_user = clear_user_std,
.strnlen_user = strnlen_user_std,
.strncpy_from_user = strncpy_from_user_std,
.futex_atomic_op = futex_atomic_op_std,
.futex_atomic_cmpxchg = futex_atomic_cmpxchg_std,
}

Definition at line 306 of file uaccess_std.c.