[arm64:for-next/selftests 3/4] seccomp_ret_trace_x0_bypass.c:79:28: error: array type has incomplete element type 'struct sock_filter'

kernel test robot <[email protected]> Sun, 02 Aug 2026 19:42:37 +0200
Newsgroups dev.linux.lists.oe-kbuild
Message-ID <[email protected]>
:::::: 
:::::: Manual check reason: "low confidence bisect report"
:::::: 

BCC: [email protected]
CC: [email protected]
CC: [email protected]
TO: Jinjie Ruan <[email protected]>
CC: Will Deacon <[email protected]>

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git for-next/selftests
head:   2b989c411ab98fa76b7bb3b87ba7a2a4c3b5e946
commit: 21e37da12071da1e2d2b995219c3f394dd358300 [3/4] kselftest/arm64: Add testcase for SECCOMP_RET_TRACE orig_x0 bypass
:::::: branch date: 8 hours ago
:::::: commit date: 8 hours ago
config: arm64-allnoconfig-bpf (https://download.01.org/0day-ci/archive/20260802/[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/20260802/[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]/

Note: the arm64/for-next/selftests HEAD 2b989c411ab98fa76b7bb3b87ba7a2a4c3b5e946 builds fine.
      It only hurts bisectability.

All error/warnings (new ones prefixed by >>):

   seccomp_ret_trace_x0_bypass.c: In function 'do_child':
>> seccomp_ret_trace_x0_bypass.c:79:28: error: array type has incomplete element type 'struct sock_filter'
      79 |         struct sock_filter filter[] = {
         |                            ^~~~~~
>> seccomp_ret_trace_x0_bypass.c:81:17: error: implicit declaration of function 'BPF_STMT'; did you mean 'BPF_STX'? [-Wimplicit-function-declaration]
      81 |                 BPF_STMT(BPF_LD | BPF_W | BPF_ABS, offsetof(struct seccomp_data, nr)),
         |                 ^~~~~~~~
         |                 BPF_STX
>> seccomp_ret_trace_x0_bypass.c:83:17: error: implicit declaration of function 'BPF_JUMP'; did you mean 'BPF_JMP'? [-Wimplicit-function-declaration]
      83 |                 BPF_JUMP(BPF_JMP | BPF_JEQ | BPF_K, __NR_write, 0, 5),
         |                 ^~~~~~~~
         |                 BPF_JMP
>> seccomp_ret_trace_x0_bypass.c:98:16: error: variable 'prog' has initializer but incomplete type
      98 |         struct sock_fprog prog = {
         |                ^~~~~~~~~~
>> seccomp_ret_trace_x0_bypass.c:99:18: error: 'struct sock_fprog' has no member named 'len'
      99 |                 .len = ARRAY_SIZE(filter),
         |                  ^~~
   In file included from seccomp_ret_trace_x0_bypass.c:48:
   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:99:24: note: in expansion of macro 'ARRAY_SIZE'
      99 |                 .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:99:24: note: in expansion of macro 'ARRAY_SIZE'
      99 |                 .len = ARRAY_SIZE(filter),
         |                        ^~~~~~~~~~
>> seccomp_ret_trace_x0_bypass.c:100:18: error: 'struct sock_fprog' has no member named 'filter'
     100 |                 .filter = filter,
         |                  ^~~~~~
>> seccomp_ret_trace_x0_bypass.c:100:27: warning: excess elements in struct initializer
     100 |                 .filter = filter,
         |                           ^~~~~~
   seccomp_ret_trace_x0_bypass.c:100:27: note: (near initialization for 'prog')
>> seccomp_ret_trace_x0_bypass.c:98:27: error: storage size of 'prog' isn't known
      98 |         struct sock_fprog prog = {
         |                           ^~~~
>> seccomp_ret_trace_x0_bypass.c:98:27: warning: unused variable 'prog' [-Wunused-variable]
>> seccomp_ret_trace_x0_bypass.c:79:28: warning: unused variable 'filter' [-Wunused-variable]
      79 |         struct sock_filter filter[] = {
         |                            ^~~~~~

--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki