Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:bpf_adj_branches

Proto:static int bpf_adj_branches(struct bpf_prog *prog, u32 pos, s32 end_old, s32 end_new, const bool probe_pass)

Type:int

Parameter:

TypeParameterName
struct bpf_prog *prog
u32pos
s32end_old
s32end_new
const boolprobe_pass
377  insn_cnt = Number of filter blocks + If probe_pass Then end_new - end_old Else 0
378  insn = insnsi
379  ret = 0
381  When i < insn_cnt cycle
388  If probe_pass && i == pos Then
389  i = end_new
390  insn = insnsi + end_old
392  code = opcode
393  If Instruction classes (code) != BPF_JMP && Instruction classes (code) != jmp mode in word width || alu/jmp fields (code) == unction return Then Continue
403  Else
407  If ret Then Break
411  Return ret
Caller
NameDescribe
bpf_patch_insn_single
bpf_remove_insns