diff options
author | Andrii Nakryiko <andrii@kernel.org> | 2023-12-04 15:39:21 -0800 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2023-12-11 19:23:32 -0800 |
commit | 1a1ad782dcbbacd9e8d4e2e7ff1bf14d1db80727 (patch) | |
tree | 2ef700bf4b474dc18dec4fcb804892f6b0887edd /tools/testing/selftests/bpf/prog_tests/fs_kfuncs.c | |
parent | 22b769bb4f87060774bfdd6facbab438ed3b8453 (diff) |
bpf: tidy up exception callback management a bit
Use the fact that we are passing subprog index around and have
a corresponding struct bpf_subprog_info in bpf_verifier_env for each
subprogram. We don't need to separately pass around a flag whether
subprog is exception callback or not, each relevant verifier function
can determine this using provided subprog index if we maintain
bpf_subprog_info properly.
Also move out exception callback-specific logic from
btf_prepare_func_args(), keeping it generic. We can enforce all these
restriction right before exception callback verification pass. We add
out parameter, arg_cnt, for now, but this will be unnecessary with
subsequent refactoring and will be removed.
Signed-off-by: Andrii Nakryiko <andrii@kernel.org>
Acked-by: Eduard Zingerman <eddyz87@gmail.com>
Link: https://lore.kernel.org/r/20231204233931.49758-4-andrii@kernel.org
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/bpf/prog_tests/fs_kfuncs.c')
0 files changed, 0 insertions, 0 deletions