diff options
author | Alexei Starovoitov <ast@kernel.org> | 2020-09-25 13:58:02 -0700 |
---|---|---|
committer | Alexei Starovoitov <ast@kernel.org> | 2020-09-25 14:16:35 -0700 |
commit | 84085f877295b6b12d95262ec4082447214b09be (patch) | |
tree | b37f9459a76aaaca81d41c0ce6ecd4bf9597a980 /tools/testing/selftests/size | |
parent | 182bf3f3ddb607a0715b73a8396af1fce0945c14 (diff) | |
parent | 9a856cae2217ca1bc0726417d32f3f1daf035389 (diff) |
Merge branch 'enable-bpf_skc-cast-for-networking-progs'
Martin KaFai Lau says:
====================
This set allows networking prog type to directly read fields from
the in-kernel socket type, e.g. "struct tcp_sock".
Patch 2 has the details on the use case.
v3:
- Pass arg_btf_id instead of fn into check_reg_type() in Patch 1 (Lorenz)
- Move arg_btf_id from func_proto to struct bpf_reg_types in Patch 2 (Lorenz)
- Remove test_sock_fields from .gitignore in Patch 8 (Andrii)
- Add tests to have better coverage on the modified helpers (Alexei)
Patch 13 is added.
- Use "void *sk" as the helper argument in UAPI bpf.h
v3:
- ARG_PTR_TO_SOCK_COMMON_OR_NULL was attempted in v2. The _OR_NULL was
needed because the PTR_TO_BTF_ID could be NULL but note that a could be NULL
PTR_TO_BTF_ID is not a scalar NULL to the verifier. "_OR_NULL" implicitly
gives an expectation that the helper can take a scalar NULL which does
not make sense in most (except one) helpers. Passing scalar NULL
should be rejected at the verification time.
Thus, this patch uses ARG_PTR_TO_BTF_ID_SOCK_COMMON to specify that the
helper can take both the btf-id ptr or the legacy PTR_TO_SOCK_COMMON but
not scalar NULL. It requires the func_proto to explicitly specify the
arg_btf_id such that there is a very clear expectation that the helper
can handle a NULL PTR_TO_BTF_ID.
v2:
- Add ARG_PTR_TO_SOCK_COMMON_OR_NULL (Lorenz)
====================
Signed-off-by: Alexei Starovoitov <ast@kernel.org>
Diffstat (limited to 'tools/testing/selftests/size')
0 files changed, 0 insertions, 0 deletions