All of lore.kernel.org
 help / color / mirror / Atom feed
* [arnd-playground:generic-uaccess 4/5] lib/strncpy_from_user.c:123:13: error: implicit declaration of function 'user_addr_max'
@ 2021-02-12 23:28 kernel test robot
  0 siblings, 0 replies; only message in thread
From: kernel test robot @ 2021-02-12 23:28 UTC (permalink / raw)
  To: kbuild-all

[-- Attachment #1: Type: text/plain, Size: 4779 bytes --]

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git generic-uaccess
head:   7731bf9d8dc1468d45db173cbe49cbe19c39a4a7
commit: 04e17803c96bb95527da87c2cfbac2f7cb6d697f [4/5] asm-generic: uaccess: use generic uaccess on m68k, h8300 and riscv
config: h8300-allyesconfig (attached as .config)
compiler: h8300-linux-gcc (GCC) 9.3.0
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/arnd/playground.git/commit/?id=04e17803c96bb95527da87c2cfbac2f7cb6d697f
        git remote add arnd-playground https://git.kernel.org/pub/scm/linux/kernel/git/arnd/playground.git
        git fetch --no-tags arnd-playground generic-uaccess
        git checkout 04e17803c96bb95527da87c2cfbac2f7cb6d697f
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=h8300 

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

All errors (new ones prefixed by >>):

   lib/strncpy_from_user.c: In function 'strncpy_from_user':
>> lib/strncpy_from_user.c:123:13: error: implicit declaration of function 'user_addr_max' [-Werror=implicit-function-declaration]
     123 |  max_addr = user_addr_max();
         |             ^~~~~~~~~~~~~
   cc1: some warnings being treated as errors
--
   lib/strnlen_user.c: In function 'strnlen_user':
>> lib/strnlen_user.c:99:13: error: implicit declaration of function 'user_addr_max' [-Werror=implicit-function-declaration]
      99 |  max_addr = user_addr_max();
         |             ^~~~~~~~~~~~~
   cc1: some warnings being treated as errors


vim +/user_addr_max +123 lib/strncpy_from_user.c

2922585b93294d David S. Miller      2012-05-24   94  
2922585b93294d David S. Miller      2012-05-24   95  /**
2922585b93294d David S. Miller      2012-05-24   96   * strncpy_from_user: - Copy a NUL terminated string from userspace.
2922585b93294d David S. Miller      2012-05-24   97   * @dst:   Destination address, in kernel space.  This buffer must be at
2922585b93294d David S. Miller      2012-05-24   98   *         least @count bytes long.
2922585b93294d David S. Miller      2012-05-24   99   * @src:   Source address, in user space.
2922585b93294d David S. Miller      2012-05-24  100   * @count: Maximum number of bytes to copy, including the trailing NUL.
2922585b93294d David S. Miller      2012-05-24  101   *
2922585b93294d David S. Miller      2012-05-24  102   * Copies a NUL-terminated string from userspace to kernel space.
2922585b93294d David S. Miller      2012-05-24  103   *
2922585b93294d David S. Miller      2012-05-24  104   * On success, returns the length of the string (not including the trailing
2922585b93294d David S. Miller      2012-05-24  105   * NUL).
2922585b93294d David S. Miller      2012-05-24  106   *
2922585b93294d David S. Miller      2012-05-24  107   * If access to userspace fails, returns -EFAULT (some data may have been
2922585b93294d David S. Miller      2012-05-24  108   * copied).
2922585b93294d David S. Miller      2012-05-24  109   *
2922585b93294d David S. Miller      2012-05-24  110   * If @count is smaller than the length of the string, copies @count bytes
2922585b93294d David S. Miller      2012-05-24  111   * and returns @count.
2922585b93294d David S. Miller      2012-05-24  112   */
2922585b93294d David S. Miller      2012-05-24  113  long strncpy_from_user(char *dst, const char __user *src, long count)
2922585b93294d David S. Miller      2012-05-24  114  {
2922585b93294d David S. Miller      2012-05-24  115  	unsigned long max_addr, src_addr;
2922585b93294d David S. Miller      2012-05-24  116  
07887358993d48 KP Singh             2020-06-04  117  	might_fault();
4d0e9df5e43dba Albert van der Linde 2020-10-15  118  	if (should_fail_usercopy())
4d0e9df5e43dba Albert van der Linde 2020-10-15  119  		return -EFAULT;
2922585b93294d David S. Miller      2012-05-24  120  	if (unlikely(count <= 0))
2922585b93294d David S. Miller      2012-05-24  121  		return 0;
2922585b93294d David S. Miller      2012-05-24  122  
2922585b93294d David S. Miller      2012-05-24 @123  	max_addr = user_addr_max();

:::::: The code@line 123 was first introduced by commit
:::::: 2922585b93294d47172a765115e0dbc1bfe1be19 lib: Sparc's strncpy_from_user is generic enough, move under lib/

:::::: TO: David S. Miller <davem@davemloft.net>
:::::: CC: David S. Miller <davem@davemloft.net>

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

[-- Attachment #2: config.gz --]
[-- Type: application/gzip, Size: 57864 bytes --]

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

only message in thread, other threads:[~2021-02-12 23:28 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-12 23:28 [arnd-playground:generic-uaccess 4/5] lib/strncpy_from_user.c:123:13: error: implicit declaration of function 'user_addr_max' kernel test robot

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.