diff options
author | Daniel Borkmann <daniel@iogearbox.net> | 2020-01-10 17:20:07 +0100 |
---|---|---|
committer | Daniel Borkmann <daniel@iogearbox.net> | 2020-01-10 17:20:19 +0100 |
commit | 7a2d070f91db83a1e08bf212e8f6a34d852efb7f (patch) | |
tree | 29f80d80eff2526f251e5def34a8b7eb870b0504 /include/linux/bpf.h | |
parent | f41aa387a7896c193b384c5fb531cd2cb9e00128 (diff) | |
parent | 360301a6c21be87fe881546bd5f22eccf7a165c5 (diff) | |
download | kernel_replicant_linux-7a2d070f91db83a1e08bf212e8f6a34d852efb7f.tar.gz kernel_replicant_linux-7a2d070f91db83a1e08bf212e8f6a34d852efb7f.tar.bz2 kernel_replicant_linux-7a2d070f91db83a1e08bf212e8f6a34d852efb7f.zip |
Merge branch 'bpf-global-funcs'
Alexei Starovoitov says:
====================
Introduce static vs global functions and function by function verification.
This is another step toward dynamic re-linking (or replacement) of global
functions. See patch 2 for details.
v2->v3:
- cleaned up a check spotted by Song.
- rebased and dropped patch 2 that was trying to improve BTF based on ELF.
- added one more unit test for scalar return value from global func.
v1->v2:
- addressed review comments from Song, Andrii, Yonghong
- fixed memory leak in error path
- added modified ctx check
- added more tests in patch 7
====================
Signed-off-by: Daniel Borkmann <daniel@iogearbox.net>
Diffstat (limited to 'include/linux/bpf.h')
-rw-r--r-- | include/linux/bpf.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/bpf.h b/include/linux/bpf.h index a7bfe8a388c6..aed2bc39d72b 100644 --- a/include/linux/bpf.h +++ b/include/linux/bpf.h @@ -566,6 +566,7 @@ static inline void bpf_dispatcher_change_prog(struct bpf_dispatcher *d, #endif struct bpf_func_info_aux { + u16 linkage; bool unreliable; }; @@ -1081,7 +1082,11 @@ int btf_distill_func_proto(struct bpf_verifier_log *log, const char *func_name, struct btf_func_model *m); -int btf_check_func_arg_match(struct bpf_verifier_env *env, int subprog); +struct bpf_reg_state; +int btf_check_func_arg_match(struct bpf_verifier_env *env, int subprog, + struct bpf_reg_state *regs); +int btf_prepare_func_args(struct bpf_verifier_env *env, int subprog, + struct bpf_reg_state *reg); struct bpf_prog *bpf_prog_by_id(u32 id); |