函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:mm\maccess.c Create Date:2022-07-27 15:30:35
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:__strncpy_from_unsafe

函数原型:long __strncpy_from_unsafe(char *dst, const void *unsafe_addr, long count)

返回类型:long

参数:

类型参数名称
char *dst
const void *unsafe_addr
longcount
186  old_fs等于获取当前进程地址空间上限()
187  src等于unsafe_addr
190  如果此条件成立可能性小(为编译器优化)(count <= 0)则返回:0
193  设置寄存器值(fs)
194  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.
196  循环
197  ret等于__get_user - Get a simple variable from user space, with less checking( * dst++, (constchar__user__force * )src++)
198 dst[ - 1]且ret恒等于0且srcunsafe_addr小于count循环
200  dst[ - 1]等于'\0'
201  pagefault_enable()
202  设置寄存器值(fs)
204  返回:如果ret则负EFAULT否则srcunsafe_addr