函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:复制用户字符串

函数原型:long strncpy_from_user(char *dst, const char __user *src, long count)

返回类型:long

参数:

类型参数名称
char *dst
const char __user *src
longcount
101  如果此条件成立可能性小(为编译器优化)(count <= 0)则返回:0
104  max_addr等于user_addr_max()
105  src_addr等于Architectures that support memory tagging (assigning tags to memory regions,* embedding these tags into addresses that point to these memory regions, and* checking that the memory and the pointer tags match on memory accesses)(src)
106  如果此条件成立可能性大(为编译器优化)(src_addr < max_addr)则
107  max等于max_addrsrc_addr
114  如果max大于countmax等于count
117  kasan_check_write(dst, count)
118  check_object_size(dst, count, false)
119  如果user_access_begin(src, max)则
121  user_access_end()
122  返回:retval
125  返回:负EFAULT
调用者
名称描述
SYSCALL_DEFINE4Reboot system call: for obvious reasons only root may call it,* and even root needs to set up some magic numbers in the registers* so that some mistake won't make this reboot the whole machine.* You can also set the meaning of the ctrl-alt-del-key here.
audit_log_execve_info
fetch_store_stringFetch a null-terminated string. Caller MUST set *(u32 *)dest with max* length and relative data location.
bpf_prog_load
bpf_raw_tracepoint_open
kmemleak_writeFile write operation to configure kmemleak at run-time
getname_flags
setxattrExtended attribute SET operations
getxattrExtended attribute GET operations
removexattrExtended attribute REMOVE operations
copy_user_test
mtrr_writeseq_file can seek but we ignore it.* Format of control line:* "base=%Lx size=%Lx type=%s" or "disable=%d"
SYSCALL_DEFINE5
strncpy_from_unsafe_userstrncpy_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.
key_get_type_from_user