_copy_from_user(9)

_copy_from_user9

Copy a block of data from user space.

Usage

unsigned long _copy_from_user(void * to, const void __user * from, unsigned n);

Arguments

to

Destination address, in kernel space.

from

Source address, in user space.

n

Number of bytes to copy.

Context

User context only. This function may sleep if pagefaults are enabled.

Overview

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.

Releases

3 releases since Debian 7 (Wheezy); the text changed 2 times.

  1. 7
  2. 8
  3. 9

From linux-manual-4.9 4.9.228-1 in Debian 9 (Stretch). Parsed by carta from the page's man source.