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]
Message-ID: <ba71e22a-cf59-b2bd-50c0-d0c9fb3f4e08@iogearbox.net>
Date:   Thu, 10 Mar 2022 23:08:40 +0100
From:   Daniel Borkmann <daniel@...earbox.net>
To:     Guo Zhengkui <guozhengkui@...o.com>, Shuah Khan <shuah@...nel.org>,
        Alexei Starovoitov <ast@...nel.org>,
        Andrii Nakryiko <andrii@...nel.org>,
        Martin KaFai Lau <kafai@...com>,
        Song Liu <songliubraving@...com>, Yonghong Song <yhs@...com>,
        John Fastabend <john.fastabend@...il.com>,
        KP Singh <kpsingh@...nel.org>,
        Yucong Sun <sunyucong@...il.com>,
        Dave Marchevsky <davemarchevsky@...com>,
        Christy Lee <christylee@...com>,
        Toke Høiland-Jørgensen <toke@...hat.com>,
        Delyan Kratunov <delyank@...com>,
        "open list:KERNEL SELFTEST FRAMEWORK" 
        <linux-kselftest@...r.kernel.org>,
        "open list:BPF (Safe dynamic programs and tools)" 
        <netdev@...r.kernel.org>,
        "open list:BPF (Safe dynamic programs and tools)" 
        <bpf@...r.kernel.org>, open list <linux-kernel@...r.kernel.org>
Cc:     zhengkui_guo@...look.com
Subject: Re: [PATCH v2] selftests/bpf: fix array_size.cocci warning

On 3/9/22 4:35 AM, Guo Zhengkui wrote:
> Fix the array_size.cocci warning in tools/testing/selftests/bpf/
> 
> Use `ARRAY_SIZE(arr)` in bpf_util.h instead of forms like
> `sizeof(arr)/sizeof(arr[0])`.
> 
> Signed-off-by: Guo Zhengkui <guozhengkui@...o.com>

BPF CI fails with:

https://github.com/kernel-patches/bpf/runs/5498238267?check_suite_focus=true

   pahole: Multithreading requires elfutils >= 0.178. Continuing with a single thread...
   In file included from progs/test_rdonly_maps.c:7:
   /tmp/runner/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:130:8: error: redefinition of 'bpf_map_def'
   struct bpf_map_def {
          ^
   /tmp/runner/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/bpf/libbpf.h:685:8: note: previous definition is here
   struct bpf_map_def {
          ^
   In file included from progs/test_rdonly_maps.c:7:
   /tmp/runner/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:138:6: error: redefinition of 'libbpf_pin_type'
   enum libbpf_pin_type {
        ^
   /tmp/runner/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/bpf/libbpf.h:191:6: note: previous definition is here
   enum libbpf_pin_type {
        ^
   In file included from progs/test_rdonly_maps.c:7:
   /tmp/runner/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:139:2: error: redefinition of enumerator 'LIBBPF_PIN_NONE'
           LIBBPF_PIN_NONE,
           ^
   /tmp/runner/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/bpf/libbpf.h:192:2: note: previous definition is here
           LIBBPF_PIN_NONE,
           ^
   In file included from progs/test_rdonly_maps.c:7:
   /tmp/runner/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:141:2: error: redefinition of enumerator 'LIBBPF_PIN_BY_NAME'
           LIBBPF_PIN_BY_NAME,
           ^
   /tmp/runner/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/bpf/libbpf.h:194:2: note: previous definition is here
           LIBBPF_PIN_BY_NAME,
           ^
   In file included from progs/test_rdonly_maps.c:7:
   /tmp/runner/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:144:6: error: redefinition of 'libbpf_tristate'
   enum libbpf_tristate {
        ^
   /tmp/runner/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/bpf/libbpf.h:1304:6: note: previous definition is here
   enum libbpf_tristate {
        ^
   In file included from progs/test_rdonly_maps.c:7:
   /tmp/runner/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:145:2: error: redefinition of enumerator 'TRI_NO'
           TRI_NO = 0,
           ^
   /tmp/runner/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/bpf/libbpf.h:1305:2: note: previous definition is here
           TRI_NO = 0,
           ^
   In file included from progs/test_rdonly_maps.c:7:
   /tmp/runner/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:146:2: error: redefinition of enumerator 'TRI_YES'
           TRI_YES = 1,
           ^
   /tmp/runner/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/bpf/libbpf.h:1306:2: note: previous definition is here
           TRI_YES = 1,
           ^
   In file included from progs/test_rdonly_maps.c:7:
   /tmp/runner/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/bpf/bpf_helpers.h:147:2: error: redefinition of enumerator 'TRI_MODULE'
           TRI_MODULE = 2,
           ^
   /tmp/runner/work/bpf/bpf/tools/testing/selftests/bpf/tools/include/bpf/libbpf.h:1307:2: note: previous definition is here
           TRI_MODULE = 2,
           ^
   8 errors generated.
   make: *** [Makefile:488: /tmp/runner/work/bpf/bpf/tools/testing/selftests/bpf/test_rdonly_maps.o] Error 1
   make: *** Waiting for unfinished jobs....
   Error: Process completed with exit code 2.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ