函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:kernel\bpf\cgroup.c Create Date:2022-07-27 14:47:31
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:sysctl_convert_ctx_access

函数原型:static u32 sysctl_convert_ctx_access(enum bpf_access_type type, const struct bpf_insn *si, struct bpf_insn *insn_buf, struct bpf_prog *prog, u32 *target_size)

返回类型:u32

参数:

类型参数名称
enum bpf_access_typetype
const struct bpf_insn *si
struct bpf_insn *insn_buf
struct bpf_prog *prog
u32 *target_size
1343  insn等于insn_buf
1347  : signed offset 恒等于offsetof(structbpf_sysctl, write)
1348  insn自加等于Memory load, dst_reg = *(uint *) (src_reg + off16) (ld/ldx fields ( opcode ), dest register , source register , bpf_target_off(structbpf_sysctl_kern, write, sizeof_field(TYPE, MEMBER)*@TYPE: The structure containing the field of interest*@MEMBER: The field to return the size of(structbpf_sysctl_kern, write), target_size))
1354  退出
1355  : signed offset 恒等于offsetof(structbpf_sysctl, file_pos)
1361  如果type恒等于BPF_WRITE
1362  treg等于BPF_REG_9
1364  如果 source register 恒等于treg dest register 恒等于tregtreg先自减
1366  如果 source register 恒等于treg dest register 恒等于tregtreg先自减
1382  否则
1393  target_size等于sizeof(u32)
1394  退出
1397  返回:insninsn_buf