Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Copy a NUL terminated string from userspace

Proto:long strncpy_from_user(char *dst, const char __user *src, long count)

Type:long

Parameter:

TypeParameterName
char *dst
const char __user *src
longcount
101  If Value for the false possibility is greater at compile time(count <= 0) Then Return 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  If Value is more likely to compile time(src_addr < max_addr) Then
107  max = max_addr - src_addr
114  If max > count Then max = count
117  kasan_check_write(dst, count)
118  check_object_size(dst, count, false)
119  If user_access_begin(src, max) Then
121  user_access_end()
122  Return retval
125  Return -EFAULT
Caller
NameDescribe
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