diff options
Diffstat (limited to 'include/linux/btf.h')
| -rw-r--r-- | include/linux/btf.h | 18 | 
1 files changed, 11 insertions, 7 deletions
| diff --git a/include/linux/btf.h b/include/linux/btf.h index 508199e38415..cac9f304e27a 100644 --- a/include/linux/btf.h +++ b/include/linux/btf.h @@ -98,10 +98,14 @@ struct btf_type;  union bpf_attr;  struct btf_show;  struct btf_id_set; +struct bpf_prog; + +typedef int (*btf_kfunc_filter_t)(const struct bpf_prog *prog, u32 kfunc_id);  struct btf_kfunc_id_set {  	struct module *owner;  	struct btf_id_set8 *set; +	btf_kfunc_filter_t filter;  };  struct btf_id_dtor_kfunc { @@ -479,7 +483,6 @@ static inline void *btf_id_set8_contains(const struct btf_id_set8 *set, u32 id)  	return bsearch(&id, set->pairs, set->cnt, sizeof(set->pairs[0]), btf_id_cmp_func);  } -struct bpf_prog;  struct bpf_verifier_log;  #ifdef CONFIG_BPF_SYSCALL @@ -487,10 +490,10 @@ const struct btf_type *btf_type_by_id(const struct btf *btf, u32 type_id);  const char *btf_name_by_offset(const struct btf *btf, u32 offset);  struct btf *btf_parse_vmlinux(void);  struct btf *bpf_prog_get_target_btf(const struct bpf_prog *prog); -u32 *btf_kfunc_id_set_contains(const struct btf *btf, -			       enum bpf_prog_type prog_type, -			       u32 kfunc_btf_id); -u32 *btf_kfunc_is_modify_return(const struct btf *btf, u32 kfunc_btf_id); +u32 *btf_kfunc_id_set_contains(const struct btf *btf, u32 kfunc_btf_id, +			       const struct bpf_prog *prog); +u32 *btf_kfunc_is_modify_return(const struct btf *btf, u32 kfunc_btf_id, +				const struct bpf_prog *prog);  int register_btf_kfunc_id_set(enum bpf_prog_type prog_type,  			      const struct btf_kfunc_id_set *s);  int register_btf_fmodret_id_set(const struct btf_kfunc_id_set *kset); @@ -517,8 +520,9 @@ static inline const char *btf_name_by_offset(const struct btf *btf,  	return NULL;  }  static inline u32 *btf_kfunc_id_set_contains(const struct btf *btf, -					     enum bpf_prog_type prog_type, -					     u32 kfunc_btf_id) +					     u32 kfunc_btf_id, +					     struct bpf_prog *prog) +  {  	return NULL;  } |