[kees:kspp/memcpy/next-20210730/v2-devel 70/72] include/linux/compiler_types.h:258:20: warning: asm operand 0 probably doesn't match constraints

From: kernel test robot
Date: Tue Aug 03 2021 - 09:01:32 EST


tree: https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git kspp/memcpy/next-20210730/v2-devel
head: 4370f1f8176f3dd51be3ae669d6b5c8d6e726710
commit: 1ece9eb2df62c7f3f7fab67aa9bf127d08a3df1a [70/72] fortify: Add run-time WARN for cross-field memcpy()
config: i386-randconfig-c021-20210803 (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/kees/linux.git/commit/?id=1ece9eb2df62c7f3f7fab67aa9bf127d08a3df1a
git remote add kees https://git.kernel.org/pub/scm/linux/kernel/git/kees/linux.git
git fetch --no-tags kees kspp/memcpy/next-20210730/v2-devel
git checkout 1ece9eb2df62c7f3f7fab67aa9bf127d08a3df1a
# save the attached .config to linux build tree
mkdir build_dir
make W=1 O=build_dir ARCH=i386 SHELL=/bin/bash

If you fix the issue, kindly add following tag as appropriate
Reported-by: kernel test robot <lkp@xxxxxxxxx>

All warnings (new ones prefixed by >>):

In file included from <command-line>:
arch/x86/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c: In function 'xz_dec_lzma2_run':
>> include/linux/compiler_types.h:258:20: warning: asm operand 0 probably doesn't match constraints
258 | #define asm_inline asm __inline
| ^~~
arch/x86/include/asm/bug.h:27:2: note: in expansion of macro 'asm_inline'
27 | asm_inline volatile("1:\t" ins "\n" \
| ^~~~~~~~~~
arch/x86/include/asm/bug.h:79:2: note: in expansion of macro '_BUG_FLAGS'
79 | _BUG_FLAGS(ASM_UD2, BUGFLAG_WARNING|(flags)); \
| ^~~~~~~~~~
include/asm-generic/bug.h:100:3: note: in expansion of macro '__WARN_FLAGS'
100 | __WARN_FLAGS(BUGFLAG_NO_CUT_HERE | BUGFLAG_TAINT(taint));\
| ^~~~~~~~~~~~
include/asm-generic/bug.h:132:3: note: in expansion of macro '__WARN_printf'
132 | __WARN_printf(TAINT_WARN, format); \
| ^~~~~~~~~~~~~
include/linux/once_lite.h:19:4: note: in expansion of macro 'WARN'
19 | func(__VA_ARGS__); \
| ^~~~
include/asm-generic/bug.h:150:2: note: in expansion of macro 'DO_ONCE_LITE_IF'
150 | DO_ONCE_LITE_IF(condition, WARN, 1, format)
| ^~~~~~~~~~~~~~~
include/linux/fortify-string.h:327:2: note: in expansion of macro 'WARN_ONCE'
327 | WARN_ONCE(fortify_memcpy_chk(__fortify_size, p_size, q_size, \
| ^~~~~~~~~
include/linux/fortify-string.h:342:27: note: in expansion of macro '__fortify_memcpy_chk'
342 | #define memmove(p, q, s) __fortify_memcpy_chk(p, q, s, \
| ^~~~~~~~~~~~~~~~~~~~
arch/x86/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:884:4: note: in expansion of macro 'memmove'
884 | memmove(s->temp.buf, s->temp.buf + s->rc.in_pos,
| ^~~~~~~
include/linux/compiler_types.h:258:20: error: impossible constraint in 'asm'
258 | #define asm_inline asm __inline
| ^~~
arch/x86/include/asm/bug.h:27:2: note: in expansion of macro 'asm_inline'
27 | asm_inline volatile("1:\t" ins "\n" \
| ^~~~~~~~~~
arch/x86/include/asm/bug.h:79:2: note: in expansion of macro '_BUG_FLAGS'
79 | _BUG_FLAGS(ASM_UD2, BUGFLAG_WARNING|(flags)); \
| ^~~~~~~~~~
include/asm-generic/bug.h:100:3: note: in expansion of macro '__WARN_FLAGS'
100 | __WARN_FLAGS(BUGFLAG_NO_CUT_HERE | BUGFLAG_TAINT(taint));\
| ^~~~~~~~~~~~
include/asm-generic/bug.h:132:3: note: in expansion of macro '__WARN_printf'
132 | __WARN_printf(TAINT_WARN, format); \
| ^~~~~~~~~~~~~
include/linux/once_lite.h:19:4: note: in expansion of macro 'WARN'
19 | func(__VA_ARGS__); \
| ^~~~
include/asm-generic/bug.h:150:2: note: in expansion of macro 'DO_ONCE_LITE_IF'
150 | DO_ONCE_LITE_IF(condition, WARN, 1, format)
| ^~~~~~~~~~~~~~~
include/linux/fortify-string.h:327:2: note: in expansion of macro 'WARN_ONCE'
327 | WARN_ONCE(fortify_memcpy_chk(__fortify_size, p_size, q_size, \
| ^~~~~~~~~
include/linux/fortify-string.h:342:27: note: in expansion of macro '__fortify_memcpy_chk'
342 | #define memmove(p, q, s) __fortify_memcpy_chk(p, q, s, \
| ^~~~~~~~~~~~~~~~~~~~
arch/x86/boot/compressed/../../../../lib/xz/xz_dec_lzma2.c:884:4: note: in expansion of macro 'memmove'
884 | memmove(s->temp.buf, s->temp.buf + s->rc.in_pos,
| ^~~~~~~
arch/x86/boot/compressed/../../../../lib/xz/xz_dec_bcj.c: In function 'bcj_flush':
>> include/linux/compiler_types.h:258:20: warning: asm operand 0 probably doesn't match constraints
258 | #define asm_inline asm __inline
| ^~~
arch/x86/include/asm/bug.h:27:2: note: in expansion of macro 'asm_inline'
27 | asm_inline volatile("1:\t" ins "\n" \
| ^~~~~~~~~~
arch/x86/include/asm/bug.h:79:2: note: in expansion of macro '_BUG_FLAGS'
79 | _BUG_FLAGS(ASM_UD2, BUGFLAG_WARNING|(flags)); \
| ^~~~~~~~~~
include/asm-generic/bug.h:100:3: note: in expansion of macro '__WARN_FLAGS'
100 | __WARN_FLAGS(BUGFLAG_NO_CUT_HERE | BUGFLAG_TAINT(taint));\
| ^~~~~~~~~~~~
include/asm-generic/bug.h:132:3: note: in expansion of macro '__WARN_printf'
132 | __WARN_printf(TAINT_WARN, format); \
| ^~~~~~~~~~~~~
include/linux/once_lite.h:19:4: note: in expansion of macro 'WARN'
19 | func(__VA_ARGS__); \
| ^~~~
include/asm-generic/bug.h:150:2: note: in expansion of macro 'DO_ONCE_LITE_IF'
150 | DO_ONCE_LITE_IF(condition, WARN, 1, format)
| ^~~~~~~~~~~~~~~
include/linux/fortify-string.h:327:2: note: in expansion of macro 'WARN_ONCE'
327 | WARN_ONCE(fortify_memcpy_chk(__fortify_size, p_size, q_size, \
| ^~~~~~~~~
include/linux/fortify-string.h:342:27: note: in expansion of macro '__fortify_memcpy_chk'
342 | #define memmove(p, q, s) __fortify_memcpy_chk(p, q, s, \
| ^~~~~~~~~~~~~~~~~~~~
arch/x86/boot/compressed/../../../../lib/xz/xz_dec_bcj.c:409:2: note: in expansion of macro 'memmove'
409 | memmove(s->temp.buf, s->temp.buf + copy_size, s->temp.size);
| ^~~~~~~


vim +258 include/linux/compiler_types.h

8bd66d147c88bd ndesaulniers@xxxxxxxxxx 2018-10-31 256
eb111869301e15 Rasmus Villemoes 2019-09-13 257 #ifdef CONFIG_CC_HAS_ASM_INLINE
eb111869301e15 Rasmus Villemoes 2019-09-13 @258 #define asm_inline asm __inline
eb111869301e15 Rasmus Villemoes 2019-09-13 259 #else
eb111869301e15 Rasmus Villemoes 2019-09-13 260 #define asm_inline asm
eb111869301e15 Rasmus Villemoes 2019-09-13 261 #endif
eb111869301e15 Rasmus Villemoes 2019-09-13 262

:::::: The code at line 258 was first introduced by commit
:::::: eb111869301e15b737315a46c913ae82bd19eb9d compiler-types.h: add asm_inline definition

:::::: TO: Rasmus Villemoes <linux@xxxxxxxxxxxxxxxxxx>
:::::: CC: Miguel Ojeda <miguel.ojeda.sandonis@xxxxxxxxx>

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

Attachment: .config.gz
Description: application/gzip