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:   Thu, 17 Nov 2022 09:59:52 +0800
From:   wangyufen <wangyufen@...wei.com>
To:     Saeed Mahameed <saeed@...nel.org>
CC:     <netdev@...r.kernel.org>, <bpf@...r.kernel.org>,
        <davem@...emloft.net>, <edumazet@...gle.com>, <kuba@...nel.org>,
        <pabeni@...hat.com>, <shuah@...nel.org>, <andrii@...nel.org>,
        <mykolal@...com>, <ast@...nel.org>, <daniel@...earbox.net>,
        <martin.lau@...ux.dev>
Subject: Re: [PATCH v2 2/2] selftests/net: fix opening object file failed



在 2022/11/17 6:08, Saeed Mahameed 写道:
> On 15 Nov 18:23, 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
>>  Cannot initialize ELF context!
>>  Unable to load program
>>
>> In addition, all the kernel bpf source files are centred under the
>> subdir "progs" after commit bd4aed0ee73c ("selftests: bpf: centre
>> kernel bpf objects under new subdir "progs""). So mv nat6to4.c to
>                                                    ^^ move :)
got it :)

>> "../bpf/progs" and use "../bpf/nat6to4.bpf.o". And also move the
>> test program to selftests/bpf.
>>
> 
> Can you separate the fix from the mv ?
got it, will change in v3

> 
>> Fixes: edae34a3ed92 ("selftests net: add UDP GRO fraglist + bpf 
>> self-tests")
>> Signed-off-by: Wang Yufen <wangyufen@...wei.com>
>> ---
>> tools/testing/selftests/bpf/Makefile               |   7 +-
>> tools/testing/selftests/bpf/in_netns.sh            |  23 +
>> .../testing/selftests/bpf/progs/nat6to4_egress4.c  | 184 ++++++
>> .../testing/selftests/bpf/progs/nat6to4_ingress6.c | 149 +++++
>> tools/testing/selftests/bpf/test_udpgro_frglist.sh | 110 ++++
>> tools/testing/selftests/bpf/udpgso_bench_rx.c      | 409 ++++++++++++
>> tools/testing/selftests/bpf/udpgso_bench_tx.c      | 712 
>> +++++++++++++++++++++
>> tools/testing/selftests/net/Makefile               |   2 -
>> tools/testing/selftests/net/bpf/Makefile           |  14 -
>> tools/testing/selftests/net/bpf/nat6to4.c          | 285 ---------
>> tools/testing/selftests/net/udpgro_frglist.sh      | 103 ---
>> 11 files changed, 1592 insertions(+), 406 deletions(-)
>> create mode 100755 tools/testing/selftests/bpf/in_netns.sh
>> create mode 100644 tools/testing/selftests/bpf/progs/nat6to4_egress4.c
>> create mode 100644 tools/testing/selftests/bpf/progs/nat6to4_ingress6.c
>> create mode 100755 tools/testing/selftests/bpf/test_udpgro_frglist.sh
>> create mode 100644 tools/testing/selftests/bpf/udpgso_bench_rx.c
>> create mode 100644 tools/testing/selftests/bpf/udpgso_bench_tx.c
>> delete mode 100644 tools/testing/selftests/net/bpf/Makefile
>> delete mode 100644 tools/testing/selftests/net/bpf/nat6to4.c
>> delete mode 100755 tools/testing/selftests/net/udpgro_frglist.sh
>>
> 
> created more files than deleted? also moving files should appear as
> rename. Did you do the mv with git mv ? I am surprised how git didn't 
> pick this up
> as "rename".
in_netns.sh,udpgso_bench_rx.c and udpgso_bench_tx.c also used by other 
tests of selftests/net, so create new copy here.
The two progs of nat6to4.c are separately defined in nat6to4_ingress6.c 
and nat6to4_egress4.c files. SEC("schedcls/ingress6/nat_6") and 
SEC("schedcls/egress4/snat4") are defined as SEC ("tc").
I will separate the fix from the mv in v3
> 
> For next version please use tag [PATCH bpf-next]
got it.
Thanks.


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ