函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

函数名称:btf_distill_func_proto

函数原型:int btf_distill_func_proto(struct bpf_verifier_log *log, struct btf *btf, const struct btf_type *func, const char *tname, struct btf_func_model *m)

返回类型:int

参数:

类型参数名称
struct bpf_verifier_log *log
struct btf *btf
const struct btf_type *func
const char *tname
struct btf_func_model *m
4005  如果非func
4009 i小于5循环arg_size[i]等于8
4011  ret_size等于8
4012  nr_args等于5
4013  返回:0
4015  args等于func加1
4016  nargs等于btf_type_vlen(func)
4017  如果nargs大于等于The longest tracepoint has 12 args.* See include/trace/bpf_probe.h
4018  bpf_log(log, "The function %s has %d arguments. Too many.\n", tname, nargs)
4021  返回:负EINVAL
4023  ret等于__get_type_size(btf, type, & t)
4024  如果ret小于0则
4025  bpf_log(log, "The function %s return type %s is unsupported.\n", tname, 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)])
4028  返回:负EINVAL
4030  ret_size等于ret
4032 i小于nargs循环
4033  ret等于__get_type_size(btf, type, & t)
4034  如果ret小于0则
4038  返回:负EINVAL
4040  arg_size[i]等于ret
4042  nr_args等于nargs
4043  返回:0
调用者
名称描述
check_attach_btf_id