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>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:   Tue, 5 Jun 2018 15:34:55 +0800
From:   kbuild test robot <lkp@...el.com>
To:     Nadav Amit <namit@...are.com>
Cc:     kbuild-all@...org, linux-kernel@...r.kernel.org, x86@...nel.org,
        Nadav Amit <namit@...are.com>,
        Thomas Gleixner <tglx@...utronix.de>,
        Ingo Molnar <mingo@...hat.com>,
        "H. Peter Anvin" <hpa@...or.com>,
        Peter Zijlstra <peterz@...radead.org>,
        Josh Poimboeuf <jpoimboe@...hat.com>
Subject: Re: [PATCH v2 5/9] x86: bug: prevent gcc distortions

Hi Nadav,

Thank you for the patch! Yet something to improve:

[auto build test ERROR on linus/master]
[also build test ERROR on v4.17 next-20180604]
[cannot apply to tip/x86/core]
[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/Nadav-Amit/x86-macrofying-inline-asm-for-better-compilation/20180605-124313
config: i386-tinyconfig (attached as .config)
compiler: gcc-7 (Debian 7.3.0-16) 7.3.0
reproduce:
        # save the attached .config to linux build tree
        make ARCH=i386 

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

   In file included from include/linux/bug.h:5:0,
                    from include/linux/crypto.h:23,
                    from arch/x86/kernel/asm-offsets.c:9:
   include/linux/ktime.h: In function 'ktime_divns':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/asm-generic/bug.h:176:47: note: in expansion of macro 'BUG'
    #define BUG_ON(condition) do { if (condition) BUG(); } while (0)
                                                  ^~~
>> include/linux/ktime.h:150:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(div < 0);
     ^~~~~~
   include/linux/rhashtable.h: In function 'rhashtable_lookup_insert_fast':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/asm-generic/bug.h:176:47: note: in expansion of macro 'BUG'
    #define BUG_ON(condition) do { if (condition) BUG(); } while (0)
                                                  ^~~
>> include/linux/rhashtable.h:936:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(ht->p.obj_hashfn);
     ^~~~~~
   include/linux/rhashtable.h: In function 'rhashtable_lookup_get_insert_fast':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/asm-generic/bug.h:176:47: note: in expansion of macro 'BUG'
    #define BUG_ON(condition) do { if (condition) BUG(); } while (0)
                                                  ^~~
   include/linux/rhashtable.h:962:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(ht->p.obj_hashfn);
     ^~~~~~
   include/linux/rhashtable.h: In function 'rhashtable_lookup_insert_key':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/asm-generic/bug.h:176:47: note: in expansion of macro 'BUG'
    #define BUG_ON(condition) do { if (condition) BUG(); } while (0)
                                                  ^~~
   include/linux/rhashtable.h:996:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(!ht->p.obj_hashfn || !key);
     ^~~~~~
   include/linux/rhashtable.h: In function 'rhashtable_lookup_get_insert_key':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/asm-generic/bug.h:176:47: note: in expansion of macro 'BUG'
    #define BUG_ON(condition) do { if (condition) BUG(); } while (0)
                                                  ^~~
   include/linux/rhashtable.h:1020:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(!ht->p.obj_hashfn || !key);
     ^~~~~~
   include/linux/crypto.h: In function 'crypto_blkcipher_cast':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/asm-generic/bug.h:176:47: note: in expansion of macro 'BUG'
    #define BUG_ON(condition) do { if (condition) BUG(); } while (0)
                                                  ^~~
>> include/linux/crypto.h:1118:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_BLKCIPHER);
     ^~~~~~
   include/linux/crypto.h: In function 'crypto_cipher_cast':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/asm-generic/bug.h:176:47: note: in expansion of macro 'BUG'
    #define BUG_ON(condition) do { if (condition) BUG(); } while (0)
                                                  ^~~
   include/linux/crypto.h:1438:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(crypto_tfm_alg_type(tfm) != CRYPTO_ALG_TYPE_CIPHER);
     ^~~~~~
   include/linux/crypto.h: In function 'crypto_comp_cast':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/asm-generic/bug.h:176:47: note: in expansion of macro 'BUG'
    #define BUG_ON(condition) do { if (condition) BUG(); } while (0)
                                                  ^~~
   include/linux/crypto.h:1603:2: note: in expansion of macro 'BUG_ON'
     BUG_ON((crypto_tfm_alg_type(tfm) ^ CRYPTO_ALG_TYPE_COMPRESS) &
     ^~~~~~
   include/linux/quota.h: In function 'make_kqid':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
>> include/linux/quota.h:114:3: note: in expansion of macro 'BUG'
      BUG();
      ^~~
   include/linux/quota.h: In function 'make_kqid_invalid':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/linux/quota.h:141:3: note: in expansion of macro 'BUG'
      BUG();
      ^~~
   include/linux/fs.h: In function 'kill_block_super':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
>> include/linux/fs.h:2124:2: note: in expansion of macro 'BUG'
     BUG();
     ^~~
   include/linux/fs.h: In function 'break_deleg_wait':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/linux/fs.h:2371:2: note: in expansion of macro 'BUG'
     BUG();
     ^~~
   include/linux/seq_file.h: In function 'seq_get_buf':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/asm-generic/bug.h:176:47: note: in expansion of macro 'BUG'
    #define BUG_ON(condition) do { if (condition) BUG(); } while (0)
                                                  ^~~
>> include/linux/seq_file.h:66:2: note: in expansion of macro 'BUG_ON'
     BUG_ON(m->count > m->size);
     ^~~~~~
   include/linux/seq_file.h: In function 'seq_commit':
>> arch/x86/include/asm/bug.h:31:17: error: invalid application of 'sizeof' to incomplete type 'struct bug_entry'
        "i" (sizeof(struct bug_entry)));  \
                    ^
   arch/x86/include/asm/bug.h:37:2: note: in expansion of macro '_BUG_FLAGS'
     _BUG_FLAGS(ASM_UD2, 0);     \
     ^~~~~~~~~~
   include/asm-generic/bug.h:176:47: note: in expansion of macro 'BUG'
    #define BUG_ON(condition) do { if (condition) BUG(); } while (0)
                                                  ^~~
   include/linux/seq_file.h:89:3: note: in expansion of macro 'BUG_ON'
      BUG_ON(m->count + num > m->size);
      ^~~~~~
   include/asm-generic/fixmap.h: In function 'virt_to_fix':

vim +31 arch/x86/include/asm/bug.h

9a93848f arch/x86/include/asm/bug.h Peter Zijlstra  2017-02-02  24  
9a93848f arch/x86/include/asm/bug.h Peter Zijlstra  2017-02-02  25  #define _BUG_FLAGS(ins, flags)						\
68fdc55c include/asm-x86/bug.h      Thomas Gleixner 2007-10-17  26  do {									\
6eca12b3 arch/x86/include/asm/bug.h Nadav Amit      2018-06-04  27  	asm volatile("ASM_BUG ins=\"" ins "\" file=%c0 line=%c1 "	\
6eca12b3 arch/x86/include/asm/bug.h Nadav Amit      2018-06-04  28  		     "flags=%c2 size=%c3"				\
68fdc55c include/asm-x86/bug.h      Thomas Gleixner 2007-10-17  29  		     : : "i" (__FILE__), "i" (__LINE__),                \
9a93848f arch/x86/include/asm/bug.h Peter Zijlstra  2017-02-02  30  			 "i" (flags),                                   \
68fdc55c include/asm-x86/bug.h      Thomas Gleixner 2007-10-17 @31  			 "i" (sizeof(struct bug_entry)));		\
68fdc55c include/asm-x86/bug.h      Thomas Gleixner 2007-10-17  32  } while (0)
68fdc55c include/asm-x86/bug.h      Thomas Gleixner 2007-10-17  33  

:::::: The code at line 31 was first introduced by commit
:::::: 68fdc55c48fd2e8f4938a1e815216c25baf8a17e x86: unify include/asm/bug_32/64.h

:::::: TO: Thomas Gleixner <tglx@...utronix.de>
:::::: CC: Thomas Gleixner <tglx@...elltoy.tec.linutronix.de>

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

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

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ