Re: [PATCH bpf v1] bpf: Avoid faultable build ID reads under mm locks

From: kernel test robot

Date: Sat Apr 11 2026 - 06:35:31 EST


Hi Ihor,

kernel test robot noticed the following build errors:

[auto build test ERROR on bpf/master]

url: https://github.com/intel-lab-lkp/linux/commits/Ihor-Solodrai/bpf-Avoid-faultable-build-ID-reads-under-mm-locks/20260411-130435
base: https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf.git master
patch link: https://lore.kernel.org/r/20260407223003.720428-1-ihor.solodrai%40linux.dev
patch subject: [PATCH bpf v1] bpf: Avoid faultable build ID reads under mm locks
config: x86_64-buildonly-randconfig-003-20260411 (https://download.01.org/0day-ci/archive/20260411/202604111854.PygL2SVE-lkp@xxxxxxxxx/config)
compiler: gcc-13 (Debian 13.3.0-16) 13.3.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260411/202604111854.PygL2SVE-lkp@xxxxxxxxx/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@xxxxxxxxx>
| Closes: https://lore.kernel.org/oe-kbuild-all/202604111854.PygL2SVE-lkp@xxxxxxxxx/

All errors (new ones prefixed by >>):

kernel/bpf/stackmap.c: In function 'stack_map_lock_vma':
>> kernel/bpf/stackmap.c:172:42: error: implicit declaration of function 'vma_start_read_locked'; did you mean 'vma_assert_write_locked'? [-Werror=implicit-function-declaration]
172 | if (range_in_vma(vma, ip, ip) && vma_start_read_locked(vma))
| ^~~~~~~~~~~~~~~~~~~~~
| vma_assert_write_locked
cc1: some warnings being treated as errors


vim +172 kernel/bpf/stackmap.c

161
162 static struct vm_area_struct *stack_map_lock_vma(struct mm_struct *mm, unsigned long ip)
163 {
164 struct vm_area_struct *vma;
165
166 vma = lock_vma_under_rcu(mm, ip);
167 if (vma)
168 return vma;
169
170 mmap_read_lock(mm);
171 vma = find_vma(mm, ip);
> 172 if (range_in_vma(vma, ip, ip) && vma_start_read_locked(vma))
173 goto out;
174
175 vma = NULL;
176 out:
177 mmap_read_unlock(mm);
178
179 return vma;
180 }
181

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