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] [day] [month] [year] [list]
Message-ID: <CAEf4Bza1qPfKjmbhLwZzBtGvg19Q3vps3-F6-nfvQb9vLhg-hA@mail.gmail.com>
Date:   Thu, 24 Sep 2020 10:42:29 -0700
From:   Andrii Nakryiko <andrii.nakryiko@...il.com>
To:     Alexei Starovoitov <alexei.starovoitov@...il.com>
Cc:     Andrii Nakryiko <andriin@...com>, bpf <bpf@...r.kernel.org>,
        Network Development <netdev@...r.kernel.org>,
        Alexei Starovoitov <ast@...com>,
        Daniel Borkmann <daniel@...earbox.net>,
        Kernel Team <kernel-team@...com>,
        Nikita Shirokov <tehnerd@...nerd.com>,
        Udip Pant <udippant@...com>
Subject: Re: [PATCH bpf] libbpf: fix XDP program load regression for old kernels

On Thu, Sep 24, 2020 at 10:34 AM Alexei Starovoitov
<alexei.starovoitov@...il.com> wrote:
>
> On Thu, Sep 24, 2020 at 10:18 AM Andrii Nakryiko <andriin@...com> wrote:
> >
> > Fix regression in libbpf, introduced by XDP link change, which causes XDP
> > programs to fail to be loaded into kernel due to specified BPF_XDP
> > expected_attach_type. While kernel doesn't enforce expected_attach_type for
> > BPF_PROG_TYPE_XDP, some old kernels already support XDP program, but they
> > don't yet recognize expected_attach_type field in bpf_attr, so setting it to
> > non-zero value causes program load to fail.
> >
> > Luckily, libbpf already has a mechanism to deal with such cases, so just make
> > expected_attach_type optional for XDP programs.
> >
> > Reported-by: Nikita Shirokov <tehnerd@...nerd.com>
> > Reported-by: Udip Pant <udippant@...com>
> > Fixes: dc8698cac7aa ("libbpf: Add support for BPF XDP link")
> > Signed-off-by: Andrii Nakryiko <andriin@...com>
>
> Applied. Thanks

Thanks!

>
> Looks like libbpf CI needs to add a few old kernels.

Yeah. We have 4.9 which is very old and only a few selftests can even
succeed there. Then we jump to 5.5, which is too recent to detect this
issue. This issue happened on 4.15, would that be a good version to
stick to? Any opinions?

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ