tree: https://gitee.com/openeuler/kernel.git OLK-6.6 head: 25097b0e8b7a08363a1cba931a5762548a3b0e16 commit: ef015dbb4151c10d0415045f9d0fcf3dc85063d7 [3098/3098] bpf-rvi: pidns: Add for_each_task_in_pidns and loadavg-related kfuncs config: x86_64-randconfig-001-20251104 (https://download.01.org/0day-ci/archive/20251104/202511042031.XJbcBnUd-lkp@i...) compiler: gcc-14 (Debian 14.2.0-19) 14.2.0 reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20251104/202511042031.XJbcBnUd-lkp@i...) 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@intel.com> | Closes: https://lore.kernel.org/oe-kbuild-all/202511042031.XJbcBnUd-lkp@intel.com/ All warnings (new ones prefixed by >>): kernel/bpf-rvi/common_kfuncs.c:15:32: warning: no previous prototype for 'bpf_mem_cgroup_from_task' [-Wmissing-prototypes] 15 | __bpf_kfunc struct mem_cgroup *bpf_mem_cgroup_from_task(struct task_struct *p) | ^~~~~~~~~~~~~~~~~~~~~~~~
kernel/bpf-rvi/common_kfuncs.c:24:35: warning: no previous prototype for 'bpf_task_active_pid_ns' [-Wmissing-prototypes] 24 | __bpf_kfunc struct pid_namespace *bpf_task_active_pid_ns(struct task_struct *task) | ^~~~~~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:29:17: warning: no previous prototype for 'bpf_pidns_nr_tasks' [-Wmissing-prototypes] 29 | __bpf_kfunc u64 bpf_pidns_nr_tasks(struct pid_namespace *ns) | ^~~~~~~~~~~~~~~~~~ kernel/bpf-rvi/common_kfuncs.c:43:17: warning: no previous prototype for 'bpf_pidns_last_pid' [-Wmissing-prototypes] 43 | __bpf_kfunc u32 bpf_pidns_last_pid(struct pid_namespace *ns) | ^~~~~~~~~~~~~~~~~~
vim +/bpf_task_active_pid_ns +24 kernel/bpf-rvi/common_kfuncs.c 19 20 /* 21 * Loadavg related kfuncs 22 */ 23
24 __bpf_kfunc struct pid_namespace *bpf_task_active_pid_ns(struct task_struct *task) 25 { 26 return task_active_pid_ns(task); 27 } 28 29 __bpf_kfunc u64 bpf_pidns_nr_tasks(struct pid_namespace *ns) 30 { 31 struct pid_iter iter = {}; 32 u32 nr_running = 0, nr_threads = 0; 33 34 for_each_task_in_pidns(iter, ns) { 35 nr_threads++; 36 if (task_is_running(iter.task)) 37 nr_running++; 38 } 39 40 return (u64)nr_running << 32 | nr_threads; 41 } 42 43 __bpf_kfunc u32 bpf_pidns_last_pid(struct pid_namespace *ns) 44 { 45 return idr_get_cursor(&ns->idr) - 1; 46 } 47
-- 0-DAY CI Kernel Test Service https://github.com/intel/lkp-tests/wiki