login
Header Space

 
 

__get_user(9)

July 19, 2007 - 1:23am
Submitted by Jeremy on July 19, 2007 - 1:23am.

INDEX

    NAME, SYNOPSIS, ARGUMENTS, CONTEXT, DESCRIPTION, COPYRIGHT

    "__GET_USER" "9" "July 2007" "Kernel Hackers Manual 2.6.22" "Memory Management in Linux"

    NAME

    __get_user - Get a simple variable from user space, with less checking.

    SYNOPSIS

    "__get_user(" "x" ", " "ptr" ");"

    ARGUMENTS

    x

    Variable to store result.
    ptr
    Source address, in user space.

    CONTEXT

    User context only. This function may sleep.

    DESCRIPTION

    This macro copies a single simple variable from user space to kernel space. It supports simple types like char and int, but not larger data types like structures or arrays.

    ptr must have pointer-to-simple-variable type, and the result of dereferencing ptr must be assignable to x without a cast.

    Caller must check the pointer with access_okfR
    before calling this function.

    Returns zero on success, or -EFAULT on error. On error, the variable x is set to zero.

    COPYRIGHT

speck-geostationary