函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:用户字符串长度

函数原型:long strnlen_user(const char __user *str, long count)

返回类型:long

参数:

类型参数名称
const char __user *str
longcount
96  如果此条件成立可能性小(为编译器优化)(count <= 0)则返回:0
99  max_addr等于user_addr_max()
100  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)(str)
101  如果此条件成立可能性大(为编译器优化)(src_addr < max_addr)则
102  max等于max_addrsrc_addr
109  如果max大于countmax等于count
112  如果user_access_begin(str, max)则
114  user_access_end()
115  返回:retval
118  返回:0
调用者
名称描述
fetch_store_strlenReturn the length of string -- including null terminal byte
strndup_userstrndup_user - duplicate an existing string from user space*@s: The string to duplicate*@n: Maximum number of bytes to copy, including the trailing NUL.* Return: newly allocated copy of @s or an ERR_PTR() in case of error
create_elf_tables
create_elf_fdpic_tablespresent useful information to the program by shovelling it onto the new* process's stack
create_flat_tablesreate_flat_tables() parses the env- and arg-strings in new user* memory and creates the pointer tables from them, and puts their* addresses on the "stack", recording the new stack pointer value.
audit_log_execve_info
strnlen_unsafe_userstrnlen_unsafe_user: - Get the size of a user string INCLUDING final NUL.*@unsafe_addr: The string to measure.*@count: Maximum count (including NUL)* Get the size of a NUL-terminated string in user space without pagefault.
copy_strings'copy_strings()' copies argument/environment strings from the old* processes's memory to the new process's stack. The call to get_user_pages()* ensures the destination page is created and not swapped out.