Received: by 2002:a05:6a10:16a7:0:0:0:0 with SMTP id gp39csp948948pxb; Thu, 5 Nov 2020 18:27:06 -0800 (PST) X-Google-Smtp-Source: ABdhPJzIFI4We27JoqnT3RDuBufnitmzdu+0/rjay+9EJYLyZkZyeuPpoywuqa881F566894E4rT X-Received: by 2002:a17:906:12cf:: with SMTP id l15mr5705621ejb.540.1604629626290; Thu, 05 Nov 2020 18:27:06 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1604629626; cv=none; d=google.com; s=arc-20160816; b=lFPXgw7SskR2IWGSymqwjkcQlnITAVBNkQarr1w+R+a6e1ieWq61tFFYAqNO2zULhw r69/IuVnEkSQpm60ub+6Pxqn9m32adb8n6KArTt4XelrI5CWfxVb/YHNSXT+eMrQZrlc dikzLD2R3sFB/6rB2z+EcLgOuofFnt0ZcEaNrNqTRHyRWSq4YkzgPxZVtreAiBxs8X6j 7W9t8J01QW5Gy4MmnrUks672SLcmZDZ8CcLvY5YfdKWxK/2hgjpDV0L3asI4+eUPF79N F3vFSSAqq3PbOQmLsfU/bl4WXCwjW/QB2aWW3vjox0xd0BJhCNLTuMgl/b/5TG9u18Ek QGkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=nBrBnYxBLVAAPrb/hZQpMKZ8Cpk1V+LYFFc2o3fZuNI=; b=ifIGxBph77tsS9EDAFOwp4zZLGX4X39cWxjJXvgbSujzIes0w8Cr/VGZ6ReiE9OE0h mZbbng6uJhJ9yASGQEysp4SPg0ZgN1gj/qjTHEYwxxwVZrLIFHUntWOY6hvxI+2ubdTK u7QKf6o7pjRJlZX1ChVd4m8aAlEBuIwfYt02GwK0WgJO6S7Urn4cxlacWmV+ME9ogBCn v1QgrnIhaesBOPALEXLeVPdzFan57WSf/tzikaAQgupn4axyOXdceKQX2Bcm/S49/Lhx nybH/tlKm2BYb3EyERKWOtAe7Pf1xk6HWpAMBXr/R30bhVaNN3aSo7O7e9HQahhhYUgQ /v9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=v10ZtJEa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id o16si2506888edi.462.2020.11.05.18.26.43; Thu, 05 Nov 2020 18:27:06 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=v10ZtJEa; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726007AbgKFCYT (ORCPT + 99 others); Thu, 5 Nov 2020 21:24:19 -0500 Received: from mail.kernel.org ([198.145.29.99]:38274 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725830AbgKFCYS (ORCPT ); Thu, 5 Nov 2020 21:24:18 -0500 Received: from devnote2 (NE2965lan1.rev.em-net.ne.jp [210.141.244.193]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 588BA20756; Fri, 6 Nov 2020 02:24:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1604629457; bh=xMN6cgH+3YWBsfFzBgyeCgx+M+Ohkp2GEdGQ5KnNxPw=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=v10ZtJEa8TocEylSLRuCSlDjVDOggtZAwwHbP5a8KenH3Uq/YMVJX+l3D/o5FZRg2 selNGEDGALpnHoubmGCJ85oDOPEoeDLhuqgsv/0s4vx0LRgwTMmKoMqlfqJHelYqw8 smE+Mx39S9bhPNcZTot3Jkg0Y6wYfbBGa9fE8ENg= Date: Fri, 6 Nov 2020 11:24:13 +0900 From: Masami Hiramatsu To: Vasily Gorbik Cc: kernel test robot , Josh Poimboeuf , Masami Hiramatsu , kbuild-all@lists.01.org, clang-built-linux@googlegroups.com, Borislav Petkov , Peter Zijlstra , linux-kernel@vger.kernel.org, linux-tip-commits@vger.kernel.org, x86 Subject: Re: [PATCH 1/1] x86/tools: Use tools headers for instruction decoder selftests Message-Id: <20201106112413.80248e44fef68d9acf932dec@kernel.org> In-Reply-To: References: <202011041702.EIrDb4hS-lkp@intel.com> X-Mailer: Sylpheed 3.7.0 (GTK+ 2.24.32; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 4 Nov 2020 10:18:43 +0100 Vasily Gorbik wrote: > 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 > > > > 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. Has that series already submitted to LKML? I need to look at the series too. Or, Josh, can you review it and if it is OK, please pick it to your series and send it. Thank you, -- Masami Hiramatsu