* mm/bpf_memcontrol.c:125:27: sparse: sparse: symbol 'bpf_mem_cgroup_memory_events' was not declared. Should it be static?
@ 2026-06-14 19:07 kernel test robot
2026-06-17 18:06 ` JP Kobryn
0 siblings, 1 reply; 2+ messages in thread
From: kernel test robot @ 2026-06-14 19:07 UTC (permalink / raw)
To: Roman Gushchin; +Cc: oe-kbuild-all, linux-kernel, Alexei Starovoitov, JP Kobryn
tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
head: 8cd9520d35a6c38db6567e97dd93b1f11f185dc6
commit: 99430ab8b804c26b8a0dec93fcbfe75469f3edc7 mm: introduce BPF kfuncs to access memcg statistics and events
date: 6 months ago
config: powerpc-randconfig-r134-20260614 (https://download.01.org/0day-ci/archive/20260615/202606150332.Xy4Egd9s-lkp@intel.com/config)
compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 305faf498a4e0b52b40742c927af63ab2082e1a9)
sparse: v0.6.5-rc1
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260615/202606150332.Xy4Egd9s-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
| Fixes: 99430ab8b804 ("mm: introduce BPF kfuncs to access memcg statistics and events")
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202606150332.Xy4Egd9s-lkp@intel.com/
sparse warnings: (new ones prefixed by >>)
>> mm/bpf_memcontrol.c:125:27: sparse: sparse: symbol 'bpf_mem_cgroup_memory_events' was not declared. Should it be static?
mm/bpf_memcontrol.c:68:9: sparse: sparse: context imbalance in 'bpf_get_mem_cgroup' - different lock contexts for basic block
vim +/bpf_mem_cgroup_memory_events +125 mm/bpf_memcontrol.c
117
118 /**
119 * bpf_mem_cgroup_memory_events - Read memory cgroup's memory event value
120 * @memcg: memory cgroup
121 * @event: memory event id
122 *
123 * Return: The current value of the memory event counter.
124 */
> 125 __bpf_kfunc unsigned long bpf_mem_cgroup_memory_events(struct mem_cgroup *memcg,
126 enum memcg_memory_event event)
127 {
128 if (unlikely(event >= MEMCG_NR_MEMORY_EVENTS))
129 return (unsigned long)-1;
130
131 return atomic_long_read(&memcg->memory_events[event]);
132 }
133
--
0-DAY CI Kernel Test Service
https://github.com/intel/lkp-tests/wiki
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: mm/bpf_memcontrol.c:125:27: sparse: sparse: symbol 'bpf_mem_cgroup_memory_events' was not declared. Should it be static?
2026-06-14 19:07 mm/bpf_memcontrol.c:125:27: sparse: sparse: symbol 'bpf_mem_cgroup_memory_events' was not declared. Should it be static? kernel test robot
@ 2026-06-17 18:06 ` JP Kobryn
0 siblings, 0 replies; 2+ messages in thread
From: JP Kobryn @ 2026-06-17 18:06 UTC (permalink / raw)
To: Roman Gushchin
Cc: oe-kbuild-all, linux-kernel, Alexei Starovoitov,
kernel test robot
On 6/14/26 12:07 PM, kernel test robot wrote:
> tree: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master
> head: 8cd9520d35a6c38db6567e97dd93b1f11f185dc6
> commit: 99430ab8b804c26b8a0dec93fcbfe75469f3edc7 mm: introduce BPF kfuncs to access memcg statistics and events
> date: 6 months ago
> config: powerpc-randconfig-r134-20260614 (https://download.01.org/0day-ci/archive/20260615/202606150332.Xy4Egd9s-lkp@intel.com/config)
> compiler: clang version 23.0.0git (https://github.com/llvm/llvm-project 305faf498a4e0b52b40742c927af63ab2082e1a9)
> sparse: v0.6.5-rc1
> reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260615/202606150332.Xy4Egd9s-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
> | Fixes: 99430ab8b804 ("mm: introduce BPF kfuncs to access memcg statistics and events")
> | Reported-by: kernel test robot <lkp@intel.com>
> | Closes: https://lore.kernel.org/oe-kbuild-all/202606150332.Xy4Egd9s-lkp@intel.com/
>
> sparse warnings: (new ones prefixed by >>)
>>> mm/bpf_memcontrol.c:125:27: sparse: sparse: symbol 'bpf_mem_cgroup_memory_events' was not declared. Should it be static?
> mm/bpf_memcontrol.c:68:9: sparse: sparse: context imbalance in 'bpf_get_mem_cgroup' - different lock contexts for basic block
>
> vim +/bpf_mem_cgroup_memory_events +125 mm/bpf_memcontrol.c
>
> 117
> 118 /**
> 119 * bpf_mem_cgroup_memory_events - Read memory cgroup's memory event value
> 120 * @memcg: memory cgroup
> 121 * @event: memory event id
> 122 *
> 123 * Return: The current value of the memory event counter.
> 124 */
> > 125 __bpf_kfunc unsigned long bpf_mem_cgroup_memory_events(struct mem_cgroup *memcg,
> 126 enum memcg_memory_event event)
Roman, it looks like the kfuncs added for bpfoom can safely be made
static since they get resolved through BTF. I'll send a patch to update
where applicable.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-06-17 18:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-06-14 19:07 mm/bpf_memcontrol.c:125:27: sparse: sparse: symbol 'bpf_mem_cgroup_memory_events' was not declared. Should it be static? kernel test robot
2026-06-17 18:06 ` JP Kobryn
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.