Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\core.c Create Date:2022-07-28 12:47:40
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_imm

Proto:static int bpf_adj_delta_to_imm(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
341  imm_min = S32_MIN , imm_max = S32_MAX
342  delta = end_new - end_old
343  imm = signed immediate constant
345  If curr < pos && curr + imm + 1 >= end_old Then imm += delta
347  Else if curr >= end_new && curr + imm + 1 < end_new Then imm -= delta
349  If imm < imm_min || imm > imm_max Then Return -ERANGE
351  If Not probe_pass Then signed immediate constant = imm
353  Return 0
Caller
NameDescribe
bpf_adj_branches