mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: kbuild test robot <lkp@intel.com>
To: Masami Hiramatsu <mhiramat@kernel.org>
Cc: kbuild-all@01.org, Steven Rostedt <rostedt@goodmis.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	mhiramat@kernel.org, linux-kernel@vger.kernel.org,
	Andy Lutomirski <luto@amacapital.net>,
	Ingo Molnar <mingo@kernel.org>,
	Andrew Morton <akpm@linux-foundation.org>,
	Changbin Du <changbin.du@gmail.com>, Jann Horn <jannh@google.com>,
	Kees Cook <keescook@chromium.org>,
	Andy Lutomirski <luto@kernel.org>,
	Alexei Starovoitov <alexei.starovoitov@gmail.com>,
	Nadav Amit <namit@vmware.com>,
	Peter Zijlstra <peterz@infradead.org>,
	Joel Fernandes <joel@joelfernandes.org>
Subject: Re: [PATCH v4 2/6] uaccess: Use user_access_ok() in user_access_begin()
Date: Sun, 3 Mar 2019 20:48:09 +0800	[thread overview]
Message-ID: <201903032015.d0foJyBR%fengguang.wu@intel.com> (raw)
In-Reply-To: <155135706227.438.3395927496953086242.stgit@devbox>

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

Hi Masami,

I love your patch! Yet something to improve:

[auto build test ERROR on tip/perf/core]
[also build test ERROR on v5.0-rc8 next-20190301]
[if your patch is applied to the wrong git tree, please drop us a note to help improve the system]

url:    https://github.com/0day-ci/linux/commits/Masami-Hiramatsu/tracing-probes-uaccess-Add-support-user-space-access/20190303-150015
config: riscv-defconfig (attached as .config)
compiler: riscv64-linux-gcc (GCC) 8.2.0
reproduce:
        wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross
        chmod +x ~/bin/make.cross
        # save the attached .config to linux build tree
        GCC_VERSION=8.2.0 make.cross ARCH=riscv 

All errors (new ones prefixed by >>):

   In file included from arch/riscv/include/asm/bug.h:75,
                    from include/linux/bug.h:5,
                    from include/linux/thread_info.h:12,
                    from lib/strncpy_from_user.c:5:
   lib/strncpy_from_user.c: In function 'strncpy_from_user':
>> arch/riscv/include/asm/uaccess.h:42:19: error: 'TASK_SIZE' undeclared (first use in this function); did you mean 'TASK_SIZE_OF'?
    #define USER_DS  (TASK_SIZE)
                      ^~~~~~~~~
   include/asm-generic/bug.h:148:27: note: in definition of macro 'WARN_ON_ONCE'
     int __ret_warn_once = !!(condition);   \
                              ^~~~~~~~~
   include/linux/uaccess.h:26:16: note: in expansion of macro 'segment_eq'
     WARN_ON_ONCE(!segment_eq(get_fs(), USER_DS));   \
                   ^~~~~~~~~~
   include/linux/uaccess.h:26:37: note: in expansion of macro 'USER_DS'
     WARN_ON_ONCE(!segment_eq(get_fs(), USER_DS));   \
                                        ^~~~~~~
   include/linux/uaccess.h:285:37: note: in expansion of macro 'user_access_ok'
    #define user_access_begin(ptr, len) user_access_ok(ptr, len)
                                        ^~~~~~~~~~~~~~
   lib/strncpy_from_user.c:117:7: note: in expansion of macro 'user_access_begin'
      if (user_access_begin(src, max)) {
          ^~~~~~~~~~~~~~~~~
   arch/riscv/include/asm/uaccess.h:42:19: note: each undeclared identifier is reported only once for each function it appears in
    #define USER_DS  (TASK_SIZE)
                      ^~~~~~~~~
   include/asm-generic/bug.h:148:27: note: in definition of macro 'WARN_ON_ONCE'
     int __ret_warn_once = !!(condition);   \
                              ^~~~~~~~~
   include/linux/uaccess.h:26:16: note: in expansion of macro 'segment_eq'
     WARN_ON_ONCE(!segment_eq(get_fs(), USER_DS));   \
                   ^~~~~~~~~~
   include/linux/uaccess.h:26:37: note: in expansion of macro 'USER_DS'
     WARN_ON_ONCE(!segment_eq(get_fs(), USER_DS));   \
                                        ^~~~~~~
   include/linux/uaccess.h:285:37: note: in expansion of macro 'user_access_ok'
    #define user_access_begin(ptr, len) user_access_ok(ptr, len)
                                        ^~~~~~~~~~~~~~
   lib/strncpy_from_user.c:117:7: note: in expansion of macro 'user_access_begin'
      if (user_access_begin(src, max)) {
          ^~~~~~~~~~~~~~~~~
--
   In file included from arch/riscv/include/asm/bug.h:75,
                    from include/linux/bug.h:5,
                    from arch/riscv/include/asm/current.h:21,
                    from include/linux/sched.h:12,
                    from include/linux/uaccess.h:5,
                    from lib/strnlen_user.c:4:
   lib/strnlen_user.c: In function 'strnlen_user':
>> arch/riscv/include/asm/uaccess.h:42:19: error: 'TASK_SIZE' undeclared (first use in this function); did you mean 'TASK_SIZE_OF'?
    #define USER_DS  (TASK_SIZE)
                      ^~~~~~~~~
   include/asm-generic/bug.h:148:27: note: in definition of macro 'WARN_ON_ONCE'
     int __ret_warn_once = !!(condition);   \
                              ^~~~~~~~~
   include/linux/uaccess.h:26:16: note: in expansion of macro 'segment_eq'
     WARN_ON_ONCE(!segment_eq(get_fs(), USER_DS));   \
                   ^~~~~~~~~~
   include/linux/uaccess.h:26:37: note: in expansion of macro 'USER_DS'
     WARN_ON_ONCE(!segment_eq(get_fs(), USER_DS));   \
                                        ^~~~~~~
   include/linux/uaccess.h:285:37: note: in expansion of macro 'user_access_ok'
    #define user_access_begin(ptr, len) user_access_ok(ptr, len)
                                        ^~~~~~~~~~~~~~
   lib/strnlen_user.c:117:7: note: in expansion of macro 'user_access_begin'
      if (user_access_begin(str, max)) {
          ^~~~~~~~~~~~~~~~~
   arch/riscv/include/asm/uaccess.h:42:19: note: each undeclared identifier is reported only once for each function it appears in
    #define USER_DS  (TASK_SIZE)
                      ^~~~~~~~~
   include/asm-generic/bug.h:148:27: note: in definition of macro 'WARN_ON_ONCE'
     int __ret_warn_once = !!(condition);   \
                              ^~~~~~~~~
   include/linux/uaccess.h:26:16: note: in expansion of macro 'segment_eq'
     WARN_ON_ONCE(!segment_eq(get_fs(), USER_DS));   \
                   ^~~~~~~~~~
   include/linux/uaccess.h:26:37: note: in expansion of macro 'USER_DS'
     WARN_ON_ONCE(!segment_eq(get_fs(), USER_DS));   \
                                        ^~~~~~~
   include/linux/uaccess.h:285:37: note: in expansion of macro 'user_access_ok'
    #define user_access_begin(ptr, len) user_access_ok(ptr, len)
                                        ^~~~~~~~~~~~~~
   lib/strnlen_user.c:117:7: note: in expansion of macro 'user_access_begin'
      if (user_access_begin(str, max)) {
          ^~~~~~~~~~~~~~~~~

vim +42 arch/riscv/include/asm/uaccess.h

5d8544e2 Palmer Dabbelt 2017-07-10  27  
5d8544e2 Palmer Dabbelt 2017-07-10  28  #define __enable_user_access()							\
5d8544e2 Palmer Dabbelt 2017-07-10  29  	__asm__ __volatile__ ("csrs sstatus, %0" : : "r" (SR_SUM) : "memory")
5d8544e2 Palmer Dabbelt 2017-07-10  30  #define __disable_user_access()							\
5d8544e2 Palmer Dabbelt 2017-07-10  31  	__asm__ __volatile__ ("csrc sstatus, %0" : : "r" (SR_SUM) : "memory")
5d8544e2 Palmer Dabbelt 2017-07-10  32  
5d8544e2 Palmer Dabbelt 2017-07-10  33  /*
5d8544e2 Palmer Dabbelt 2017-07-10  34   * The fs value determines whether argument validity checking should be
5d8544e2 Palmer Dabbelt 2017-07-10  35   * performed or not.  If get_fs() == USER_DS, checking is performed, with
5d8544e2 Palmer Dabbelt 2017-07-10  36   * get_fs() == KERNEL_DS, checking is bypassed.
5d8544e2 Palmer Dabbelt 2017-07-10  37   *
5d8544e2 Palmer Dabbelt 2017-07-10  38   * For historical reasons, these macros are grossly misnamed.
5d8544e2 Palmer Dabbelt 2017-07-10  39   */
5d8544e2 Palmer Dabbelt 2017-07-10  40  
5d8544e2 Palmer Dabbelt 2017-07-10  41  #define KERNEL_DS	(~0UL)
5d8544e2 Palmer Dabbelt 2017-07-10 @42  #define USER_DS		(TASK_SIZE)
5d8544e2 Palmer Dabbelt 2017-07-10  43  

:::::: The code at line 42 was first introduced by commit
:::::: 5d8544e2d0075a5f3c9a2cf27152354d54360da1 RISC-V: Generic library routines and assembly

:::::: TO: Palmer Dabbelt <palmer@dabbelt.com>
:::::: CC: Palmer Dabbelt <palmer@dabbelt.com>

---
0-DAY kernel test infrastructure                Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all                   Intel Corporation

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

  reply	other threads:[~2019-03-03 12:49 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-02-28 12:30 [PATCH v4 0/6] tracing/probes: uaccess: Add support user-space access Masami Hiramatsu
2019-02-28 12:30 ` [PATCH v4 1/6] uaccess: Add user_access_ok() Masami Hiramatsu
2019-02-28 12:31 ` [PATCH v4 2/6] uaccess: Use user_access_ok() in user_access_begin() Masami Hiramatsu
2019-03-03 12:48   ` kbuild test robot [this message]
2019-02-28 12:31 ` [PATCH v4 3/6] uaccess: Add non-pagefault user-space read functions Masami Hiramatsu
2019-02-28 12:32 ` [PATCH v4 4/6] tracing/probe: Add ustring type for user-space string Masami Hiramatsu
2019-02-28 12:32 ` [PATCH v4 5/6] tracing/probe: Support user-space dereference Masami Hiramatsu
2019-02-28 12:33 ` [PATCH v4 6/6] selftests/ftrace: Add user-memory access syntax testcase Masami Hiramatsu
2019-02-28 15:12   ` Masami Hiramatsu

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=201903032015.d0foJyBR%fengguang.wu@intel.com \
    --to=lkp@intel.com \
    --cc=akpm@linux-foundation.org \
    --cc=alexei.starovoitov@gmail.com \
    --cc=changbin.du@gmail.com \
    --cc=jannh@google.com \
    --cc=joel@joelfernandes.org \
    --cc=kbuild-all@01.org \
    --cc=keescook@chromium.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=luto@amacapital.net \
    --cc=luto@kernel.org \
    --cc=mhiramat@kernel.org \
    --cc=mingo@kernel.org \
    --cc=namit@vmware.com \
    --cc=peterz@infradead.org \
    --cc=rostedt@goodmis.org \
    --cc=torvalds@linux-foundation.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®