Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4903903rdh; Wed, 29 Nov 2023 14:18:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IFTDoYgYCUnqZ1auS70L3C03nC43y7jkOpQN3vYlSH6KfGO25aWvnhGyRET53ZBspkJk0A1 X-Received: by 2002:a05:6808:1793:b0:3b2:e30d:9d68 with SMTP id bg19-20020a056808179300b003b2e30d9d68mr24828315oib.32.1701296293832; Wed, 29 Nov 2023 14:18:13 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701296293; cv=none; d=google.com; s=arc-20160816; b=tsI+nvh7HPpDo2uGVqVEgm9GButWgaZHYQA+6SjKQqi4v4ln2lSci9oVsyFDkVtKO6 BUMDdY4qMzVBd7PZzB9o8Zwn6opm7Q2cQIWyRswVPbFK+ciffkGyyVhCP9ffP8hvlD4P t70zFcP4DQlCgacJmBKV2Uvg1TGp5yqrCs0dltl5YBgSS+jwL4UurEmWCYYW2fM3t2gY WvyEbX7jkRjjifJ2wKZyNOSPDKquM3YLyZzUgI5vAWb6XP+cdx6eXVrGr/gO5CvqbaD1 MCmEAMP9DfJ3NSM4zRij6ksXPCiz/3pBAJKWYOOA1DFypiJfCkRh1eXHRzLsr3KX1ple kByg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:content-transfer-encoding:mime-version :message-id:date:subject:from:dkim-signature; bh=dlXgtBNW+CUYOiNrLyfmBgh1+XHnXyWPy+UXxbHX3WM=; fh=VuE012xvnkbmKdVz6qCJ/DYLIa42Cu/uD91abXTRPQU=; b=R3tGoQWXz9QpAetcbJ0QPvRg7MXBt53Y7DpPy/QmeE8/oV1fcZ5Vjiv0NftWuGFytQ gLN7CBEOREuy++xEvA891fiVtDfU/GXWGYpfRaJ5Hi8AsTjF9dFRN0dbqFCHQE0T11sB Cmi6QKFGaF93uHtFOFdZrcuJ2bXRCmDI9TzBwhqnpjYjiED/HThA7FfK4U3Nui/KQuJ3 YhcVwKgfWfJkV99ftzFGxS2EzqpoLyN9yiAsQ8CxiftBc70XYZSL9MZ9NTzsRjvJowmV C/LU3kxIOSDv2uInkPBpg4iPQhjgAvxi89hjVd+7Qj7fRxL4s77a8zbV/NZVerXqgQNH 6EXA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FJ0ns3++; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 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 agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id s198-20020a632ccf000000b005bdc49ba91bsi14907801pgs.151.2023.11.29.14.18.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 14:18:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) client-ip=2620:137:e000::3:2; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FJ0ns3++; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:2 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 660C680BD3B4; Wed, 29 Nov 2023 14:18:09 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234830AbjK2WRy (ORCPT + 99 others); Wed, 29 Nov 2023 17:17:54 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229959AbjK2WRw (ORCPT ); Wed, 29 Nov 2023 17:17:52 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E3348C4 for ; Wed, 29 Nov 2023 14:17:57 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id CBD26C433C8; Wed, 29 Nov 2023 22:17:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701296277; bh=74LhTABn8Ubk9ieFOEy4R2tqnyjhM65THl7KF6XezcQ=; h=From:Subject:Date:To:Cc:From; b=FJ0ns3++bDvTJv2QiKG6+uBAGDj1tXwgdo3WbTd4SdVxCjJi7UVchGzodADzaa7zL LUu6tWED79+8CBYqJ5UD7q0HanJKxzxY8HMVO9l+ik19WiPEiDtf5OBsJV3wLfZlxD 16ers0Gu6hariCkPLzBbsV1TCkhYADvrRZwF59ymqqDMNU97v1Rwm34qbGfxYxLZ/a kuhquA0M97bLojh/onnhvWUP95sqZMy/J9PbBio/B2j2g+shje0G7SsDLiP1Ky5K9y Ol93UO8LzebkG8Y7akzg84Esa1dsfnX6W7Z51VPsiWx8MkilGZTQ9WDMMVuZjlF/Ok EsETNx2TdLMZw== From: Nathan Chancellor Subject: [PATCH v3 0/3] x86: Support llvm-objdump in instruction decoder selftest Date: Wed, 29 Nov 2023 15:17:40 -0700 Message-Id: <20231129-objdump-reformat-llvm-v3-0-0d855e79314d@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAIS4Z2UC/zXMQQ6CMBCF4auYWTukLYjgynsYFwUGqOlQMgViJ NzdxsTln5f37RBJHEW4nXYQ2lx0YUqRn0/QjnYaCF2XGowyudamxtC8upVnFOqDsF3Q+43RdFf d1H2hbGsgfec0u/fPfTxT9xIYl1HI/jWjE6dqVegqM1VRXkrUGC2v5D+0kNwHts5nbWA4ji8mU LRXpwAAAA== To: tglx@linutronix.de, mingo@redhat.com, bp@alien8.de, dave.hansen@linux.intel.com Cc: x86@kernel.org, ndesaulniers@google.com, keescook@chromium.org, samuelzeter@gmail.com, mhiramat@kernel.org, linux-kernel@vger.kernel.org, llvm@lists.linux.dev, patches@lists.linux.dev, Nathan Chancellor X-Mailer: b4 0.13-dev X-Developer-Signature: v=1; a=openpgp-sha256; l=2017; i=nathan@kernel.org; h=from:subject:message-id; bh=74LhTABn8Ubk9ieFOEy4R2tqnyjhM65THl7KF6XezcQ=; b=kA0DAAoWHWsmkXHAGpYByyZiAGVnuJOiilSy2BoDFgBjpMRKBBqEOrK2JR4ehGkacCdsQefA5 4h1BAAWCgAdFiEEe+MlxzExnM0B2MqSHWsmkXHAGpYFAmVnuJMACgkQHWsmkXHAGpY5KgEA+tGu d7E0XT4d9u36JifpCqz/Z+T+oT12r4IJf1pZ4gAA/0V71W427HPPA9xFQ30j4g8lyxtM8KmvfNr ETl+co/cI X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 X-Spam-Status: No, score=-1.2 required=5.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Wed, 29 Nov 2023 14:18:09 -0800 (PST) I have taken up this series from Sam to try and drive this forward. Currently, the instruction decoder selftest does not work with llvm-objdump because chkobjdump.awk is GNU binutils specific. chkobjdump.awk can be eliminated altogether because the minimum supported version of GNU binutils has been bumped to 2.25. However, with chkobjdump.awk removed, the selftest does not actually work properly with llvm-objdump: $ make -skj"$(nproc)" LLVM=1 defconfig $ scripts/config -e X86_DECODER_SELFTEST $ make -skj"$(nproc)" LLVM=1 olddefconfig bzImage ... arch/x86/tools/insn_decoder_test: warning: objdump says 0 bytes, but insn_get_length() says 2 ... Upon inspection it turned out llvm-objdump was formatting its output differently, which caused objdump_reformat.awk to incorrectly output its values. After fixing that bug, a second one was seen where the instruction "wait" was incorrectly matched with "fwait", which again caused insn_decoder_test to fail. Changes in v3: - Further commit message and cover letter formatting and improvements. - Add patch 3, which is the ultimate catalyst for the first two changes - Link to v2: https://lore.kernel.org/r/20221112090418.284656-1-samuelzeter@gmail.com/ Changes in v2: - Coding style commit message amendments - Link to v1: https://lore.kernel.org/r/20220106023606.283953-1-samuelzeter@gmail.com/ --- Nathan Chancellor (1): x86/tools: Remove chkobjdump.awk Samuel Zeter (2): x86/tools: objdump_reformat.awk: Ensure regex matches fwait x86/tools: objdump_reformat.awk: Allow for spaces arch/x86/tools/Makefile | 2 +- arch/x86/tools/chkobjdump.awk | 34 ---------------------------------- arch/x86/tools/objdump_reformat.awk | 4 ++-- 3 files changed, 3 insertions(+), 37 deletions(-) --- base-commit: 2cc14f52aeb78ce3f29677c2de1f06c0e91471ab change-id: 20231129-objdump-reformat-llvm-2d71b9f40ac2 Best regards, -- Nathan Chancellor