lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <202202251524.ivDzBaPs-lkp@intel.com>
Date:   Fri, 25 Feb 2022 15:43:11 +0800
From:   kernel test robot <lkp@...el.com>
To:     Dinh Nguyen <dinguyen@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        Christoph Hellwig <hch@....de>, Arnd Bergmann <arnd@...db.de>
Subject: [dinguyen:nios2_for_v5.18 5/6] lib/strncpy_from_user.c:123:13:
 error: implicit declaration of function 'user_addr_max'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux.git nios2_for_v5.18
head:   048b7695b48a3a4523a7a7fbfedc396b40ccf62f
commit: f368e6211f42e086e37dde58d081a86ac033dda3 [5/6] uaccess: generalize access_ok()
config: i386-randconfig-a014 (https://download.01.org/0day-ci/archive/20220225/202202251524.ivDzBaPs-lkp@intel.com/config)
compiler: gcc-9 (Debian 9.3.0-22) 9.3.0
reproduce (this is a W=1 build):
        # https://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux.git/commit/?id=f368e6211f42e086e37dde58d081a86ac033dda3
        git remote add dinguyen https://git.kernel.org/pub/scm/linux/kernel/git/dinguyen/linux.git
        git fetch --no-tags dinguyen nios2_for_v5.18
        git checkout f368e6211f42e086e37dde58d081a86ac033dda3
        # save the config file to linux build tree
        mkdir build_dir
        make 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@...el.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 at 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@...emloft.net>
:::::: CC: David S. Miller <davem@...emloft.net>

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ