函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:strncpy_from_unsafe_user: - Copy a NUL terminated string from unsafe user* address.*@dst: Destination address, in kernel space. This buffer must be at* least @count bytes long.*@unsafe_addr: Unsafe user address.

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

返回类型:long

参数:

类型参数名称
char *dst
const void __user *unsafe_addr
longcount
228  old_fs等于获取当前进程地址空间上限()
231  如果此条件成立可能性小(为编译器优化)(count <= 0)则返回:0
234  设置寄存器值(fs)
235  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.
236  ret等于复制用户字符串
237  pagefault_enable()
238  设置寄存器值(fs)
240  如果ret大于等于count
241  ret等于count
242  dst[ret - 1]等于'\0'
243  否则如果ret大于0则
244  ret自加
247  返回:ret
调用者
名称描述
fetch_store_string_userFetch a null-terminated string from user. Caller MUST set *(u32 *)buf* with max length and relative data location.
____bpf_probe_read_user_str