Function report |
Source Code:kernel\bpf\btf.c |
Create Date:2022-07-28 13:19:55 |
| Last Modify:2020-03-12 14:18:49 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:btf_func_proto_check
Proto:static int btf_func_proto_check(struct btf_verifier_env *env, const struct btf_type *t)
Type:int
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct btf_verifier_env * | env | |
| const struct btf_type * | t |
| 2875 | nr_args = btf_type_vlen(t) |
| 2878 | If type Then |
| 2879 | ret_type_id = type |
| 2881 | ret_type = btf_type_by_id(btf, ret_type_id) |
| 2882 | If Not ret_type Then |
| 2883 | btf_verifier_log_type(env, t, "Invalid return type") |
| 2884 | Return -EINVAL |
| 2889 | err = btf_resolve(env, ret_type, ret_type_id) |
| 2895 | If Not btf_type_id_size(btf, & ret_type_id, NULL) Then |
| 2896 | btf_verifier_log_type(env, t, "Invalid return type") |
| 2897 | Return -EINVAL |
| 2901 | If Not nr_args Then Return 0 |
| 2905 | If Not type Then |
| 2906 | If name_off Then |
| 2907 | btf_verifier_log_type(env, t, "Invalid arg#%u", nr_args) |
| 2909 | Return -EINVAL |
| 2911 | nr_args-- |
| 2914 | err = 0 |
| 2919 | arg_type_id = type |
| 2920 | arg_type = btf_type_by_id(btf, arg_type_id) |
| 2921 | If Not arg_type Then |
| 2927 | If name_off && ( Not btf_name_offset_valid(btf, name_off) || Not Only C-style identifier is permitted. This can be relaxed if* necessary. ) Then |
| 2938 | err = btf_resolve(env, arg_type, arg_type_id) |
| 2939 | If err Then Break |
| 2943 | If Not btf_type_id_size(btf, & arg_type_id, NULL) Then |
| 2950 | Return err |
| Name | Describe |
|---|---|
| btf_check_all_types |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |