[arm64:devel/btrfs-live-lock-fix 2/4] mm/gup.c:1679:7: error: implicit declaration of function 'probe_subpage_user_writeable'

kernel test robot lkp at intel.com
Sat Nov 27 04:05:13 PST 2021


tree:   https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git devel/btrfs-live-lock-fix
head:   eade0a26bad9d83117f472f6eebd84b90cef0dae
commit: 01859d53b56e5d9eafe838c11532d072e40d4f53 [2/4] mm: Probe for sub-page faults in fault_in_writeable()
config: i386-randconfig-c001-20211126 (https://download.01.org/0day-ci/archive/20211127/202111271919.5wQ5tok2-lkp@intel.com/config)
compiler: clang version 14.0.0 (https://github.com/llvm/llvm-project 5162b558d8c0b542e752b037e72a69d5fd51eb1e)
reproduce (this is a W=1 build):
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git/commit/?id=01859d53b56e5d9eafe838c11532d072e40d4f53
        git remote add arm64 https://git.kernel.org/pub/scm/linux/kernel/git/arm64/linux.git
        git fetch --no-tags arm64 devel/btrfs-live-lock-fix
        git checkout 01859d53b56e5d9eafe838c11532d072e40d4f53
        # save the config file to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp at intel.com>

All errors (new ones prefixed by >>):

>> mm/gup.c:1679:7: error: implicit declaration of function 'probe_subpage_user_writeable' [-Werror,-Wimplicit-function-declaration]
           if (!probe_subpage_user_writeable(uaddr, size))
                ^
   mm/gup.c:1679:7: note: did you mean 'probe_subpage_user_writable'?
   include/linux/uaccess.h:291:20: note: 'probe_subpage_user_writable' declared here
   static inline bool probe_subpage_user_writable(void __user *uaddr, size_t size)
                      ^
   1 error generated.


vim +/probe_subpage_user_writeable +1679 mm/gup.c

  1660	
  1661	/**
  1662	 * fault_in_writeable - fault in userspace address range for writing
  1663	 * @uaddr: start of address range
  1664	 * @size: size of address range
  1665	 *
  1666	 * Returns the number of bytes not faulted in (like copy_to_user() and
  1667	 * copy_from_user()).
  1668	 */
  1669	size_t fault_in_writeable(char __user *uaddr, size_t size)
  1670	{
  1671		char __user *start = uaddr, *end;
  1672	
  1673		if (unlikely(size == 0))
  1674			return 0;
  1675		/*
  1676		 * Probe the beginning of the buffer for sub-page faults within the
  1677		 * error margin of the corresponding uaccess.
  1678		 */
> 1679		if (!probe_subpage_user_writeable(uaddr, size))
  1680			return size;
  1681		if (!PAGE_ALIGNED(uaddr)) {
  1682			if (unlikely(__put_user(0, uaddr) != 0))
  1683				return size;
  1684			uaddr = (char __user *)PAGE_ALIGN((unsigned long)uaddr);
  1685		}
  1686		end = (char __user *)PAGE_ALIGN((unsigned long)start + size);
  1687		if (unlikely(end < start))
  1688			end = NULL;
  1689		while (uaddr != end) {
  1690			if (unlikely(__put_user(0, uaddr) != 0))
  1691				goto out;
  1692			uaddr += PAGE_SIZE;
  1693		}
  1694	
  1695	out:
  1696		if (size > uaddr - start)
  1697			return size - (uaddr - start);
  1698		return 0;
  1699	}
  1700	EXPORT_SYMBOL(fault_in_writeable);
  1701	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org



More information about the linux-arm-kernel mailing list