Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:From the 2nd stage, routine is same

Proto:static inline __attribute__((__always_inline__)) int process_fetch_insn_bottom(struct fetch_insn *code, unsigned long val, void *dest, void *base)

Type:int

Parameter:

TypeParameterName
struct fetch_insn *code
unsigned longval
void *dest
void *base
75  struct fetch_insn * s3 = NULL
76  total = 0 , ret = 0 , i = 0
77  loc = 0
78  lval = val
80  stage2 :
82  Do
83  If op == Dereference: .offset Then
84  lval = val
85  ret = probe_mem_read( & val, (void * )val + offset, size of val )
88  lval = val
89  ret = probe_mem_read_user( & val, (void * )val + offset, size of val )
91  Else Break
93  If ret Then Return ret
95  code++
96  When 1 cycle
98  s3 = code
99  stage3 :
101  If Value for the false possibility is greater at compile time(!dest) Then
102  If op == String: .offset, .size Then
104  code++
105  Go to array
106  Else if op == User String: .offset, .size Then
108  code++
109  Go to array
110  Else Return -EILSEQ
115  Case op == Raw: .size
117  Break
119  probe_mem_read(dest, (void * )val + offset, size)
120  Break
122  probe_mem_read_user(dest, (void * )val + offset, size)
123  Break
125  loc = dest
127  Break
129  loc = dest
131  Break
132  Default
133  Return -EILSEQ
135  code++
140  code++
143  array :
146  total += ret
147  If ++i < param Then
148  code = s3
151  dest += size
152  val += size
153  Go to stage3
155  code--
156  val = lval + size of *
157  If dest Then
158  dest += sizeof(u32)
161  Go to stage2
163  code++
164  ret = total
167  Return If op == FETCH_OP_END Then ret Else -EILSEQ
Caller
NameDescribe
process_fetch_insnNote that we don't verify it, since the code does not come from user space
process_fetch_insnNote that we don't verify it, since the code does not come from user space