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 for Android: free password hash cracker in your pocket
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <Z3oaU3QY0L8xKnNg@rli9-mobl>
Date: Sun, 5 Jan 2025 13:36:19 +0800
From: kernel test robot <lkp@...el.com>
To: Björn Töpel <bjorn@...osinc.com>
CC: <oe-kbuild-all@...ts.linux.dev>, <linux-kernel@...r.kernel.org>, Tejun Heo
	<tj@...nel.org>, Shuah Khan <skhan@...uxfoundation.org>, Mark Brown
	<broonie@...nel.org>
Subject: hotplug.bpf.c:15:42: warning: declaration of 'struct scx_exit_info'
 will not be visible outside of this function

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head:   63676eefb7a026d04b51dcb7aaf54f358517a2ec
commit: 7941b83bceb374c7e81061e0ebb45cd45f3e3517 selftests: sched_ext: Add sched_ext as proper selftest target
date:   3 months ago
:::::: branch date: 14 hours ago
:::::: commit date: 3 months ago
compiler: gcc-12 (Debian 12.2.0-14) 12.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20250104/202501042104.qwmnqKH5-lkp@intel.com/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 <lkp@...el.com>
| Closes: https://lore.kernel.org/r/202501042104.qwmnqKH5-lkp@intel.com/

All warnings (new ones prefixed by >>):

   In file included from hotplug.bpf.c:7:
   tools/sched_ext/include/scx/common.bpf.h:33:17: error: use of undeclared identifier 'SCX_DSQ_FLAG_BUILTIN'
      33 |         _Static_assert(SCX_DSQ_FLAG_BUILTIN,
         |                        ^
   tools/sched_ext/include/scx/common.bpf.h:44:49: warning: declaration of 'struct bpf_iter_scx_dsq' will not be visible outside of this function [-Wvisibility]
      44 | void scx_bpf_dispatch_from_dsq_set_slice(struct bpf_iter_scx_dsq *it__iter, u64 slice) __ksym __weak;
         |                                                 ^
   tools/sched_ext/include/scx/common.bpf.h:45:49: warning: declaration of 'struct bpf_iter_scx_dsq' will not be visible outside of this function [-Wvisibility]
      45 | void scx_bpf_dispatch_from_dsq_set_vtime(struct bpf_iter_scx_dsq *it__iter, u64 vtime) __ksym __weak;
         |                                                 ^
   tools/sched_ext/include/scx/common.bpf.h:46:39: warning: declaration of 'struct bpf_iter_scx_dsq' will not be visible outside of this function [-Wvisibility]
      46 | bool scx_bpf_dispatch_from_dsq(struct bpf_iter_scx_dsq *it__iter, struct task_struct *p, u64 dsq_id, u64 enq_flags) __ksym __weak;
         |                                       ^
   tools/sched_ext/include/scx/common.bpf.h:47:45: warning: declaration of 'struct bpf_iter_scx_dsq' will not be visible outside of this function [-Wvisibility]
      47 | bool scx_bpf_dispatch_vtime_from_dsq(struct bpf_iter_scx_dsq *it__iter, struct task_struct *p, u64 dsq_id, u64 enq_flags) __ksym __weak;
         |                                             ^
   tools/sched_ext/include/scx/common.bpf.h:52:33: warning: declaration of 'struct bpf_iter_scx_dsq' will not be visible outside of this function [-Wvisibility]
      52 | int bpf_iter_scx_dsq_new(struct bpf_iter_scx_dsq *it, u64 dsq_id, u64 flags) __ksym __weak;
         |                                 ^
   tools/sched_ext/include/scx/common.bpf.h:53:50: warning: declaration of 'struct bpf_iter_scx_dsq' will not be visible outside of this function [-Wvisibility]
      53 | struct task_struct *bpf_iter_scx_dsq_next(struct bpf_iter_scx_dsq *it) __ksym __weak;
         |                                                  ^
   tools/sched_ext/include/scx/common.bpf.h:54:38: warning: declaration of 'struct bpf_iter_scx_dsq' will not be visible outside of this function [-Wvisibility]
      54 | void bpf_iter_scx_dsq_destroy(struct bpf_iter_scx_dsq *it) __ksym __weak;
         |                                      ^
>> hotplug.bpf.c:15:42: warning: declaration of 'struct scx_exit_info' will not be visible outside of this function [-Wvisibility]
      15 | void BPF_STRUCT_OPS(hotplug_exit, struct scx_exit_info *ei)
         |                                          ^
>> hotplug.bpf.c:15:42: warning: declaration of 'struct scx_exit_info' will not be visible outside of this function [-Wvisibility]
   hotplug.bpf.c:15:6: error: conflicting types for '____hotplug_exit'
      15 | void BPF_STRUCT_OPS(hotplug_exit, struct scx_exit_info *ei)
         |      ^
   tools/sched_ext/include/scx/common.bpf.h:140:32: note: expanded from macro 'BPF_STRUCT_OPS'
     140 | SEC("struct_ops/"#name)                                                         \
         |                                                                                 ^
   tools/testing/selftests/sched_ext/build/include/bpf/bpf_tracing.h:683:48: note: expanded from macro '\
   BPF_PROG'
     683 | static __always_inline typeof(name(0))                                      \
         |                                                                             ^
   <scratch space>:42:1: note: expanded from here
      42 | ____hotplug_exit
         | ^
   hotplug.bpf.c:15:6: note: previous declaration is here
   tools/sched_ext/include/scx/common.bpf.h:140:32: note: expanded from macro 'BPF_STRUCT_OPS'
     140 | SEC("struct_ops/"#name)                                                         \
         |                                                                                 ^
   tools/testing/selftests/sched_ext/build/include/bpf/bpf_tracing.h:674:48: note: expanded from macro '\
   BPF_PROG'
     674 | static __always_inline typeof(name(0))                                      \
         |                                                                             ^
   <scratch space>:33:1: note: expanded from here
      33 | ____hotplug_exit
         | ^
   hotplug.bpf.c:17:2: error: incomplete definition of type 'struct scx_exit_info'
      17 |         UEI_RECORD(uei, ei);
         |         ^~~~~~~~~~~~~~~~~~~
   tools/sched_ext/include/scx/user_exit_info.h:42:40: note: expanded from macro 'UEI_RECORD'
      42 |                                   sizeof(__uei_name.reason), (__ei)->reason);   \
         |                                                              ~~~~~~^
   hotplug.bpf.c:15:42: note: forward declaration of 'struct scx_exit_info'
      15 | void BPF_STRUCT_OPS(hotplug_exit, struct scx_exit_info *ei)
         |                                          ^
   hotplug.bpf.c:17:2: error: incomplete definition of type 'struct scx_exit_info'
      17 |         UEI_RECORD(uei, ei);
         |         ^~~~~~~~~~~~~~~~~~~
   tools/sched_ext/include/scx/user_exit_info.h:44:37: note: expanded from macro 'UEI_RECORD'
      44 |                                   sizeof(__uei_name.msg), (__ei)->msg);         \
         |                                                           ~~~~~~^
   hotplug.bpf.c:15:42: note: forward declaration of 'struct scx_exit_info'
      15 | void BPF_STRUCT_OPS(hotplug_exit, struct scx_exit_info *ei)
         |                                          ^
   hotplug.bpf.c:17:2: error: incomplete definition of type 'struct scx_exit_info'
      17 |         UEI_RECORD(uei, ei);
         |         ^~~~~~~~~~~~~~~~~~~
   tools/sched_ext/include/scx/user_exit_info.h:46:36: note: expanded from macro 'UEI_RECORD'
      46 |                                   __uei_name##_dump_len, (__ei)->dump);         \
         |                                                          ~~~~~~^
   hotplug.bpf.c:15:42: note: forward declaration of 'struct scx_exit_info'
      15 | void BPF_STRUCT_OPS(hotplug_exit, struct scx_exit_info *ei)
         |                                          ^
   hotplug.bpf.c:17:2: error: incomplete definition of type 'struct scx_exit_info'
      17 |         UEI_RECORD(uei, ei);
         |         ^~~~~~~~~~~~~~~~~~~
   tools/sched_ext/include/scx/user_exit_info.h:47:34: note: expanded from macro 'UEI_RECORD'
      47 |         if (bpf_core_field_exists((__ei)->exit_code))                           \
         |             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
   tools/testing/selftests/sched_ext/build/include/bpf/bpf_core_read.h:188:49: note: expanded from macro 'bpf_core_field_exists'
     188 |         __builtin_preserve_field_info(___bpf_field_ref(field), BPF_FIELD_EXISTS)
         |                                       ~~~~~~~~~~~~~~~~~^~~~~~
   tools/testing/selftests/sched_ext/build/include/bpf/bpf_core_read.h:173:52: note: expanded from macro '___bpf_field_ref'
     173 |         ___bpf_apply(___bpf_field_ref, ___bpf_narg(args))(args)
         |         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~
   tools/testing/selftests/sched_ext/build/include/bpf/bpf_core_read.h:166:35: note: expanded from macro '___bpf_field_ref1'
     166 | #define ___bpf_field_ref1(field)        (field)
         |                                          ^~~~~
   hotplug.bpf.c:15:42: note: forward declaration of 'struct scx_exit_info'
      15 | void BPF_STRUCT_OPS(hotplug_exit, struct scx_exit_info *ei)
         |                                          ^
   hotplug.bpf.c:17:2: error: incomplete definition of type 'struct scx_exit_info'
      17 |         UEI_RECORD(uei, ei);
         |         ^~~~~~~~~~~~~~~~~~~
   tools/sched_ext/include/scx/user_exit_info.h:48:32: note: expanded from macro 'UEI_RECORD'
      48 |                 __uei_name.exit_code = (__ei)->exit_code;                       \
         |                                        ~~~~~~^
   hotplug.bpf.c:15:42: note: forward declaration of 'struct scx_exit_info'
      15 | void BPF_STRUCT_OPS(hotplug_exit, struct scx_exit_info *ei)
         |                                          ^
   hotplug.bpf.c:17:2: error: incomplete definition of type 'struct scx_exit_info'
      17 |         UEI_RECORD(uei, ei);
         |         ^~~~~~~~~~~~~~~~~~~
   tools/sched_ext/include/scx/user_exit_info.h:51:15: note: expanded from macro 'UEI_RECORD'
      51 |                                     (__ei)->kind);                              \
         |                                     ~~~~~~^
   hotplug.bpf.c:15:42: note: forward declaration of 'struct scx_exit_info'
      15 | void BPF_STRUCT_OPS(hotplug_exit, struct scx_exit_info *ei)
         |                                          ^
   hotplug.bpf.c:28:13: error: use of undeclared identifier 'SCX_ECODE_ACT_RESTART'
      28 |         s64 code = SCX_ECODE_ACT_RESTART | HOTPLUG_EXIT_RSN;
         |                    ^
   hotplug.bpf.c:48:22: error: variable has incomplete type 'struct sched_ext_ops'
      48 | struct sched_ext_ops hotplug_cb_ops = {
         |                      ^
   hotplug.bpf.c:48:8: note: forward declaration of 'struct sched_ext_ops'
      48 | struct sched_ext_ops hotplug_cb_ops = {
         |        ^
   hotplug.bpf.c:57:22: error: variable has incomplete type 'struct sched_ext_ops'
      57 | struct sched_ext_ops hotplug_nocb_ops = {
         |                      ^
   hotplug.bpf.c:48:8: note: forward declaration of 'struct sched_ext_ops'

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


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ