Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:btf_distill_func_proto

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)

Type:int

Parameter:

TypeParameterName
struct bpf_verifier_log *log
struct btf *btf
const struct btf_type *func
const char *tname
struct btf_func_model *m
4005  If Not func Then
4009  When i < 5 cycle arg_size[i] = 8
4011  ret_size = 8
4012  nr_args = 5
4013  Return 0
4015  args = func + 1
4016  nargs = btf_type_vlen(func)
4017  If nargs >= The longest tracepoint has 12 args.* See include/trace/bpf_probe.h Then
4018  bpf_log(log, "The function %s has %d arguments. Too many.\n", tname, nargs)
4021  Return -EINVAL
4023  ret = __get_type_size(btf, type, & t)
4024  If ret < 0 Then
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  Return -EINVAL
4030  ret_size = ret
4032  When i < nargs cycle
4033  ret = __get_type_size(btf, type, & t)
4034  If ret < 0 Then
4038  Return -EINVAL
4040  arg_size[i] = ret
4042  nr_args = nargs
4043  Return 0
Caller
NameDescribe
check_attach_btf_id