BPF List
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Song Liu <song@kernel.org>, bpf@vger.kernel.org
Cc: oe-kbuild-all@lists.linux.dev, ast@kernel.org,
	daniel@iogearbox.net, andrii@kernel.org, eddyz87@gmail.com,
	memxor@gmail.com, kernel-team@meta.com,
	Song Liu <song@kernel.org>
Subject: Re: [PATCH v3 bpf-next 1/1] bpf: Populate mmap-able array map memory lazily
Date: Wed, 29 Jul 2026 16:36:11 +0800	[thread overview]
Message-ID: <202607291608.xeQ99Iqz-lkp@intel.com> (raw)
In-Reply-To: <20260729001033.3433328-2-song@kernel.org>

Hi Song,

kernel test robot noticed the following build errors:

[auto build test ERROR on fdec474c65fd35d5a6e1497ed50a9f98c07192f0]

url:    https://github.com/intel-lab-lkp/linux/commits/Song-Liu/bpf-Populate-mmap-able-array-map-memory-lazily/20260729-093241
base:   fdec474c65fd35d5a6e1497ed50a9f98c07192f0
patch link:    https://lore.kernel.org/r/20260729001033.3433328-2-song%40kernel.org
patch subject: [PATCH v3 bpf-next 1/1] bpf: Populate mmap-able array map memory lazily
config: arm-randconfig-002-20260729 (https://download.01.org/0day-ci/archive/20260729/202607291608.xeQ99Iqz-lkp@intel.com/config)
compiler: arm-linux-gnueabi-gcc (GCC) 8.5.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20260729/202607291608.xeQ99Iqz-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@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202607291608.xeQ99Iqz-lkp@intel.com/

All errors (new ones prefixed by >>):

   kernel/bpf/arraymap.c: In function 'array_map_mmap_pages':
>> kernel/bpf/arraymap.c:659:6: error: implicit declaration of function 'pmd_none'; did you mean 'p4d_none'? [-Werror=implicit-function-declaration]
     if (pmd_none(*vmf->pmd))
         ^~~~~~~~
         p4d_none
>> kernel/bpf/arraymap.c:673:8: error: implicit declaration of function 'pte_none'; did you mean 'p4d_none'? [-Werror=implicit-function-declaration]
      if (!pte_none(ptep_get(vmf->pte)))
           ^~~~~~~~
           p4d_none
>> kernel/bpf/arraymap.c:673:17: error: implicit declaration of function 'ptep_get'; did you mean 'btf_get'? [-Werror=implicit-function-declaration]
      if (!pte_none(ptep_get(vmf->pte)))
                    ^~~~~~~~
                    btf_get
>> kernel/bpf/arraymap.c:682:3: error: implicit declaration of function 'set_pte_range'; did you mean 'free_pgd_range'? [-Werror=implicit-function-declaration]
      set_pte_range(vmf, folio, page, 1, addr);
      ^~~~~~~~~~~~~
      free_pgd_range
   In file included from include/linux/kallsyms.h:13,
                    from include/linux/bpf.h:23,
                    from kernel/bpf/arraymap.c:5:
>> include/linux/mm.h:3848:2: error: implicit declaration of function 'pte_unmap'; did you mean 'memunmap'? [-Werror=implicit-function-declaration]
     pte_unmap(pte);     \
     ^~~~~~~~~
   kernel/bpf/arraymap.c:689:2: note: in expansion of macro 'pte_unmap_unlock'
     pte_unmap_unlock(start_pte, vmf->ptl);
     ^~~~~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +659 kernel/bpf/arraymap.c

   637	
   638	/*
   639	 * Fault-around handler: install PTEs for the whole [start_pgoff, end_pgoff]
   640	 * window under a single page-table lock, so that populating a large mapping
   641	 * (e.g. mmap(MAP_POPULATE) or a linear access pattern) does not take one full
   642	 * fault per page.
   643	 */
   644	static vm_fault_t array_map_mmap_pages(struct bpf_map *map, struct vm_fault *vmf,
   645					       pgoff_t start_pgoff, pgoff_t end_pgoff)
   646	{
   647		struct bpf_array *array = container_of(map, struct bpf_array, map);
   648		struct vm_area_struct *vma = vmf->vma;
   649		unsigned long addr, rss = 0;
   650		vm_fault_t ret = 0;
   651		pte_t *start_pte;
   652		pgoff_t pgoff;
   653	
   654		/*
   655		 * The PTE table for this PMD must already exist; installing it needs
   656		 * mm-internal helpers. If it is missing, let the regular ->fault path
   657		 * install it and rely on the next fault-around to batch the rest.
   658		 */
 > 659		if (pmd_none(*vmf->pmd))
   660			return 0;
   661	
   662		addr = vma->vm_start + ((start_pgoff - vma->vm_pgoff) << PAGE_SHIFT);
   663		start_pte = pte_offset_map_lock(vma->vm_mm, vmf->pmd, addr, &vmf->ptl);
   664		if (!start_pte)
   665			return 0;
   666		vmf->pte = start_pte;
   667	
   668		for (pgoff = start_pgoff; pgoff <= end_pgoff;
   669		     pgoff++, vmf->pte++, addr += PAGE_SIZE) {
   670			struct folio *folio;
   671			struct page *page;
   672	
 > 673			if (!pte_none(ptep_get(vmf->pte)))
   674				continue;
   675	
   676			page = array_map_fault_page(array, pgoff);
   677			if (!page)
   678				continue;
   679	
   680			folio = page_folio(page);
   681			folio_get(folio);
 > 682			set_pte_range(vmf, folio, page, 1, addr);
   683			rss++;
   684			if (addr == vmf->address)
   685				ret = VM_FAULT_NOPAGE;
   686		}
   687	
   688		add_mm_counter(vma->vm_mm, MM_FILEPAGES, rss);
   689		pte_unmap_unlock(start_pte, vmf->ptl);
   690	
   691		return ret;
   692	}
   693	

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

      parent reply	other threads:[~2026-07-29  8:37 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-29  0:10 [PATCH v3 bpf-next 0/1] bpf: Populate mmap-able array maps lazily Song Liu
2026-07-29  0:10 ` [PATCH v3 bpf-next 1/1] bpf: Populate mmap-able array map memory lazily Song Liu
2026-07-29  0:34   ` sashiko-bot
2026-07-29  8:36   ` kernel test robot [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202607291608.xeQ99Iqz-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=andrii@kernel.org \
    --cc=ast@kernel.org \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=eddyz87@gmail.com \
    --cc=kernel-team@meta.com \
    --cc=memxor@gmail.com \
    --cc=oe-kbuild-all@lists.linux.dev \
    --cc=song@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox