[PATCH v1 3/8] powerpc: Set user/kernel boundary at TASK_SIZE instead of PAGE_OFFSET

kernel test robot lkp at intel.com
Sat Jun 20 21:25:26 AEST 2020


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: powerpc64-randconfig-r023-20200619 (attached as .config)
compiler: powerpc64le-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
        # save the attached .config to linux build tree
        COMPILER_INSTALL_PATH=$HOME/0day COMPILER=gcc-9.3.0 make.cross ARCH=powerpc64 

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

All error/warnings (new ones prefixed by >>):

   In file included from arch/powerpc/include/asm/book3s/64/mmu-hash.h:22,
                    from arch/powerpc/include/asm/book3s/64/mmu.h:46,
                    from arch/powerpc/include/asm/mmu.h:348,
                    from arch/powerpc/include/asm/lppaca.h:47,
                    from arch/powerpc/include/asm/paca.h:17,
                    from arch/powerpc/include/asm/current.h:13,
                    from include/linux/thread_info.h:21,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/powerpc/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/compat.h:10,
                    from arch/powerpc/kernel/asm-offsets.c:14:
   arch/powerpc/include/asm/book3s/64/mmu-hash.h: In function 'get_kernel_vsid':
>> arch/powerpc/include/asm/task_size_64.h:48:3: error: implicit declaration of function 'test_tsk_thread_flag' [-Werror=implicit-function-declaration]
      48 |  (test_tsk_thread_flag(tsk, TIF_32BIT) ? TASK_SIZE_USER32 : \
         |   ^~~~~~~~~~~~~~~~~~~~
>> arch/powerpc/include/asm/task_size_64.h:51:19: note: in expansion of macro 'TASK_SIZE_OF'
      51 | #define TASK_SIZE TASK_SIZE_OF(current)
         |                   ^~~~~~~~~~~~
>> arch/powerpc/include/asm/page.h:259:35: note: in expansion of macro 'TASK_SIZE'
     259 | #define is_kernel_addr(x) ((x) >= TASK_SIZE)
         |                                   ^~~~~~~~~
>> arch/powerpc/include/asm/book3s/64/mmu-hash.h:836:7: note: in expansion of macro 'is_kernel_addr'
     836 |  if (!is_kernel_addr(ea))
         |       ^~~~~~~~~~~~~~
>> arch/powerpc/include/asm/task_size_64.h:51:32: error: 'current' undeclared (first use in this function)
      51 | #define TASK_SIZE TASK_SIZE_OF(current)
         |                                ^~~~~~~
   arch/powerpc/include/asm/task_size_64.h:48:24: note: in definition of macro 'TASK_SIZE_OF'
      48 |  (test_tsk_thread_flag(tsk, TIF_32BIT) ? TASK_SIZE_USER32 : \
         |                        ^~~
>> arch/powerpc/include/asm/page.h:259:35: note: in expansion of macro 'TASK_SIZE'
     259 | #define is_kernel_addr(x) ((x) >= TASK_SIZE)
         |                                   ^~~~~~~~~
>> arch/powerpc/include/asm/book3s/64/mmu-hash.h:836:7: note: in expansion of macro 'is_kernel_addr'
     836 |  if (!is_kernel_addr(ea))
         |       ^~~~~~~~~~~~~~
   arch/powerpc/include/asm/task_size_64.h:51:32: note: each undeclared identifier is reported only once for each function it appears in
      51 | #define TASK_SIZE TASK_SIZE_OF(current)
         |                                ^~~~~~~
   arch/powerpc/include/asm/task_size_64.h:48:24: note: in definition of macro 'TASK_SIZE_OF'
      48 |  (test_tsk_thread_flag(tsk, TIF_32BIT) ? TASK_SIZE_USER32 : \
         |                        ^~~
>> arch/powerpc/include/asm/page.h:259:35: note: in expansion of macro 'TASK_SIZE'
     259 | #define is_kernel_addr(x) ((x) >= TASK_SIZE)
         |                                   ^~~~~~~~~
>> arch/powerpc/include/asm/book3s/64/mmu-hash.h:836:7: note: in expansion of macro 'is_kernel_addr'
     836 |  if (!is_kernel_addr(ea))
         |       ^~~~~~~~~~~~~~
>> arch/powerpc/include/asm/task_size_64.h:48:29: error: 'TIF_32BIT' undeclared (first use in this function)
      48 |  (test_tsk_thread_flag(tsk, TIF_32BIT) ? TASK_SIZE_USER32 : \
         |                             ^~~~~~~~~
>> arch/powerpc/include/asm/task_size_64.h:51:19: note: in expansion of macro 'TASK_SIZE_OF'
      51 | #define TASK_SIZE TASK_SIZE_OF(current)
         |                   ^~~~~~~~~~~~
>> arch/powerpc/include/asm/page.h:259:35: note: in expansion of macro 'TASK_SIZE'
     259 | #define is_kernel_addr(x) ((x) >= TASK_SIZE)
         |                                   ^~~~~~~~~
>> arch/powerpc/include/asm/book3s/64/mmu-hash.h:836:7: note: in expansion of macro 'is_kernel_addr'
     836 |  if (!is_kernel_addr(ea))
         |       ^~~~~~~~~~~~~~
   In file included from include/linux/uaccess.h:5,
                    from include/linux/crypto.h:21,
                    from include/crypto/hash.h:11,
                    from include/linux/uio.h:10,
                    from include/linux/socket.h:8,
                    from include/linux/compat.h:15,
                    from arch/powerpc/kernel/asm-offsets.c:14:
   include/linux/sched.h: At top level:
>> include/linux/sched.h:1786:19: error: static declaration of 'test_tsk_thread_flag' follows non-static declaration
    1786 | static inline int test_tsk_thread_flag(struct task_struct *tsk, int flag)
         |                   ^~~~~~~~~~~~~~~~~~~~
   In file included from arch/powerpc/include/asm/book3s/64/mmu-hash.h:22,
                    from arch/powerpc/include/asm/book3s/64/mmu.h:46,
                    from arch/powerpc/include/asm/mmu.h:348,
                    from arch/powerpc/include/asm/lppaca.h:47,
                    from arch/powerpc/include/asm/paca.h:17,
                    from arch/powerpc/include/asm/current.h:13,
                    from include/linux/thread_info.h:21,
                    from include/asm-generic/preempt.h:5,
                    from ./arch/powerpc/include/generated/asm/preempt.h:1,
                    from include/linux/preempt.h:78,
                    from include/linux/spinlock.h:51,
                    from include/linux/seqlock.h:36,
                    from include/linux/time.h:6,
                    from include/linux/compat.h:10,
                    from arch/powerpc/kernel/asm-offsets.c:14:
   arch/powerpc/include/asm/task_size_64.h:48:3: note: previous implicit declaration of 'test_tsk_thread_flag' was here
      48 |  (test_tsk_thread_flag(tsk, TIF_32BIT) ? TASK_SIZE_USER32 : \
         |   ^~~~~~~~~~~~~~~~~~~~
>> arch/powerpc/include/asm/task_size_64.h:51:19: note: in expansion of macro 'TASK_SIZE_OF'
      51 | #define TASK_SIZE TASK_SIZE_OF(current)
         |                   ^~~~~~~~~~~~
>> arch/powerpc/include/asm/page.h:259:35: note: in expansion of macro 'TASK_SIZE'
     259 | #define is_kernel_addr(x) ((x) >= TASK_SIZE)
         |                                   ^~~~~~~~~
>> arch/powerpc/include/asm/book3s/64/mmu-hash.h:836:7: note: in expansion of macro 'is_kernel_addr'
     836 |  if (!is_kernel_addr(ea))
         |       ^~~~~~~~~~~~~~
   cc1: some warnings being treated as errors
   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 +/TASK_SIZE +259 arch/powerpc/include/asm/page.h

   251	
   252	/*
   253	 * Don't compare things with KERNELBASE or PAGE_OFFSET to test for
   254	 * "kernelness", use is_kernel_addr() - it should do what you want.
   255	 */
   256	#ifdef CONFIG_PPC_BOOK3E_64
   257	#define is_kernel_addr(x)	((x) >= 0x8000000000000000ul)
   258	#else
 > 259	#define is_kernel_addr(x)	((x) >= TASK_SIZE)
   260	#endif
   261	

---
0-DAY CI Kernel Test Service, Intel Corporation
https://lists.01.org/hyperkitty/list/kbuild-all@lists.01.org
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/gzip
Size: 34730 bytes
Desc: not available
URL: <http://lists.ozlabs.org/pipermail/linuxppc-dev/attachments/20200620/563c9827/attachment-0001.gz>


More information about the Linuxppc-dev mailing list