Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:arch\x86\lib\usercopy.c Create Date:2022-07-28 07:24:57
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:We rely on the nested NMI work to allow atomic faults from the NMI path; the* nested NMI paths are careful to preserve CR2.

Proto:unsigned long copy_from_user_nmi(void *to, const void __user *from, unsigned long n)

Type:unsigned long

Parameter:

TypeParameterName
void *to
const void __user *from
unsigned longn
21  If __range_not_ok(from, n, TASK_SIZE) Then Return n
24  If Not Blindly accessing user memory from NMI context can be dangerous* if we're in the middle of switching the current user task or* switching the loaded mm. It can also be dangerous if we* interrupted some kernel code that was temporarily using a* different mm. Then Return n
32  These routines enable/disable the pagefault handler. If disabled, it will* not take any locks and go straight to the fixup table.* User access methods will not sleep when called from a pagefault_disabled()* environment.
33  ret = Architectures should provide two primitives (raw_copy_{to,from}_user())* and get rid of their private instances of copy_{to,from}_user() and* __copy_{to,from}_user{,_inatomic}().* raw_copy_{to,from}_user(to, from, size) should copy up to size bytes and
34  pagefault_enable()
36  Return ret