Building the Linux kernel with Clang and LLVM
 help / color / mirror / Atom feed
* Re: [RFC bpf-next 4/9] bpf: Add kfuncs to allocate and seal user pages
       [not found] <20261021195759.119421-5-jolsa@kernel.org>
@ 2026-10-26 15:27 ` kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2026-10-26 15:27 UTC (permalink / raw)
  To: Jiri Olsa; +Cc: llvm, oe-kbuild-all

Hi Jiri,

[This is a private test report for your RFC patch.]
kernel test robot noticed the following build errors:

[auto build test ERROR on bpf-next/master]

url:    https://github.com/intel-lab-lkp/linux/commits/Jiri-Olsa/bpf-Add-__srcptr-kfunc-argument-suffix/20261021-215750
base:   https://git.kernel.org/pub/scm/linux/kernel/git/bpf/bpf-next.git master
patch link:    https://lore.kernel.org/r/20261021195759.119421-5-jolsa%40kernel.org
patch subject: [RFC bpf-next 4/9] bpf: Add kfuncs to allocate and seal user pages
config: sparc64-allmodconfig (https://download.01.org/0day-ci/archive/20261026/202610262325.yiL2BU9U-lkp@intel.com/config)
compiler: clang version 20.1.8 (https://github.com/llvm/llvm-project 87f0227cb60147a26a1eeb4fb06e3b505e9c7261)
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20261026/202610262325.yiL2BU9U-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/202610262325.yiL2BU9U-lkp@intel.com/

All errors (new ones prefixed by >>):

>> kernel/bpf/helpers.c:3855:2: error: call to undeclared function 'flush_icache_user_page'; ISO C99 and later do not support implicit function declarations [-Wimplicit-function-declaration]
    3855 |         flush_icache_user_page(vma, page, addr, PAGE_SIZE);
         |         ^
   1 error generated.


vim +/flush_icache_user_page +3855 kernel/bpf/helpers.c

  3807	
  3808	/**
  3809	 * bpf_user_page_exec() - Make a BPF-allocated user page read/execute
  3810	 * @addr: Address of the page to change
  3811	 *
  3812	 * Changes a writable page created by bpf_user_page_alloc() to read/execute.
  3813	 * The page cannot be made writable again after this call.
  3814	 *
  3815	 * Return: 0 on success, or a negative error code.
  3816	 */
  3817	__bpf_kfunc int bpf_user_page_exec(unsigned long addr)
  3818	{
  3819		struct mm_struct *mm = current->mm;
  3820		struct vm_area_struct *vma;
  3821		struct page *page;
  3822		int err = -EINVAL;
  3823	
  3824		if (unlikely(in_interrupt() ||
  3825			     current->flags & (PF_KTHREAD | PF_EXITING)))
  3826			return -EPERM;
  3827		if (unlikely(!nmi_uaccess_okay()))
  3828			return -EPERM;
  3829		if (unlikely(!mm))
  3830			return -EFAULT;
  3831		if ((addr & ~PAGE_MASK) || addr > ULONG_MAX - PAGE_SIZE)
  3832			return -EINVAL;
  3833	
  3834		if (mmap_write_lock_killable(mm))
  3835			return -EINTR;
  3836	
  3837		vma = find_vma(mm, addr);
  3838		if (!vma || vma->vm_start > addr)
  3839			goto out;
  3840		/* Allow to change only vma allocated by bpf_user_page_alloc. */
  3841		if (vma->vm_private_data != &bpf_user_page_marker)
  3842			goto out;
  3843		if (!(vma->vm_flags & VM_WRITE) || !(vma->vm_flags & VM_MAYEXEC))
  3844			goto out;
  3845	
  3846		vma_start_write(vma);
  3847	
  3848		err = get_user_pages(addr, 1, FOLL_WRITE, &page);
  3849		if (err != 1) {
  3850			if (!err)
  3851				err = -EFAULT;
  3852			goto out;
  3853		}
  3854	
> 3855		flush_icache_user_page(vma, page, addr, PAGE_SIZE);
  3856		err = do_mprotect_pkey_locked(addr, PAGE_SIZE, PROT_READ | PROT_EXEC, -1);
  3857		if (!err) {
  3858			vma = find_vma(mm, addr);
  3859			vm_flags_clear(vma, VM_MAYWRITE);
  3860		}
  3861		put_page(page);
  3862	out:
  3863		mmap_write_unlock(mm);
  3864		return err;
  3865	}
  3866	

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2026-10-26 15:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <20261021195759.119421-5-jolsa@kernel.org>
2026-10-26 15:27 ` [RFC bpf-next 4/9] bpf: Add kfuncs to allocate and seal user pages kernel test robot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox