函数逻辑报告 |
Source Code:kernel\bpf\btf.c |
Create Date:2022-07-27 14:38:44 |
Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
首页 | 函数Tree |
注解内核,赢得工具 | 下载SCCT | English |
函数名称:btf_ctx_access
函数原型:bool btf_ctx_access(int off, int size, enum bpf_access_type type, const struct bpf_prog *prog, struct bpf_insn_access_aux *info)
返回类型:bool
参数:
类型 | 参数 | 名称 |
---|---|---|
int | off | |
int | size | |
enum bpf_access_type | type | |
const struct bpf_prog * | prog | |
struct bpf_insn_access_aux * | info |
3637 | tgt_prog等于linked_prog |
3638 | btf等于bpf_prog_get_target_btf(prog) |
3640 | log等于r verbose logs |
3645 | 如果off取模8则 |
3653 | nr_args等于如果t则btf_type_vlen(t)否则5 |
3654 | 如果 true if attaching to BTF-enabled raw tp 则 |
3660 | 如果 For some prog types 恒等于BPF_TRACE_FEXIT且arg恒等于nr_args则 |
3662 | 如果非t则返回:true |
3666 | t等于btf_type_by_id(btf, type) |
3671 | 否则 |
3672 | 如果非t则返回:true |
3675 | t等于btf_type_by_id(btf, type) |
3678 | 当btf_type_is_modifier(t)循环 |
3679 | t等于btf_type_by_id(btf, type) |
3680 | 如果btf_type_is_int(t)则返回:true |
3683 | 如果非btf_type_is_ptr(t)则 |
3684 | bpf_log(log, "func '%s' arg%d '%s' has type %s. Only pointer access is allowed\n", tname, arg, __btf_name_by_offset(btf, name_off), btf_kind_str[BTF_INFO_KIND( "info" bits arrangement * bits 0-15: vlen (e.g. # of struct's members) * bits 16-23: unused * bits 24-27: kind (e.g. int, ptr, array...etc) * bits 28-30: unused * bit 31: kind_flag, currently used by * struct, union and fwd)]) |
3689 | 返回:false |
3691 | 如果type恒等于0则返回:true |
3702 | 如果tgt_prog则 |
3703 | ret等于btf_translate_to_vmlinux(log, btf, t, Type of BPF program ) |
3704 | 如果ret大于0则 |
3707 | 否则 |
3708 | 返回:false |
3711 | t等于btf_type_by_id(btf, type) |
3713 | 当btf_type_is_modifier(t)循环 |
3714 | t等于btf_type_by_id(btf, type) |
3719 | 返回:false |
3724 | 返回:true |
名称 | 描述 |
---|---|
tracing_prog_is_valid_access |
源代码转换工具 开放的插件接口 | X |
---|---|
支持:c/c++/esqlc/java Oracle/Informix/Mysql 插件可实现:逻辑报告 代码生成和批量转换代码 |