Re: [PATCH v4 bpf-next 13/13] bpf: selftest: Add test_btf_skc_cls_ingress

2020-09-25 Thread Martin KaFai Lau
On Fri, Sep 25, 2020 at 09:24:02AM -0700, John Fastabend wrote: [ ... ] > Hi Martin, > > One piece I'm missing is how does this handle null pointer dereferences > from network side when reading BTF objects? I've not got through all the > code yet so maybe I'm just not there yet. > > For example,

RE: [PATCH v4 bpf-next 13/13] bpf: selftest: Add test_btf_skc_cls_ingress

2020-09-25 Thread John Fastabend
Martin KaFai Lau wrote: > This patch attaches a classifier prog to the ingress filter. > It exercises the following helpers with different socket pointer > types in different logical branches: > 1. bpf_sk_release() > 2. bpf_sk_assign() > 3. bpf_skc_to_tcp_request_sock(), bpf_skc_to_tcp_sock() > 4.

[PATCH v4 bpf-next 13/13] bpf: selftest: Add test_btf_skc_cls_ingress

2020-09-24 Thread Martin KaFai Lau
This patch attaches a classifier prog to the ingress filter. It exercises the following helpers with different socket pointer types in different logical branches: 1. bpf_sk_release() 2. bpf_sk_assign() 3. bpf_skc_to_tcp_request_sock(), bpf_skc_to_tcp_sock() 4. bpf_tcp_gen_syncookie, bpf_tcp_check_s