All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vasily Gorbik <gor@linux.ibm.com>
To: kernel test robot <lkp@intel.com>
Cc: Josh Poimboeuf <jpoimboe@redhat.com>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	kbuild-all@lists.01.org, clang-built-linux@googlegroups.com,
	Borislav Petkov <bp@alien8.de>,
	Peter Zijlstra <peterz@infradead.org>,
	linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org,
	x86 <x86@kernel.org>
Subject: Re: [PATCH 1/1] x86/tools: Use tools headers for instruction decoder selftests
Date: Wed, 4 Nov 2020 10:18:43 +0100	[thread overview]
Message-ID: <your-ad-here.call-01604481523-ext-9352@work.hours> (raw)
In-Reply-To: <202011041702.EIrDb4hS-lkp@intel.com>

On Wed, Nov 04, 2020 at 05:11:28PM +0800, kernel test robot wrote:
> Hi Vasily,
> 
> I love your patch! Yet something to improve:
> 
> [auto build test ERROR on tip/x86/core]
> [also build test ERROR on v5.10-rc2 next-20201103]
> [If your patch is applied to the wrong git tree, kindly drop us a note.
> And when submitting patch, we suggest to use '--base' as documented in
> https://git-scm.com/docs/git-format-patch]
> 
> url:    https://github.com/0day-ci/linux/commits/Vasily-Gorbik/x86-tools-Use-tools-headers-for-instruction-decoder-selftests/20201104-043600
> base:   https://git.kernel.org/pub/scm/linux/kernel/git/tip/tip.git 238c91115cd05c71447ea071624a4c9fe661f970
> config: x86_64-randconfig-a005-20201104 (attached as .config)
> compiler: clang version 12.0.0 (https://github.com/llvm/llvm-project 1fcd5d5655e29f85e12b402e32974f207cfedf32)
> 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
>         # install x86_64 cross compiling tool for clang build
>         # apt-get install binutils-x86-64-linux-gnu
>         # https://github.com/0day-ci/linux/commit/ab4952becdfae8a76a6f0e0fb4ec7d078e80d5d6
>         git remote add linux-review https://github.com/0day-ci/linux
>         git fetch --no-tags linux-review Vasily-Gorbik/x86-tools-Use-tools-headers-for-instruction-decoder-selftests/20201104-043600
>         git checkout ab4952becdfae8a76a6f0e0fb4ec7d078e80d5d6
>         # save the attached .config to linux build tree
>         COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=x86_64 
> 
> If you fix the issue, kindly add following tag as appropriate
> Reported-by: kernel test robot <lkp@intel.com>
> 
> All error/warnings (new ones prefixed by >>):
> 
>    In file included from arch/x86/tools/insn_sanity.c:19:
> >> tools/arch/x86/lib/insn.c:72:7: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    if (peek_nbyte_next(insn_byte_t, insn, i) != prefix[i])
>                        ^
>    tools/arch/x86/lib/insn.c:32:9: note: expanded from macro 'peek_nbyte_next'
>            ({ if (unlikely(!validate_next(t, insn, n))) goto err_out; __peek_nbyte_next(t, insn, n); })
>                   ^
>    tools/arch/x86/lib/insn.c:115:6: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>            b = peek_next(insn_byte_t, insn);
>                ^
>    tools/arch/x86/lib/insn.c:34:28: note: expanded from macro 'peek_next'
>    #define peek_next(t, insn)      peek_nbyte_next(t, insn, 0)
>                                    ^
>    tools/arch/x86/lib/insn.c:32:9: note: expanded from macro 'peek_nbyte_next'
>            ({ if (unlikely(!validate_next(t, insn, n))) goto err_out; __peek_nbyte_next(t, insn, n); })
>                   ^
>    tools/arch/x86/lib/insn.c:140:7: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    b = peek_next(insn_byte_t, insn);
>                        ^
>    tools/arch/x86/lib/insn.c:34:28: note: expanded from macro 'peek_next'
>    #define peek_next(t, insn)      peek_nbyte_next(t, insn, 0)
>                                    ^
>    tools/arch/x86/lib/insn.c:32:9: note: expanded from macro 'peek_nbyte_next'
>            ({ if (unlikely(!validate_next(t, insn, n))) goto err_out; __peek_nbyte_next(t, insn, n); })
>                   ^
>    tools/arch/x86/lib/insn.c:145:7: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    if (unlikely(insn->prefixes.bytes[3])) {
>                        ^
>    tools/arch/x86/lib/insn.c:157:7: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    b = peek_next(insn_byte_t, insn);
>                        ^
>    tools/arch/x86/lib/insn.c:34:28: note: expanded from macro 'peek_next'
>    #define peek_next(t, insn)      peek_nbyte_next(t, insn, 0)
>                                    ^
>    tools/arch/x86/lib/insn.c:32:9: note: expanded from macro 'peek_nbyte_next'
>            ({ if (unlikely(!validate_next(t, insn, n))) goto err_out; __peek_nbyte_next(t, insn, n); })
>                   ^
>    tools/arch/x86/lib/insn.c:171:6: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>            b = peek_next(insn_byte_t, insn);
>                ^
>    tools/arch/x86/lib/insn.c:34:28: note: expanded from macro 'peek_next'
>    #define peek_next(t, insn)      peek_nbyte_next(t, insn, 0)
>                                    ^
>    tools/arch/x86/lib/insn.c:32:9: note: expanded from macro 'peek_nbyte_next'
>            ({ if (unlikely(!validate_next(t, insn, n))) goto err_out; __peek_nbyte_next(t, insn, n); })
>                   ^
>    tools/arch/x86/lib/insn.c:174:20: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    insn_byte_t b2 = peek_nbyte_next(insn_byte_t, insn, 1);
>                                     ^
>    tools/arch/x86/lib/insn.c:32:9: note: expanded from macro 'peek_nbyte_next'
>            ({ if (unlikely(!validate_next(t, insn, n))) goto err_out; __peek_nbyte_next(t, insn, n); })
>                   ^
>    tools/arch/x86/lib/insn.c:187:9: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                            b2 = peek_nbyte_next(insn_byte_t, insn, 2);
>                                 ^
>    tools/arch/x86/lib/insn.c:32:9: note: expanded from macro 'peek_nbyte_next'
>            ({ if (unlikely(!validate_next(t, insn, n))) goto err_out; __peek_nbyte_next(t, insn, n); })
>                   ^
>    tools/arch/x86/lib/insn.c:189:9: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                            b2 = peek_nbyte_next(insn_byte_t, insn, 3);
>                                 ^
>    tools/arch/x86/lib/insn.c:32:9: note: expanded from macro 'peek_nbyte_next'
>            ({ if (unlikely(!validate_next(t, insn, n))) goto err_out; __peek_nbyte_next(t, insn, n); })
>                   ^
>    tools/arch/x86/lib/insn.c:197:9: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                            b2 = peek_nbyte_next(insn_byte_t, insn, 2);
>                                 ^
>    tools/arch/x86/lib/insn.c:32:9: note: expanded from macro 'peek_nbyte_next'
>            ({ if (unlikely(!validate_next(t, insn, n))) goto err_out; __peek_nbyte_next(t, insn, n); })
>                   ^
>    tools/arch/x86/lib/insn.c:245:7: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>            op = get_next(insn_byte_t, insn);
>                 ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
>    tools/arch/x86/lib/insn.c:265:8: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    op = get_next(insn_byte_t, insn);
>                         ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
>    tools/arch/x86/lib/insn.c:297:9: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    mod = get_next(insn_byte_t, insn);
>                          ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
>    tools/arch/x86/lib/insn.c:359:22: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                            insn->sib.value = get_next(insn_byte_t, insn);
>                                              ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
>    tools/arch/x86/lib/insn.c:410:31: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                            insn->displacement.value = get_next(signed char, insn);
>                                                       ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
>    tools/arch/x86/lib/insn.c:415:7: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                                             get_next(short, insn);
> --
>                                           ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
>    tools/arch/x86/lib/insn.c:448:26: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    insn->moffset2.value = get_next(int, insn);
>                                           ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
>    tools/arch/x86/lib/insn.c:467:27: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    insn->immediate.value = get_next(short, insn);
>                                            ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
>    tools/arch/x86/lib/insn.c:472:27: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    insn->immediate.value = get_next(int, insn);
>                                            ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
>    tools/arch/x86/lib/insn.c:490:28: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    insn->immediate1.value = get_next(short, insn);
>                                             ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
>    tools/arch/x86/lib/insn.c:494:28: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    insn->immediate1.value = get_next(int, insn);
>                                             ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
>    tools/arch/x86/lib/insn.c:498:28: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    insn->immediate1.value = get_next(int, insn);
>                                             ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
>    tools/arch/x86/lib/insn.c:500:28: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    insn->immediate2.value = get_next(int, insn);
>                                             ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
>    tools/arch/x86/lib/insn.c:518:28: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    insn->immediate1.value = get_next(short, insn);
>                                             ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
>    tools/arch/x86/lib/insn.c:522:28: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    insn->immediate1.value = get_next(int, insn);
>                                             ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
>    tools/arch/x86/lib/insn.c:531:27: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>            insn->immediate2.value = get_next(unsigned short, insn);
>                                     ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
>    tools/arch/x86/lib/insn.c:568:27: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    insn->immediate.value = get_next(signed char, insn);
>                                            ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
>    tools/arch/x86/lib/insn.c:572:27: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    insn->immediate.value = get_next(short, insn);
>                                            ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
>    tools/arch/x86/lib/insn.c:576:27: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    insn->immediate.value = get_next(int, insn);
>                                            ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
>    tools/arch/x86/lib/insn.c:580:28: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    insn->immediate1.value = get_next(int, insn);
>                                             ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
>    tools/arch/x86/lib/insn.c:582:28: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    insn->immediate2.value = get_next(int, insn);
>                                             ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
>    tools/arch/x86/lib/insn.c:602:28: warning: implicit declaration of function 'unlikely' [-Wimplicit-function-declaration]
>                    insn->immediate2.value = get_next(signed char, insn);
>                                             ^
>    tools/arch/x86/lib/insn.c:29:9: note: expanded from macro 'get_next'
>            ({ if (unlikely(!validate_next(t, insn, 0))) goto err_out; __get_next(t, insn); })
>                   ^
> >> arch/x86/tools/insn_sanity.c:128:19: warning: implicit declaration of function 'ARRAY_SIZE' [-Wimplicit-function-declaration]
>            tmp = fgets(buf, ARRAY_SIZE(buf), input_file);
>                             ^
>    37 warnings generated.
>    /usr/bin/ld: /tmp/insn_sanity-8655a9.o: in function `insn_get_prefixes':
> >> insn_sanity.c:(.text+0x1bd): undefined reference to `unlikely'
> >> /usr/bin/ld: insn_sanity.c:(.text+0x203): undefined reference to `unlikely'
>    /usr/bin/ld: insn_sanity.c:(.text+0x24d): undefined reference to `unlikely'
>    /usr/bin/ld: insn_sanity.c:(.text+0x30f): undefined reference to `unlikely'
>    /usr/bin/ld: insn_sanity.c:(.text+0x353): undefined reference to `unlikely'
>    /usr/bin/ld: /tmp/insn_sanity-8655a9.o:insn_sanity.c:(.text+0x38e): more undefined references to `unlikely' follow
>    /usr/bin/ld: /tmp/insn_sanity-8655a9.o: in function `main':
> >> insn_sanity.c:(.text+0x13cf): undefined reference to `ARRAY_SIZE'
>    /usr/bin/ld: /tmp/insn_sanity-8655a9.o: in function `__insn_get_emulate_prefix':
>    insn_sanity.c:(.text+0x1cc1): undefined reference to `unlikely'
>    /usr/bin/ld: insn_sanity.c:(.text+0x1cef): undefined reference to `unlikely'
>    /usr/bin/ld: insn_sanity.c:(.text+0x1d1f): undefined reference to `unlikely'
>    /usr/bin/ld: insn_sanity.c:(.text+0x1d47): undefined reference to `unlikely'
>    /usr/bin/ld: insn_sanity.c:(.text+0x1d6f): undefined reference to `unlikely'
>    clang-12: error: linker command failed with exit code 1 (use -v to see invocation)

Right, this is expected. The patch is based on jpoimboe/objtool/core,
which has extra commits.

  reply	other threads:[~2020-11-04  9:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-10-07 16:20 [tip: objtool/core] x86/insn: Support big endian cross-compiles tip-bot2 for Martin Schwidefsky
2020-10-09 20:38 ` Peter Zijlstra
2020-10-09 20:49   ` Borislav Petkov
2020-10-10 14:02     ` Vasily Gorbik
2020-10-11 14:40       ` Borislav Petkov
2020-10-12  0:02       ` Masami Hiramatsu
2020-10-10 17:44     ` Josh Poimboeuf
2020-10-12  0:12       ` Masami Hiramatsu
2020-10-12 15:39         ` Josh Poimboeuf
2020-10-14  7:28           ` Masami Hiramatsu
2020-10-15  6:24             ` Ian Rogers
2020-11-03 19:35             ` Vasily Gorbik
2020-11-03 19:35               ` [PATCH 1/1] x86/tools: Use tools headers for instruction decoder selftests Vasily Gorbik
2020-11-04  9:11                 ` kernel test robot
2020-11-04  9:11                   ` kernel test robot
2020-11-04  9:18                   ` Vasily Gorbik [this message]
2020-11-06  2:24                     ` Masami Hiramatsu
2020-11-06  2:24                       ` Masami Hiramatsu
2020-11-06 17:52                       ` Josh Poimboeuf
2020-11-06 17:52                         ` Josh Poimboeuf
2020-11-04 11:54                 ` kernel test robot
2020-11-04 11:54                   ` kernel test robot

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=your-ad-here.call-01604481523-ext-9352@work.hours \
    --to=gor@linux.ibm.com \
    --cc=bp@alien8.de \
    --cc=clang-built-linux@googlegroups.com \
    --cc=jpoimboe@redhat.com \
    --cc=kbuild-all@lists.01.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tip-commits@vger.kernel.org \
    --cc=lkp@intel.com \
    --cc=mhiramat@kernel.org \
    --cc=peterz@infradead.org \
    --cc=x86@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.