Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:sysctl_convert_ctx_access

Proto: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)

Type:u32

Parameter:

TypeParameterName
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  Case 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  Break
1355  Case signed offset == offsetof(structbpf_sysctl, file_pos)
1361  If type == BPF_WRITE Then
1362  treg = BPF_REG_9
1382  Else
1393  target_size = sizeof(u32)
1394  Break
1397  Return insn - insn_buf