Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:Fetch a null-terminated string from user. Caller MUST set *(u32 *)buf* with max length and relative data location.

Proto:static inline __attribute__((__always_inline__)) int fetch_store_string_user(unsigned long addr, void *dest, void *base)

Type:int

Parameter:

TypeParameterName
unsigned longaddr
void *dest
void *base
1093  __user * uaddr = addr
1094  maxlen = get_loc_len( * (u32 * )dest)
1098  If Value for the false possibility is greater at compile time(!maxlen) Then Return -ENOMEM
1101  __dest = get_loc_data(dest, base)
1103  ret = strncpy_from_unsafe_user(__dest, uaddr, maxlen)
1104  If ret >= 0 Then dest = data_loc: data location, compatible with u32 (ret, __dest - base)
1107  Return ret
Caller
NameDescribe
process_fetch_insn_bottomFrom the 2nd stage, routine is same