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

Go to the source code of this file.

Macros

#define __futex_atomic_op(insn, ret, oldval, newval, uaddr, oparg)
 

Functions

size_t copy_from_user_pt (size_t n, const void __user *from, void *to)
 
size_t copy_to_user_pt (size_t n, void __user *to, const void *from)
 
int futex_atomic_op_pt (int op, u32 __user *uaddr, int oparg, int *old)
 
int futex_atomic_cmpxchg_pt (u32 *uval, u32 __user *uaddr, u32 oldval, u32 newval)
 

Variables

struct uaccess_ops uaccess_pt
 

Macro Definition Documentation

#define __futex_atomic_op (   insn,
  ret,
  oldval,
  newval,
  uaddr,
  oparg 
)
Value:
asm volatile("0: l %1,0(%6)\n" \
"1: " insn \
"2: cs %1,%2,0(%6)\n" \
"3: jl 1b\n" \
" lhi %0,0\n" \
"4:\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 274 of file uaccess_pt.c.

Function Documentation

size_t copy_from_user_pt ( size_t  n,
const void __user from,
void to 
)

Definition at line 122 of file uaccess_pt.c.

size_t copy_to_user_pt ( size_t  n,
void __user to,
const void from 
)

Definition at line 136 of file uaccess_pt.c.

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

Definition at line 356 of file uaccess_pt.c.

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

Definition at line 320 of file uaccess_pt.c.

Variable Documentation

struct uaccess_ops uaccess_pt
Initial value:
= {
.copy_from_user = copy_from_user_pt,
.copy_from_user_small = copy_from_user_pt,
.copy_to_user = copy_to_user_pt,
.copy_to_user_small = copy_to_user_pt,
.copy_in_user = copy_in_user_pt,
.clear_user = clear_user_pt,
.strnlen_user = strnlen_user_pt,
.strncpy_from_user = strncpy_from_user_pt,
.futex_atomic_op = futex_atomic_op_pt,
.futex_atomic_cmpxchg = futex_atomic_cmpxchg_pt,
}

Definition at line 377 of file uaccess_pt.c.