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:   Tue, 18 Oct 2022 09:26:30 -0700
From:   Alexei Starovoitov <alexei.starovoitov@...il.com>
To:     wangyufen <wangyufen@...wei.com>
Cc:     Martin KaFai Lau <martin.lau@...ux.dev>,
        Lina Wang <lina.wang@...iatek.com>, bpf <bpf@...r.kernel.org>,
        "David S. Miller" <davem@...emloft.net>,
        Eric Dumazet <edumazet@...gle.com>,
        Jakub Kicinski <kuba@...nel.org>,
        Paolo Abeni <pabeni@...hat.com>,
        Daniel Müller <deso@...teo.net>,
        Network Development <netdev@...r.kernel.org>
Subject: Re: [net 1/2] selftests/net: fix opening object file failed

On Tue, Oct 18, 2022 at 2:58 AM wangyufen <wangyufen@...wei.com> wrote:
>
>
> 在 2022/10/18 10:57, wangyufen 写道:
> >
> > 在 2022/10/13 9:51, Martin KaFai Lau 写道:
> >> On 10/11/22 2:57 AM, Wang Yufen wrote:
> >>> The program file used in the udpgro_frglist testcase is
> >>> "../bpf/nat6to4.o",
> >>> but the actual nat6to4.o file is in "bpf/" not "../bpf".
> >>> The following error occurs:
> >>>    Error opening object ../bpf/nat6to4.o: No such file or directory
> >>
> >> hmm... so it sounds like the test never works...
> >>
> >> The test seems like mostly exercising the tc-bpf?  It makes sense to
> >> move it to the selftests/bpf. or staying in net is also fine for now
> >> and only need to fix up the path here.
> >>
> >> However, if moving to selftests/bpf, I don't think it is a good idea
> >> to only move the bpf prog but not moving the actual test program (the
> >> script here) such that the bpf CI can continuously testing it.
> >> Otherwise, it will just drift and rot slowly like patch 2.
> >>
> >> Also, if you prefer to move it to selftests/bpf, the bpf prog cannot
> >> be moved in the current form.  eg. There is some convention on the
> >> SEC name in the selftests/bpf/progs.  Also, the testing script needs
> >> to be adapted to the selftests/bpf/test_progs infra.
> >
> > hmm... if moving to selftests/bpf, the actual test programs also needs
> > to move to selftests/bpf, e.g. udpgso_bench_*, in_netns.sh,
> > udpgso*.sh, which may not be a good idea.
> >
> > So, only fix up the path here.
> >
> > Also fix up the bpf/nat6to4.o compile error as following:
> >
> >     make -C tools/testing/selftests/net got the following err:
> >     bpf/nat6to4.c:43:10: fatal error: 'bpf/bpf_helpers.h' file not found
> >              ^~~~~~~~~~~~~~~~~~~
> >
> >
> After revert commit 7b92aa9e61350("selftests net: fix kselftest net
> fatal error"),
>
> make -C tools/testing/selftests got the following err:
>
> In file included from bpf/nat6to4.c:43:
> ../../../lib/bpf/bpf_helpers.h:11:10: fatal error: 'bpf_helper_defs.h'
> file not found
> #include "bpf_helper_defs.h"
>           ^~~~~~~~~~~~~~~~~~~
>
> "bpf_helper_defs.h"  is generated by libbpf;
>
>
> So, there are two possible approaches:  the first moving nat6to4.c and
> the actual test programs to selftests/bpf;
>
> second add make dependency on libbpf for the nat6to4.c.
>
> Which one is better?

Neither.
Martin already explained that the whole thing needs to move to selftests/bpf.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ