seccomp_ret_trace_x0_bypass.c:58:28: error: array type has incomplete element type 'struct sock_filter'

kernel test robot <[email protected]>
Newsgroups dev.linux.lists.oe-kbuild
Message-ID <[email protected]>
:::::: 
:::::: Manual check reason: "low confidence bisect report"
:::::: 

BCC: [email protected]
CC: [email protected]
TO: Jinjie Ruan <[email protected]>
CC: 0day robot <[email protected]>

tree:   https://github.com/intel-lab-lkp/linux/commits/Jinjie-Ruan/kselftest-arm64-Add-seccomp-ptrace-x0-bypass-test/20260813-111613
head:   d4a8c9b264683748947dd76ad85fa460ff2eb070
commit: d4a8c9b264683748947dd76ad85fa460ff2eb070 kselftest/arm64: Add SECCOMP_RET_TRACE x0 bypass test
date:   3 days ago
:::::: branch date: 3 days ago
:::::: commit date: 3 days ago
config: arm64-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20260816/[email protected]/config)
compiler: aarch64-linux-gnu-gcc (Debian 14.2.0-19) 14.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260816/[email protected]/reproduce)

If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <[email protected]>
| Closes: https://lore.kernel.org/r/[email protected]/

All errors (new ones prefixed by >>):

   seccomp_ret_trace_x0_bypass.c: In function 'do_child':
>> seccomp_ret_trace_x0_bypass.c:58:28: error: array type has incomplete element type 'struct sock_filter'
      58 |         struct sock_filter filter[] = {
         |                            ^~~~~~
>> seccomp_ret_trace_x0_bypass.c:59:17: error: implicit declaration of function 'BPF_STMT'; did you mean 'BPF_STX'? [-Wimplicit-function-declaration]
      59 |                 BPF_STMT(BPF_LD | BPF_W | BPF_ABS, 0),                  /* syscall nr */
         |                 ^~~~~~~~
         |                 BPF_STX
>> seccomp_ret_trace_x0_bypass.c:60:17: error: implicit declaration of function 'BPF_JUMP'; did you mean 'BPF_JMP'? [-Wimplicit-function-declaration]
      60 |                 BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, __NR_write, 0, 1),
         |                 ^~~~~~~~
         |                 BPF_JMP
>> seccomp_ret_trace_x0_bypass.c:64:16: error: variable 'prog' has initializer but incomplete type
      64 |         struct sock_fprog prog = {
         |                ^~~~~~~~~~
>> seccomp_ret_trace_x0_bypass.c:65:18: error: 'struct sock_fprog' has no member named 'len'
      65 |                 .len = ARRAY_SIZE(filter),
         |                  ^~~
   In file included from seccomp_ret_trace_x0_bypass.c:31:
   tools/testing/selftests/kselftest.h:64:25: warning: excess elements in struct initializer
      64 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
         |                         ^
   seccomp_ret_trace_x0_bypass.c:65:24: note: in expansion of macro 'ARRAY_SIZE'
      65 |                 .len = ARRAY_SIZE(filter),
         |                        ^~~~~~~~~~
   tools/testing/selftests/kselftest.h:64:25: note: (near initialization for 'prog')
      64 | #define ARRAY_SIZE(arr) (sizeof(arr) / sizeof((arr)[0]))
         |                         ^
   seccomp_ret_trace_x0_bypass.c:65:24: note: in expansion of macro 'ARRAY_SIZE'
      65 |                 .len = ARRAY_SIZE(filter),
         |                        ^~~~~~~~~~
>> seccomp_ret_trace_x0_bypass.c:66:18: error: 'struct sock_fprog' has no member named 'filter'
      66 |                 .filter = filter,
         |                  ^~~~~~
   seccomp_ret_trace_x0_bypass.c:66:27: warning: excess elements in struct initializer
      66 |                 .filter = filter,
         |                           ^~~~~~
   seccomp_ret_trace_x0_bypass.c:66:27: note: (near initialization for 'prog')
>> seccomp_ret_trace_x0_bypass.c:64:27: error: storage size of 'prog' isn't known
      64 |         struct sock_fprog prog = {
         |                           ^~~~
   seccomp_ret_trace_x0_bypass.c:64:27: warning: unused variable 'prog' [-Wunused-variable]
   seccomp_ret_trace_x0_bypass.c:58:28: warning: unused variable 'filter' [-Wunused-variable]
      58 |         struct sock_filter filter[] = {
         |                            ^~~~~~

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.