All of lore.kernel.org
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: kbuild-all@lists.01.org
Subject: Re: [PATCH v3 6/9] microblaze: use generic strncpy/strnlen from_user
Date: Fri, 23 Jul 2021 04:48:38 +0800	[thread overview]
Message-ID: <202107230453.Cz16fInO-lkp@intel.com> (raw)
In-Reply-To: <20210722124814.778059-7-arnd@kernel.org>

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

Hi Arnd,

I love your patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v5.14-rc2 next-20210722]
[cannot apply to asm-generic/master arc/for-next uclinux-h8/h8300-next]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use '--base' as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Arnd-Bergmann/asm-generic-uaccess-h-remove-__strncpy_from_user-__strnlen_user/20210722-214839
base:   https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git 3d5895cd351757f69c9a66fb5fc8cf19f454d773
config: microblaze-buildonly-randconfig-r005-20210722 (attached as .config)
compiler: microblaze-linux-gcc (GCC) 10.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://github.com/0day-ci/linux/commit/50efd0b2c40f098c1c02453d22bc3f3ef58d8a76
        git remote add linux-review https://github.com/0day-ci/linux
        git fetch --no-tags linux-review Arnd-Bergmann/asm-generic-uaccess-h-remove-__strncpy_from_user-__strnlen_user/20210722-214839
        git checkout 50efd0b2c40f098c1c02453d22bc3f3ef58d8a76
        # save the attached .config to linux build tree
        mkdir build_dir
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-10.3.0 make.cross O=build_dir ARCH=microblaze SHELL=/bin/bash

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:92:6: error: conflicting types for 'strnlen_user'
      92 | long strnlen_user(const char __user *str, long count)
         |      ^~~~~~~~~~~~
   In file included from include/linux/uaccess.h:11,
                    from lib/strnlen_user.c:4:
   arch/microblaze/include/asm/uaccess.h:306:13: note: previous declaration of 'strnlen_user' was here
     306 | extern long strnlen_user(const char __user *sstr, int len);
         |             ^~~~~~~~~~~~
   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 +/strnlen_user +92 lib/strnlen_user.c

a08c5356a3aaf6 Linus Torvalds    2012-05-26  70  
a08c5356a3aaf6 Linus Torvalds    2012-05-26  71  /**
a08c5356a3aaf6 Linus Torvalds    2012-05-26  72   * strnlen_user: - Get the size of a user string INCLUDING final NUL.
a08c5356a3aaf6 Linus Torvalds    2012-05-26  73   * @str: The string to measure.
a08c5356a3aaf6 Linus Torvalds    2012-05-26  74   * @count: Maximum count (including NUL character)
a08c5356a3aaf6 Linus Torvalds    2012-05-26  75   *
b3c395ef5556a6 David Hildenbrand 2015-05-11  76   * Context: User context only. This function may sleep if pagefaults are
b3c395ef5556a6 David Hildenbrand 2015-05-11  77   *          enabled.
a08c5356a3aaf6 Linus Torvalds    2012-05-26  78   *
a08c5356a3aaf6 Linus Torvalds    2012-05-26  79   * Get the size of a NUL-terminated string in user space.
a08c5356a3aaf6 Linus Torvalds    2012-05-26  80   *
a08c5356a3aaf6 Linus Torvalds    2012-05-26  81   * Returns the size of the string INCLUDING the terminating NUL.
226a07ef0a5a2d Jan Kara          2015-06-03  82   * If the string is too long, returns a number larger than @count. User
226a07ef0a5a2d Jan Kara          2015-06-03  83   * has to check the return value against "> count".
a08c5356a3aaf6 Linus Torvalds    2012-05-26  84   * On exception (or invalid count), returns 0.
226a07ef0a5a2d Jan Kara          2015-06-03  85   *
226a07ef0a5a2d Jan Kara          2015-06-03  86   * NOTE! You should basically never use this function. There is
226a07ef0a5a2d Jan Kara          2015-06-03  87   * almost never any valid case for using the length of a user space
226a07ef0a5a2d Jan Kara          2015-06-03  88   * string, since the string can be changed at any time by other
226a07ef0a5a2d Jan Kara          2015-06-03  89   * threads. Use "strncpy_from_user()" instead to get a stable copy
226a07ef0a5a2d Jan Kara          2015-06-03  90   * of the string.
a08c5356a3aaf6 Linus Torvalds    2012-05-26  91   */
a08c5356a3aaf6 Linus Torvalds    2012-05-26 @92  long strnlen_user(const char __user *str, long count)
a08c5356a3aaf6 Linus Torvalds    2012-05-26  93  {
a08c5356a3aaf6 Linus Torvalds    2012-05-26  94  	unsigned long max_addr, src_addr;
a08c5356a3aaf6 Linus Torvalds    2012-05-26  95  
a08c5356a3aaf6 Linus Torvalds    2012-05-26  96  	if (unlikely(count <= 0))
a08c5356a3aaf6 Linus Torvalds    2012-05-26  97  		return 0;
a08c5356a3aaf6 Linus Torvalds    2012-05-26  98  
a08c5356a3aaf6 Linus Torvalds    2012-05-26 @99  	max_addr = user_addr_max();

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

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

  parent reply	other threads:[~2021-07-22 20:48 UTC|newest]

Thread overview: 116+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-22 12:48 [PATCH v3 0/6] asm-generic: strncpy_from_user/strnlen_user cleanup Arnd Bergmann
2021-07-22 12:48 ` Arnd Bergmann
2021-07-22 12:48 ` Arnd Bergmann
2021-07-22 12:48 ` Arnd Bergmann
2021-07-22 12:48 ` [PATCH v3 1/9] asm-generic/uaccess.h: remove __strncpy_from_user/__strnlen_user Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 12:59   ` Christoph Hellwig
2021-07-22 12:59     ` Christoph Hellwig
2021-07-22 12:59     ` Christoph Hellwig
2021-07-22 12:59     ` Christoph Hellwig
2021-07-22 12:48 ` [PATCH v3 2/9] h8300: remove stale strncpy_from_user Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 12:59   ` Christoph Hellwig
2021-07-22 12:59     ` Christoph Hellwig
2021-07-22 12:59     ` Christoph Hellwig
2021-07-22 12:59     ` Christoph Hellwig
2021-07-22 12:48 ` [PATCH v3 3/9] hexagon: use generic strncpy/strnlen from_user Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 13:00   ` Christoph Hellwig
2021-07-22 13:00     ` Christoph Hellwig
2021-07-22 13:00     ` Christoph Hellwig
2021-07-22 13:00     ` Christoph Hellwig
2021-07-22 12:48 ` [PATCH v3 4/9] arc: " Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 13:00   ` Christoph Hellwig
2021-07-22 13:00     ` Christoph Hellwig
2021-07-22 13:00     ` Christoph Hellwig
2021-07-22 13:00     ` Christoph Hellwig
2021-07-22 15:34   ` Vineet Gupta
2021-07-22 15:34     ` Vineet Gupta
2021-07-22 15:34     ` Vineet Gupta
2021-07-22 15:34     ` Vineet Gupta
2021-07-22 15:34     ` Vineet Gupta
2021-07-22 12:48 ` [PATCH v3 5/9] csky: " Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 13:01   ` Christoph Hellwig
2021-07-22 13:01     ` Christoph Hellwig
2021-07-22 13:01     ` Christoph Hellwig
2021-07-22 13:01     ` Christoph Hellwig
2021-07-22 12:48 ` [PATCH v3 6/9] microblaze: " Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 13:01   ` Christoph Hellwig
2021-07-22 13:01     ` Christoph Hellwig
2021-07-22 13:01     ` Christoph Hellwig
2021-07-22 13:01     ` Christoph Hellwig
2021-07-22 20:48   ` kernel test robot [this message]
2021-07-23 12:36     ` Arnd Bergmann
2021-07-23 12:36       ` Arnd Bergmann
2021-07-23 12:42       ` Christoph Hellwig
2021-07-23 12:42         ` Christoph Hellwig
2021-07-22 12:48 ` [PATCH v3 7/9] asm-generic: uaccess: remove inline strncpy_from_user/strnlen_user Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 13:02   ` Christoph Hellwig
2021-07-22 13:02     ` Christoph Hellwig
2021-07-22 13:02     ` Christoph Hellwig
2021-07-22 13:02     ` Christoph Hellwig
2021-07-22 12:48 ` [PATCH v3 8/9] asm-generic: remove extra strn{cpy_from,len}_user declarations Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 12:48   ` [PATCH v3 8/9] asm-generic: remove extra strn{cpy_from, len}_user declarations Arnd Bergmann
2021-07-22 13:02   ` [PATCH v3 8/9] asm-generic: remove extra strn{cpy_from,len}_user declarations Christoph Hellwig
2021-07-22 13:02     ` Christoph Hellwig
2021-07-22 13:02     ` Christoph Hellwig
2021-07-22 13:02     ` Christoph Hellwig
2021-07-22 12:48 ` [PATCH v3 9/9] asm-generic: reverse GENERIC_{STRNCPY_FROM,STRNLEN}_USER symbols Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 12:48   ` Arnd Bergmann
2021-07-22 12:48   ` [PATCH v3 9/9] asm-generic: reverse GENERIC_{STRNCPY_FROM, STRNLEN}_USER symbols Arnd Bergmann
2021-07-22 13:03   ` [PATCH v3 9/9] asm-generic: reverse GENERIC_{STRNCPY_FROM,STRNLEN}_USER symbols Christoph Hellwig
2021-07-22 13:03     ` Christoph Hellwig
2021-07-22 13:03     ` Christoph Hellwig
2021-07-22 13:03     ` Christoph Hellwig
2021-07-22 13:57   ` [PATCH v3 9/9] asm-generic: reverse GENERIC_{STRNCPY_FROM, STRNLEN}_USER symbols Johannes Berg
2021-07-22 13:57     ` Johannes Berg
2021-07-22 13:57     ` Johannes Berg
2021-07-22 13:57     ` Johannes Berg
2021-07-22 13:57     ` Johannes Berg
2021-07-22 14:01     ` Arnd Bergmann
2021-07-22 14:01       ` Arnd Bergmann
2021-07-22 14:01       ` Arnd Bergmann
2021-07-22 14:01       ` Arnd Bergmann
2021-07-22 14:01       ` Arnd Bergmann
2021-07-22 20:07       ` Heiko Carstens
2021-07-22 20:07         ` Heiko Carstens
2021-07-22 20:07         ` Heiko Carstens
2021-07-22 20:07         ` Heiko Carstens
2021-07-22 20:07         ` Heiko Carstens
2021-07-23 12:44         ` Arnd Bergmann
2021-07-23 12:44           ` Arnd Bergmann
2021-07-23 12:44           ` Arnd Bergmann
2021-07-23 12:44           ` Arnd Bergmann
2021-07-24  9:44   ` [PATCH v3 9/9] asm-generic: reverse GENERIC_{STRNCPY_FROM,STRNLEN}_USER symbols Geert Uytterhoeven
2021-07-24  9:44     ` Geert Uytterhoeven
2021-07-24  9:44     ` Geert Uytterhoeven
2021-07-24  9:44     ` [PATCH v3 9/9] asm-generic: reverse GENERIC_{STRNCPY_FROM, STRNLEN}_USER symbols Geert Uytterhoeven
2021-07-26  8:55   ` [PATCH v3 9/9] asm-generic: reverse GENERIC_{STRNCPY_FROM,STRNLEN}_USER symbols Helge Deller
2021-07-26  8:55     ` Helge Deller
2021-07-26  8:55     ` Helge Deller
2021-07-26  8:55     ` Helge Deller
2021-07-26  8:55     ` Helge Deller
2021-08-14  1:04 ` [PATCH v3 0/6] asm-generic: strncpy_from_user/strnlen_user cleanup Vineet Gupta
2021-08-14 11:10   ` Arnd Bergmann

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=202107230453.Cz16fInO-lkp@intel.com \
    --to=lkp@intel.com \
    --cc=kbuild-all@lists.01.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 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.