Re: [PATCH v2 0/4] Fix unsafe BPF_PROG_TEST_RUN interface

2018-11-20 Thread Y Song
On Tue, Nov 20, 2018 at 7:43 AM Lorenz Bauer wrote: > > Right now, there is no safe way to use BPF_PROG_TEST_RUN with data_out. > This is because bpf_test_finish copies the output buffer to user space > without checking its size. This can lead to the kernel overwriting > data in user space after t

[PATCH v2 0/4] Fix unsafe BPF_PROG_TEST_RUN interface

2018-11-20 Thread Lorenz Bauer
Right now, there is no safe way to use BPF_PROG_TEST_RUN with data_out. This is because bpf_test_finish copies the output buffer to user space without checking its size. This can lead to the kernel overwriting data in user space after the buffer if xdp_adjust_head and friends are in play. Changes