linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: kernel test robot <lkp@intel.com>
To: Christophe Leroy <christophe.leroy@csgroup.eu>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Paul Mackerras <paulus@samba.org>,
	Michael Ellerman <mpe@ellerman.id.au>
Cc: kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	linux-kernel@vger.kernel.org, linuxppc-dev@lists.ozlabs.org
Subject: Re: [PATCH v1 3/8] powerpc: Set user/kernel boundary at TASK_SIZE instead of PAGE_OFFSET
Date: Sat, 20 Jun 2020 19:33:17 +0800	[thread overview]
Message-ID: <202006201933.plDihGeC%lkp@intel.com> (raw)
In-Reply-To: <c634cadd3ef2c9667838c4fe2bd425a72c8fcbd5.1592578278.git.christophe.leroy@csgroup.eu>

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

Hi Christophe,

I love your patch! Yet something to improve:

[auto build test ERROR on powerpc/next]
[also build test ERROR on v5.8-rc1 next-20200618]
[If your patch is applied to the wrong git tree, kindly drop us a note.
And when submitting patch, we suggest to use  as documented in
https://git-scm.com/docs/git-format-patch]

url:    https://github.com/0day-ci/linux/commits/Christophe-Leroy/powerpc-32s-Allocate-modules-outside-of-vmalloc-space-for-STRICT_KERNEL_RWX/20200620-001346
base:   https://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux.git next
config: powerpc-randconfig-r006-20200619 (attached as .config)
compiler: clang version 11.0.0 (https://github.com/llvm/llvm-project 63700971ac9cdf198faa4a3a7c226fa579e49206)
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
        # install powerpc cross compiling tool for clang build
        # apt-get install binutils-powerpc-linux-gnu
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=powerpc 

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 >>):

   In file included from arch/powerpc/kernel/asm-offsets.c:14:
   In file included from include/linux/compat.h:10:
   In file included from include/linux/time.h:6:
   In file included from include/linux/seqlock.h:36:
   In file included from include/linux/spinlock.h:51:
   In file included from include/linux/preempt.h:78:
   In file included from ./arch/powerpc/include/generated/asm/preempt.h:1:
   In file included from include/asm-generic/preempt.h:5:
   In file included from include/linux/thread_info.h:21:
   In file included from arch/powerpc/include/asm/current.h:13:
   In file included from arch/powerpc/include/asm/paca.h:17:
   In file included from arch/powerpc/include/asm/lppaca.h:47:
   In file included from arch/powerpc/include/asm/mmu.h:348:
   In file included from arch/powerpc/include/asm/book3s/64/mmu.h:46:
>> arch/powerpc/include/asm/book3s/64/mmu-hash.h:836:7: error: implicit declaration of function 'test_tsk_thread_flag' [-Werror,-Wimplicit-function-declaration]
           if (!is_kernel_addr(ea))
                ^
   arch/powerpc/include/asm/page.h:259:35: note: expanded from macro 'is_kernel_addr'
   #define is_kernel_addr(x)       ((x) >= TASK_SIZE)
                                           ^
   arch/powerpc/include/asm/task_size_64.h:51:19: note: expanded from macro 'TASK_SIZE'
   #define TASK_SIZE TASK_SIZE_OF(current)
                     ^
   arch/powerpc/include/asm/task_size_64.h:48:3: note: expanded from macro 'TASK_SIZE_OF'
           (test_tsk_thread_flag(tsk, TIF_32BIT) ? TASK_SIZE_USER32 :      \
            ^
   In file included from arch/powerpc/kernel/asm-offsets.c:14:
   In file included from include/linux/compat.h:10:
   In file included from include/linux/time.h:6:
   In file included from include/linux/seqlock.h:36:
   In file included from include/linux/spinlock.h:51:
   In file included from include/linux/preempt.h:78:
   In file included from ./arch/powerpc/include/generated/asm/preempt.h:1:
   In file included from include/asm-generic/preempt.h:5:
   In file included from include/linux/thread_info.h:21:
   In file included from arch/powerpc/include/asm/current.h:13:
   In file included from arch/powerpc/include/asm/paca.h:17:
   In file included from arch/powerpc/include/asm/lppaca.h:47:
   In file included from arch/powerpc/include/asm/mmu.h:348:
   In file included from arch/powerpc/include/asm/book3s/64/mmu.h:46:
>> arch/powerpc/include/asm/book3s/64/mmu-hash.h:836:7: error: use of undeclared identifier 'current'
   arch/powerpc/include/asm/page.h:259:35: note: expanded from macro 'is_kernel_addr'
   #define is_kernel_addr(x)       ((x) >= TASK_SIZE)
                                           ^
   arch/powerpc/include/asm/task_size_64.h:51:32: note: expanded from macro 'TASK_SIZE'
   #define TASK_SIZE TASK_SIZE_OF(current)
                                  ^
   In file included from arch/powerpc/kernel/asm-offsets.c:14:
   In file included from include/linux/compat.h:10:
   In file included from include/linux/time.h:6:
   In file included from include/linux/seqlock.h:36:
   In file included from include/linux/spinlock.h:51:
   In file included from include/linux/preempt.h:78:
   In file included from ./arch/powerpc/include/generated/asm/preempt.h:1:
   In file included from include/asm-generic/preempt.h:5:
   In file included from include/linux/thread_info.h:21:
   In file included from arch/powerpc/include/asm/current.h:13:
   In file included from arch/powerpc/include/asm/paca.h:17:
   In file included from arch/powerpc/include/asm/lppaca.h:47:
   In file included from arch/powerpc/include/asm/mmu.h:348:
   In file included from arch/powerpc/include/asm/book3s/64/mmu.h:46:
>> arch/powerpc/include/asm/book3s/64/mmu-hash.h:836:7: error: use of undeclared identifier 'TIF_32BIT'
   arch/powerpc/include/asm/page.h:259:35: note: expanded from macro 'is_kernel_addr'
   #define is_kernel_addr(x)       ((x) >= TASK_SIZE)
                                           ^
   arch/powerpc/include/asm/task_size_64.h:51:19: note: expanded from macro 'TASK_SIZE'
   #define TASK_SIZE TASK_SIZE_OF(current)
                     ^
   arch/powerpc/include/asm/task_size_64.h:48:29: note: expanded from macro 'TASK_SIZE_OF'
           (test_tsk_thread_flag(tsk, TIF_32BIT) ? TASK_SIZE_USER32 :      \
                                      ^
   In file included from arch/powerpc/kernel/asm-offsets.c:14:
   In file included from include/linux/compat.h:15:
   In file included from include/linux/socket.h:8:
   In file included from include/linux/uio.h:10:
   In file included from include/crypto/hash.h:11:
   In file included from include/linux/crypto.h:21:
   In file included from include/linux/uaccess.h:5:
>> include/linux/sched.h:1786:19: error: static declaration of 'test_tsk_thread_flag' follows non-static declaration
   static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag)
                     ^
   arch/powerpc/include/asm/book3s/64/mmu-hash.h:836:7: note: previous implicit declaration is here
           if (!is_kernel_addr(ea))
                ^
   arch/powerpc/include/asm/page.h:259:35: note: expanded from macro 'is_kernel_addr'
   #define is_kernel_addr(x)       ((x) >= TASK_SIZE)
                                           ^
   arch/powerpc/include/asm/task_size_64.h:51:19: note: expanded from macro 'TASK_SIZE'
   #define TASK_SIZE TASK_SIZE_OF(current)
                     ^
   arch/powerpc/include/asm/task_size_64.h:48:3: note: expanded from macro 'TASK_SIZE_OF'
           (test_tsk_thread_flag(tsk, TIF_32BIT) ? TASK_SIZE_USER32 :      \
            ^
   In file included from arch/powerpc/kernel/asm-offsets.c:21:
   include/linux/mman.h:133:9: warning: division by zero is undefined [-Wdivision-by-zero]
                  _calc_vm_trans(flags, MAP_LOCKED,     VM_LOCKED    ) |
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mman.h:111:21: note: expanded from macro '_calc_vm_trans'
      : ((x) & (bit1)) / ((bit1) / (bit2))))
                       ^ ~~~~~~~~~~~~~~~~~
   include/linux/mman.h:134:9: warning: division by zero is undefined [-Wdivision-by-zero]
                  _calc_vm_trans(flags, MAP_SYNC,       VM_SYNC      );
                  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   include/linux/mman.h:111:21: note: expanded from macro '_calc_vm_trans'
      : ((x) & (bit1)) / ((bit1) / (bit2))))
                       ^ ~~~~~~~~~~~~~~~~~
   2 warnings and 4 errors generated.
   make[2]: *** [scripts/Makefile.build:114: arch/powerpc/kernel/asm-offsets.s] Error 1
   make[2]: Target '__build' not remade because of errors.
   make[1]: *** [Makefile:1188: prepare0] Error 2
   make[1]: Target 'prepare' not remade because of errors.
   make: *** [Makefile:185: __sub-make] Error 2
   make: Target 'prepare' not remade because of errors.

vim +/test_tsk_thread_flag +836 arch/powerpc/include/asm/book3s/64/mmu-hash.h

4ffe713b7587b1 arch/powerpc/include/asm/book3s/64/mmu-hash.h Aneesh Kumar K.V 2018-09-20  828  
c60ac5693c47df arch/powerpc/include/asm/mmu-hash64.h         Aneesh Kumar K.V 2013-03-13  829  /*
c60ac5693c47df arch/powerpc/include/asm/mmu-hash64.h         Aneesh Kumar K.V 2013-03-13  830   * This is only valid for addresses >= PAGE_OFFSET
c60ac5693c47df arch/powerpc/include/asm/mmu-hash64.h         Aneesh Kumar K.V 2013-03-13  831   */
c60ac5693c47df arch/powerpc/include/asm/mmu-hash64.h         Aneesh Kumar K.V 2013-03-13  832  static inline unsigned long get_kernel_vsid(unsigned long ea, int ssize)
c60ac5693c47df arch/powerpc/include/asm/mmu-hash64.h         Aneesh Kumar K.V 2013-03-13  833  {
c60ac5693c47df arch/powerpc/include/asm/mmu-hash64.h         Aneesh Kumar K.V 2013-03-13  834  	unsigned long context;
c60ac5693c47df arch/powerpc/include/asm/mmu-hash64.h         Aneesh Kumar K.V 2013-03-13  835  
85beb1c486df76 arch/powerpc/include/asm/book3s/64/mmu-hash.h Michael Ellerman 2017-03-29 @836  	if (!is_kernel_addr(ea))
85beb1c486df76 arch/powerpc/include/asm/book3s/64/mmu-hash.h Michael Ellerman 2017-03-29  837  		return 0;
85beb1c486df76 arch/powerpc/include/asm/book3s/64/mmu-hash.h Michael Ellerman 2017-03-29  838  
4ffe713b7587b1 arch/powerpc/include/asm/book3s/64/mmu-hash.h Aneesh Kumar K.V 2018-09-20  839  	context = get_kernel_context(ea);
c60ac5693c47df arch/powerpc/include/asm/mmu-hash64.h         Aneesh Kumar K.V 2013-03-13  840  	return get_vsid(context, ea, ssize);
c60ac5693c47df arch/powerpc/include/asm/mmu-hash64.h         Aneesh Kumar K.V 2013-03-13  841  }
5c3c7ede2bdcb8 arch/powerpc/include/asm/mmu-hash64.h         David Gibson     2016-02-09  842  

---
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: 37346 bytes --]

  parent reply	other threads:[~2020-06-20 12:01 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-19 15:06 [PATCH v1 0/8] powerpc/32s: Allocate modules outside of vmalloc space for STRICT_KERNEL_RWX Christophe Leroy
2020-06-19 15:06 ` [PATCH v1 1/8] powerpc/ptdump: Refactor update of st->last_pa Christophe Leroy
2020-06-19 15:06 ` [PATCH v1 2/8] powerpc/ptdump: Refactor update of pg_state Christophe Leroy
2020-06-19 15:06 ` [PATCH v1 3/8] powerpc: Set user/kernel boundary at TASK_SIZE instead of PAGE_OFFSET Christophe Leroy
2020-06-20 11:25   ` kernel test robot
2020-06-20 11:33   ` kernel test robot [this message]
2020-06-19 15:06 ` [PATCH v1 4/8] powerpc/lib: Prepare code-patching for modules allocated outside vmalloc space Christophe Leroy
2020-06-19 15:06 ` [PATCH v1 5/8] powerpc: Use MODULES_VADDR if defined Christophe Leroy
2020-06-19 15:06 ` [PATCH v1 6/8] powerpc/32s: Only leave NX unset on segments used for modules Christophe Leroy
2020-06-19 15:06 ` [PATCH v1 7/8] powerpc/32s: Kernel space starts at TASK_SIZE Christophe Leroy
2020-06-19 15:06 ` [PATCH v1 8/8] powerpc/32s: Use dedicated segment for modules with STRICT_KERNEL_RWX Christophe Leroy

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=202006201933.plDihGeC%lkp@intel.com \
    --to=lkp@intel.com \
    --cc=benh@kernel.crashing.org \
    --cc=christophe.leroy@csgroup.eu \
    --cc=clang-built-linux@googlegroups.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mpe@ellerman.id.au \
    --cc=paulus@samba.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;
as well as URLs for NNTP newsgroup(s).