mbox series

[bpf-next,0/3] bpf: support input xdp_md context in BPF_PROG_TEST_RUN

Message ID 20210524220555.251473-1-zeffron@riotgames.com (mailing list archive)
Headers show
Series bpf: support input xdp_md context in BPF_PROG_TEST_RUN | expand

Message

Zvi Effron May 24, 2021, 10:05 p.m. UTC
This patchset add support for passing a xdp_md via ctx_in/ctx_out in bpf_attr
for BPF_PROG_TEST_RUN of XDP programs.

Patch 1 adds initial support for passing XDP meta data in addition to packet
data.

Patch 2 adds support for also specifying the ingress interface and rx queue.

Patch 3 adds selftests to ensure functionality is correct.

Zvi Effron (3):
  bpf: support input xdp_md context in BPF_PROG_TEST_RUN
  bpf: support specifying ingress via xdp_md context in
    BPF_PROG_TEST_RUN
  selftests/bpf: Add test for xdp_md context in BPF_PROG_TEST_RUN

 include/uapi/linux/bpf.h                      |   3 -
 net/bpf/test_run.c                            |  92 +++++++++++++-
 .../bpf/prog_tests/xdp_context_test_run.c     | 117 ++++++++++++++++++
 .../bpf/progs/test_xdp_context_test_run.c     |  22 ++++
 4 files changed, 225 insertions(+), 9 deletions(-)
 create mode 100644 tools/testing/selftests/bpf/prog_tests/xdp_context_test_run.c
 create mode 100644 tools/testing/selftests/bpf/progs/test_xdp_context_test_run.c


base-commit: f9bceaa59c5c47a8a08f48e19cbe887e500a1978

Comments

Daniel Borkmann May 26, 2021, 12:40 p.m. UTC | #1
On 5/25/21 12:05 AM, Zvi Effron wrote:
> This patchset add support for passing a xdp_md via ctx_in/ctx_out in bpf_attr
> for BPF_PROG_TEST_RUN of XDP programs.
> 
> Patch 1 adds initial support for passing XDP meta data in addition to packet
> data.
> 
> Patch 2 adds support for also specifying the ingress interface and rx queue.
> 
> Patch 3 adds selftests to ensure functionality is correct.
> 
> Zvi Effron (3):
>    bpf: support input xdp_md context in BPF_PROG_TEST_RUN
>    bpf: support specifying ingress via xdp_md context in
>      BPF_PROG_TEST_RUN
>    selftests/bpf: Add test for xdp_md context in BPF_PROG_TEST_RUN

Looks like this series is consistently causing a NULL pointer deref in the BPF CI:

   - https://travis-ci.com/github/kernel-patches/bpf/builds/226936809
   - https://travis-ci.com/github/kernel-patches/bpf/builds/226909818

Other runs on top of latest bpf-next are fine though:

   - https://travis-ci.com/github/kernel-patches/bpf/builds/226936786

Please double check your series again and fix.

Thanks,
Daniel