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: <202106140815.VmX1a59K-lkp@intel.com>
Date:   Mon, 14 Jun 2021 08:29:20 +0800
From:   kernel test robot <lkp@...el.com>
To:     Ingo Molnar <mingo@...nel.org>
Cc:     kbuild-all@...ts.01.org, linux-kernel@...r.kernel.org,
        x86@...nel.org
Subject: [tip:tmp.tmp2 306/364] include/linux/sched/per_task.h:58:84: error:
 dereferencing pointer to incomplete type 'struct task_struct'

tree:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git tmp.tmp2
head:   adcceb5eb7aee38e4a9c15bdf599655f0e1b1324
commit: 1cff92601f676592d29e12546cb17fac9c0d78ca [306/364] sched/headers, mm/highmem: Remove <linux/fs.h> inclusion from <linux/highmem.h>
config: i386-defconfig (attached as .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/tip/tip.git/commit/?id=1cff92601f676592d29e12546cb17fac9c0d78ca
        git remote add tip https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git
        git fetch --no-tags tip tmp.tmp2
        git checkout 1cff92601f676592d29e12546cb17fac9c0d78ca
        # save the attached .config to linux build tree
        make W=1 ARCH=i386 

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

   In file included from include/linux/export.h:43,
                    from lib/scatterlist.c:7:
   include/linux/highmem-internal.h: In function 'kmap_assert_nomap':
>> include/linux/sched/per_task.h:58:84: error: dereferencing pointer to incomplete type 'struct task_struct'
      58 | #define per_task(task, name)   (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
         |                                                                                    ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/highmem-internal.h:27:2: note: in expansion of macro 'DEBUG_LOCKS_WARN_ON'
      27 |  DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/sched/per_task.h:58:34: note: in expansion of macro 'RELOC_HIDE'
      58 | #define per_task(task, name)   (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
         |                                  ^~~~~~~~~~
   include/linux/highmem-internal.h:27:22: note: in expansion of macro 'per_task'
      27 |  DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
         |                      ^~~~~~~~
   In file included from include/linux/uaccess.h:11,
                    from arch/x86/include/asm/fpu/xstate.h:5,
                    from arch/x86/include/asm/pgtable.h:26,
                    from include/linux/pgtable.h:6,
                    from include/linux/mm.h:35,
                    from include/linux/scatterlist.h:8,
                    from lib/scatterlist.c:9:
   lib/scatterlist.c: At top level:
   arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
      46 | static inline bool pagefault_disabled(void);
         |                    ^~~~~~~~~~~~~~~~~~
--
   In file included from include/linux/export.h:43,
                    from include/linux/linkage.h:7,
                    from include/linux/printk.h:8,
                    from include/linux/kernel.h:7,
                    from include/linux/highmem.h:5,
                    from include/linux/bio.h:8,
                    from drivers/md/dm-bio-record.h:10,
                    from drivers/md/dm-raid1.c:8:
   include/linux/highmem-internal.h: In function 'kmap_assert_nomap':
>> include/linux/sched/per_task.h:58:84: error: dereferencing pointer to incomplete type 'struct task_struct'
      58 | #define per_task(task, name)   (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
         |                                                                                    ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/highmem-internal.h:27:2: note: in expansion of macro 'DEBUG_LOCKS_WARN_ON'
      27 |  DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/sched/per_task.h:58:34: note: in expansion of macro 'RELOC_HIDE'
      58 | #define per_task(task, name)   (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
         |                                  ^~~~~~~~~~
   include/linux/highmem-internal.h:27:22: note: in expansion of macro 'per_task'
      27 |  DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
         |                      ^~~~~~~~
   In file included from include/linux/uaccess.h:11,
                    from arch/x86/include/asm/fpu/xstate.h:5,
                    from arch/x86/include/asm/pgtable.h:26,
                    from include/linux/pgtable.h:6,
                    from include/linux/mm.h:35,
                    from include/linux/highmem.h:7,
                    from include/linux/bio.h:8,
                    from drivers/md/dm-bio-record.h:10,
                    from drivers/md/dm-raid1.c:8:
   drivers/md/dm-raid1.c: At top level:
   arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
      46 | static inline bool pagefault_disabled(void);
         |                    ^~~~~~~~~~~~~~~~~~
--
   In file included from include/linux/export.h:43,
                    from include/linux/linkage.h:7,
                    from include/linux/printk.h:8,
                    from include/linux/kernel.h:7,
                    from include/linux/highmem.h:5,
                    from include/linux/bio.h:8,
                    from include/linux/device-mapper.h:11,
                    from include/linux/dm-dirty-log.h:16,
                    from drivers/md/dm-region-hash.c:8:
   include/linux/highmem-internal.h: In function 'kmap_assert_nomap':
>> include/linux/sched/per_task.h:58:84: error: dereferencing pointer to incomplete type 'struct task_struct'
      58 | #define per_task(task, name)   (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
         |                                                                                    ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/highmem-internal.h:27:2: note: in expansion of macro 'DEBUG_LOCKS_WARN_ON'
      27 |  DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/sched/per_task.h:58:34: note: in expansion of macro 'RELOC_HIDE'
      58 | #define per_task(task, name)   (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
         |                                  ^~~~~~~~~~
   include/linux/highmem-internal.h:27:22: note: in expansion of macro 'per_task'
      27 |  DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
         |                      ^~~~~~~~
   In file included from include/linux/uaccess.h:11,
                    from arch/x86/include/asm/fpu/xstate.h:5,
                    from arch/x86/include/asm/pgtable.h:26,
                    from include/linux/pgtable.h:6,
                    from include/linux/mm.h:35,
                    from include/linux/highmem.h:7,
                    from include/linux/bio.h:8,
                    from include/linux/device-mapper.h:11,
                    from include/linux/dm-dirty-log.h:16,
                    from drivers/md/dm-region-hash.c:8:
   drivers/md/dm-region-hash.c: At top level:
   arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
      46 | static inline bool pagefault_disabled(void);
         |                    ^~~~~~~~~~~~~~~~~~
--
   In file included from include/linux/export.h:43,
                    from include/linux/linkage.h:7,
                    from include/linux/printk.h:8,
                    from include/linux/kernel.h:7,
                    from include/linux/highmem.h:5,
                    from include/linux/bio.h:8,
                    from include/linux/device-mapper.h:11,
                    from drivers/md/dm-zero.c:7:
   include/linux/highmem-internal.h: In function 'kmap_assert_nomap':
>> include/linux/sched/per_task.h:58:84: error: dereferencing pointer to incomplete type 'struct task_struct'
      58 | #define per_task(task, name)   (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
         |                                                                                    ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/highmem-internal.h:27:2: note: in expansion of macro 'DEBUG_LOCKS_WARN_ON'
      27 |  DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/sched/per_task.h:58:34: note: in expansion of macro 'RELOC_HIDE'
      58 | #define per_task(task, name)   (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
         |                                  ^~~~~~~~~~
   include/linux/highmem-internal.h:27:22: note: in expansion of macro 'per_task'
      27 |  DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
         |                      ^~~~~~~~
   In file included from include/linux/uaccess.h:11,
                    from arch/x86/include/asm/fpu/xstate.h:5,
                    from arch/x86/include/asm/pgtable.h:26,
                    from include/linux/pgtable.h:6,
                    from include/linux/mm.h:35,
                    from include/linux/highmem.h:7,
                    from include/linux/bio.h:8,
                    from include/linux/device-mapper.h:11,
                    from drivers/md/dm-zero.c:7:
   drivers/md/dm-zero.c: At top level:
   arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
      46 | static inline bool pagefault_disabled(void);
         |                    ^~~~~~~~~~~~~~~~~~
--
   In file included from include/linux/export.h:43,
                    from include/linux/linkage.h:7,
                    from include/linux/preempt.h:12,
                    from include/linux/spinlock.h:53,
                    from include/linux/mmzone.h:8,
                    from include/linux/gfp.h:8,
                    from include/linux/slab.h:15,
                    from drivers/firmware/efi/capsule.c:10:
   include/linux/highmem-internal.h: In function 'kmap_assert_nomap':
>> include/linux/sched/per_task.h:58:84: error: dereferencing pointer to incomplete type 'struct task_struct'
      58 | #define per_task(task, name)   (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
         |                                                                                    ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/highmem-internal.h:27:2: note: in expansion of macro 'DEBUG_LOCKS_WARN_ON'
      27 |  DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/sched/per_task.h:58:34: note: in expansion of macro 'RELOC_HIDE'
      58 | #define per_task(task, name)   (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
         |                                  ^~~~~~~~~~
   include/linux/highmem-internal.h:27:22: note: in expansion of macro 'per_task'
      27 |  DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
         |                      ^~~~~~~~
   In file included from include/linux/uaccess.h:11,
                    from arch/x86/include/asm/fpu/xstate.h:5,
                    from arch/x86/include/asm/pgtable.h:26,
                    from include/linux/pgtable.h:6,
                    from include/linux/mm.h:35,
                    from include/linux/highmem.h:7,
                    from drivers/firmware/efi/capsule.c:12:
   drivers/firmware/efi/capsule.c: At top level:
   arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
      46 | static inline bool pagefault_disabled(void);
         |                    ^~~~~~~~~~~~~~~~~~
--
   In file included from arch/x86/include/asm/atomic.h:5,
                    from include/linux/atomic.h:10,
                    from include/linux/crypto.h:15,
                    from include/crypto/aead.h:11,
                    from include/crypto/internal/aead.h:11,
                    from crypto/ccm.c:8:
   include/linux/highmem-internal.h: In function 'kmap_assert_nomap':
>> include/linux/sched/per_task.h:58:84: error: dereferencing pointer to incomplete type 'struct task_struct'
      58 | #define per_task(task, name)   (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
         |                                                                                    ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/highmem-internal.h:27:2: note: in expansion of macro 'DEBUG_LOCKS_WARN_ON'
      27 |  DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/sched/per_task.h:58:34: note: in expansion of macro 'RELOC_HIDE'
      58 | #define per_task(task, name)   (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
         |                                  ^~~~~~~~~~
   include/linux/highmem-internal.h:27:22: note: in expansion of macro 'per_task'
      27 |  DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
         |                      ^~~~~~~~
   In file included from include/linux/uaccess.h:11,
                    from arch/x86/include/asm/fpu/xstate.h:5,
                    from arch/x86/include/asm/pgtable.h:26,
                    from include/linux/pgtable.h:6,
                    from include/linux/mm.h:35,
                    from include/linux/highmem.h:7,
                    from include/crypto/scatterwalk.h:15,
                    from crypto/ccm.c:12:
   crypto/ccm.c: At top level:
   arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
      46 | static inline bool pagefault_disabled(void);
         |                    ^~~~~~~~~~~~~~~~~~
--
   In file included from arch/x86/include/asm/atomic.h:5,
                    from include/linux/atomic.h:10,
                    from include/linux/crypto.h:15,
                    from include/crypto/aead.h:11,
                    from include/crypto/internal/aead.h:11,
                    from crypto/authenc.c:8:
   include/linux/highmem-internal.h: In function 'kmap_assert_nomap':
>> include/linux/sched/per_task.h:58:84: error: dereferencing pointer to incomplete type 'struct task_struct'
      58 | #define per_task(task, name)   (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
         |                                                                                    ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/highmem-internal.h:27:2: note: in expansion of macro 'DEBUG_LOCKS_WARN_ON'
      27 |  DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/sched/per_task.h:58:34: note: in expansion of macro 'RELOC_HIDE'
      58 | #define per_task(task, name)   (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
         |                                  ^~~~~~~~~~
   include/linux/highmem-internal.h:27:22: note: in expansion of macro 'per_task'
      27 |  DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
         |                      ^~~~~~~~
   In file included from include/linux/uaccess.h:11,
                    from arch/x86/include/asm/fpu/xstate.h:5,
                    from arch/x86/include/asm/pgtable.h:26,
                    from include/linux/pgtable.h:6,
                    from include/linux/mm.h:35,
                    from include/linux/highmem.h:7,
                    from include/crypto/scatterwalk.h:15,
                    from crypto/authenc.c:13:
   crypto/authenc.c: At top level:
   arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
      46 | static inline bool pagefault_disabled(void);
         |                    ^~~~~~~~~~~~~~~~~~
--
   In file included from arch/x86/include/asm/atomic.h:5,
                    from include/linux/atomic.h:10,
                    from include/linux/crypto.h:15,
                    from include/crypto/aead.h:11,
                    from include/crypto/internal/aead.h:11,
                    from crypto/authencesn.c:11:
   include/linux/highmem-internal.h: In function 'kmap_assert_nomap':
>> include/linux/sched/per_task.h:58:84: error: dereferencing pointer to incomplete type 'struct task_struct'
      58 | #define per_task(task, name)   (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
         |                                                                                    ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/highmem-internal.h:27:2: note: in expansion of macro 'DEBUG_LOCKS_WARN_ON'
      27 |  DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/sched/per_task.h:58:34: note: in expansion of macro 'RELOC_HIDE'
      58 | #define per_task(task, name)   (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
         |                                  ^~~~~~~~~~
   include/linux/highmem-internal.h:27:22: note: in expansion of macro 'per_task'
      27 |  DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
         |                      ^~~~~~~~
   In file included from include/linux/uaccess.h:11,
                    from arch/x86/include/asm/fpu/xstate.h:5,
                    from arch/x86/include/asm/pgtable.h:26,
                    from include/linux/pgtable.h:6,
                    from include/linux/mm.h:35,
                    from include/linux/highmem.h:7,
                    from include/crypto/scatterwalk.h:15,
                    from crypto/authencesn.c:16:
   crypto/authencesn.c: At top level:
   arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
      46 | static inline bool pagefault_disabled(void);
         |                    ^~~~~~~~~~~~~~~~~~
--
   In file included from arch/x86/include/asm/atomic.h:5,
                    from include/linux/atomic.h:10,
                    from include/linux/crypto.h:15,
                    from include/crypto/algapi.h:10,
                    from include/crypto/scatterwalk.h:14,
                    from crypto/scatterwalk.c:12:
   include/linux/highmem-internal.h: In function 'kmap_assert_nomap':
>> include/linux/sched/per_task.h:58:84: error: dereferencing pointer to incomplete type 'struct task_struct'
      58 | #define per_task(task, name)   (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
         |                                                                                    ^~
   include/linux/compiler.h:78:42: note: in definition of macro 'unlikely'
      78 | # define unlikely(x) __builtin_expect(!!(x), 0)
         |                                          ^
   include/linux/highmem-internal.h:27:2: note: in expansion of macro 'DEBUG_LOCKS_WARN_ON'
      27 |  DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
         |  ^~~~~~~~~~~~~~~~~~~
   include/linux/sched/per_task.h:58:34: note: in expansion of macro 'RELOC_HIDE'
      58 | #define per_task(task, name)   (*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
         |                                  ^~~~~~~~~~
   include/linux/highmem-internal.h:27:22: note: in expansion of macro 'per_task'
      27 |  DEBUG_LOCKS_WARN_ON(per_task(current, kmap_ctrl).idx);
         |                      ^~~~~~~~
   In file included from include/linux/uaccess.h:11,
                    from arch/x86/include/asm/fpu/xstate.h:5,
                    from arch/x86/include/asm/pgtable.h:26,
                    from include/linux/pgtable.h:6,
                    from include/linux/mm.h:35,
                    from include/linux/highmem.h:7,
                    from include/crypto/scatterwalk.h:15,
                    from crypto/scatterwalk.c:12:
   crypto/scatterwalk.c: At top level:
   arch/x86/include/asm/uaccess.h:46:20: warning: 'pagefault_disabled' used but never defined
      46 | static inline bool pagefault_disabled(void);
         |                    ^~~~~~~~~~~~~~~~~~
..


vim +58 include/linux/sched/per_task.h

c3aff7aa01ea38 Ingo Molnar 2021-06-02  57  
fd8bcb1ba81bb9 Ingo Molnar 2021-06-05 @58  #define per_task(task, name)			(*RELOC_HIDE((__typeof__(per_task__##name) *)((task)->per_task_area), per_task_offset(name)))
c3aff7aa01ea38 Ingo Molnar 2021-06-02  59  

:::::: The code at line 58 was first introduced by commit
:::::: fd8bcb1ba81bb9f572f174a03af322ac9137ebd8 sched/headers, per_task: Implement 0-offset linker logic

:::::: TO: Ingo Molnar <mingo@...nel.org>
:::::: CC: Ingo Molnar <mingo@...nel.org>

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

Download attachment ".config.gz" of type "application/gzip" (29247 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ