1__COPY_TO_USER_INATO(9)   Memory Management in Linux   __COPY_TO_USER_INATO(9)
2
3
4

NAME

6       __copy_to_user_inatomic - Copy a block of data into user space, with
7       less checking.
8

SYNOPSIS

10       unsigned long __must_check __copy_to_user_inatomic(void __user * to,
11                                                          const void * from,
12                                                          unsigned long n);
13

ARGUMENTS

15       to
16           Destination address, in user space.
17
18       from
19           Source address, in kernel space.
20
21       n
22           Number of bytes to copy.
23

CONTEXT

25       User context only.
26

DESCRIPTION

28       Copy data from kernel space to user space. Caller must check the
29       specified block with access_ok before calling this function. The caller
30       should also make sure he pins the user space address so that we donĀ“t
31       result in page fault and sleep.
32
33       Here we special-case 1, 2 and 4-byte copy_*_user invocations. On a
34       fault we return the initial request size (1, 2 or 4), as copy_*_user
35       should do. If a store crosses a page boundary and gets a fault, the x86
36       will not write anything, so this is accurate.
37
39Kernel Hackers Manual 2.6.         June 2019           __COPY_TO_USER_INATO(9)
Impressum