Re: [PATCH v2 5/9] x86: bug: prevent gcc distortions

2018-06-05 Thread kbuild test robot
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);
 ^~
  

Re: [PATCH v2 5/9] x86: bug: prevent gcc distortions

2018-06-05 Thread kbuild test robot
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);
 ^~