lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Mon, 16 Jan 2023 14:35:54 +0100
From:   Toke Høiland-Jørgensen <toke@...nel.org>
To:     "Daniel T. Lee" <danieltimlee@...il.com>,
        Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc:     Daniel Borkmann <daniel@...earbox.net>,
        Alexei Starovoitov <ast@...nel.org>,
        Andrii Nakryiko <andrii.nakryiko@...il.com>,
        Yonghong Song <yhs@...com>,
        Martin KaFai Lau <martin.lau@...ux.dev>,
        Song Liu <song@...nel.org>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        Stanislav Fomichev <sdf@...gle.com>,
        Hao Luo <haoluo@...gle.com>, Jiri Olsa <jolsa@...nel.org>,
        Andrii Nakryiko <andrii@...nel.org>, bpf <bpf@...r.kernel.org>,
        Network Development <netdev@...r.kernel.org>
Subject: Re: [bpf-next 00/10] samples/bpf: modernize BPF functionality test
 programs

"Daniel T. Lee" <danieltimlee@...il.com> writes:

> On Mon, Jan 16, 2023 at 6:38 AM Alexei Starovoitov
> <alexei.starovoitov@...il.com> wrote:
>>
>> On Sat, Jan 14, 2023 at 11:16 PM Daniel T. Lee <danieltimlee@...il.com> wrote:
>> >
>> > Currently, there are many programs under samples/bpf to test the
>> > various functionality of BPF that have been developed for a long time.
>> > However, the kernel (BPF) has changed a lot compared to the 2016 when
>> > some of these test programs were first introduced.
>> >
>> > Therefore, some of these programs use the deprecated function of BPF,
>> > and some programs no longer work normally due to changes in the API.
>> >
>> > To list some of the kernel changes that this patch set is focusing on,
>> > - legacy BPF map declaration syntax support had been dropped [1]
>> > - bpf_trace_printk() always append newline at the end [2]
>> > - deprecated styled BPF section header (bpf_load style) [3]
>> > - urandom_read tracepoint is removed (used for testing overhead) [4]
>> > - ping sends packet with SOCK_DGRAM instead of SOCK_RAW [5]*
>> > - use "vmlinux.h" instead of including individual headers
>> >
>> > In addition to this, this patchset tries to modernize the existing
>> > testing scripts a bit. And for network-related testing programs,
>> > a separate header file was created and applied. (To use the
>> > Endianness conversion function from xdp_sample and bunch of constants)
>>
>> Nice set of cleanups. Applied.
>> As a follow up could you convert some of them to proper selftests/bpf ?
>> Unfortunately samples/bpf will keep bit rotting despite your herculean efforts.
>
> I really appreciate for your compliment!
> I'll try to convert the existing sample to selftest in the next patch.

Maybe this is a good time to mention that we recently ported some of the
XDP utilities from samples/bpf to xdp-tools, in the form of the
'xdp-bench' utility:
https://github.com/xdp-project/xdp-tools/tree/master/xdp-bench

It's basically a combination of all the xdp_redirect* samples, but also
includes the functionality from the xdp_rxq_info sample program (i.e.,
the ability to monitor RXQs and use other return codes).

I'm planning to submit a patch to remove those utilities from
samples/bpf after we tag the next release of xdp-tools (have one or two
outstanding issues to clear before we do that), but wanted to give you a
head's up so you don't spend any time on those particular utilities when
you're cleaning up samples :)

-Toke

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ