Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bpf_adj_delta_to_off

Proto:static int bpf_adj_delta_to_off(struct bpf_insn *insn, u32 pos, s32 end_old, s32 end_new, s32 curr, const bool probe_pass)

Type:int

Parameter:

TypeParameterName
struct bpf_insn *insn
u32pos
s32end_old
s32end_new
s32curr
const boolprobe_pass
359  off_min = S16_MIN , off_max = S16_MAX
360  delta = end_new - end_old
361  off = signed offset
363  If curr < pos && curr + off + 1 >= end_old Then off += delta
365  Else if curr >= end_new && curr + off + 1 < end_new Then off -= delta
367  If off < off_min || off > off_max Then Return -ERANGE
369  If Not probe_pass Then signed offset = off
371  Return 0
Caller
NameDescribe
bpf_adj_branches