Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp4903933rdh; Wed, 29 Nov 2023 14:18:17 -0800 (PST) X-Google-Smtp-Source: AGHT+IGanZy+u7lbgEYmVK1eontPNikUXDe3j9MDWNur2UtZRlkTOnNHlNbKAp8ydragCTnW1e/4 X-Received: by 2002:a17:903:190:b0:1cf:ff65:b7ca with SMTP id z16-20020a170903019000b001cfff65b7camr7320688plg.8.1701296297229; Wed, 29 Nov 2023 14:18:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701296297; cv=none; d=google.com; s=arc-20160816; b=peGeRcYc6lGgs8Od44Tb2aKW+6jE2yegI7flTWSCZhbcgXeewCgqgqs41sfnr6o/v+ Sxr8I7IntmtxIN52IE/kLsEOTcCYGcDielCvQglerLVfcolT7aIsmv2AR/T+XMrvehfh nXToZQ9906381KIQ0gwpneGPAvWma/XYEZ3MuKRM9i54jW5ZdWlZMJXcuTOipVeuCDO1 LihyioN+SMe9OJl7H17ewuoPHmLwFRZAEq8S0/cc1GkY1Yx3qZEcXU/o0q6mZFx8lIB+ 3m6IDE2CVi9Wxlf830afOFhDwG89kO2A8qtvou7N7hxiISUxX9nmSGUTFx+oY2ivMfkm XItQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=EXWm2hhfCC3TKkbaOEUhKZl/lRK/N+fi3a3PzDU7MWk=; fh=VuE012xvnkbmKdVz6qCJ/DYLIa42Cu/uD91abXTRPQU=; b=jTt15wTZFontQnzktdpgZSPeqm9LhIY7K/Rlw3EF+YZTzAy3PspqXAvFY4wbG9adKI GV6PsCLUdHL3DSJfN0YNZnYdibY+k9Err/Zdw/g3ZNhTMLacl/NA0ULyfNVvDD77tCTg Hdb8YTmxNU3ilQ9sGERlKFNudDnKmqnzzWFb10Xjz+ZKBYlzuokL1EX31KHD24aFzZAE pl3dl0tDWmCy3xD/glkVBTpL4l0Q5IkPkH9pAzes6UNfuLZw/jphPqRzPPQJfAEoBR0r w9qziFUZgVSppmmubR8Ki3GfKl3qmm4a/y7K+tv2hWeNK+6OHgXU1Lro8rQmsmR9dq18 b7dQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DgKRw0Wc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (snail.vger.email. [2620:137:e000::3:7]) by mx.google.com with ESMTPS id i1-20020a170902c28100b001b8922e82e3si14280663pld.297.2023.11.29.14.18.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Nov 2023 14:18:17 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 as permitted sender) client-ip=2620:137:e000::3:7; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=DgKRw0Wc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:7 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 snail.vger.email (Postfix) with ESMTP id 91A2B802C8D8; Wed, 29 Nov 2023 14:18:15 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at snail.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1343490AbjK2WSC (ORCPT + 99 others); Wed, 29 Nov 2023 17:18:02 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53464 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234811AbjK2WRy (ORCPT ); Wed, 29 Nov 2023 17:17:54 -0500 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7508FA3 for ; Wed, 29 Nov 2023 14:18:00 -0800 (PST) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 6A9A3C433C8; Wed, 29 Nov 2023 22:17:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1701296280; bh=x4TBp4Z9XhIDLhh0xttndJ/PopPagvhZ0Lb2IMMCW4U=; h=From:Date:Subject:References:In-Reply-To:To:Cc:From; b=DgKRw0WcZAGYG6wH2WUqROmzHkf+woNvutMXXI8fghOo3fmrd7MvoqIFR1ntnbhRe 438ZPSoguk3VbBFQkIvvNb4oG4jexfiXAZ9X9DRnPUGSs+WG5muABqId2ZOhJFXMZx V2NAQk+g+qfLPher6FKc1PoxXkDsnqxD2+fwKsZLvDDmi9XOVW6cU0Yk8SuT+NTn3s OAnjn8KhEjzc+i1z1aT/iWJkguGGrFd/JAXR72xCt/vpRBuY7cVoP4XaUn0tJPcqXX uZ8ujdu1DtAGZR9DPDKHd7xFEk6LaliHetyFbSEZKp+NipFuwvlRu98bwI6DvASNED IIWikr5ga4PiQ== From: Nathan Chancellor Date: Wed, 29 Nov 2023 15:17:43 -0700 Subject: [PATCH v3 3/3] x86/tools: Remove chkobjdump.awk MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231129-objdump-reformat-llvm-v3-3-0d855e79314d@kernel.org> References: <20231129-objdump-reformat-llvm-v3-0-0d855e79314d@kernel.org> In-Reply-To: <20231129-objdump-reformat-llvm-v3-0-0d855e79314d@kernel.org> 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=2562; i=nathan@kernel.org; h=from:subject:message-id; bh=x4TBp4Z9XhIDLhh0xttndJ/PopPagvhZ0Lb2IMMCW4U=; b=owGbwMvMwCUmm602sfCA1DTG02pJDKnpO6acFV/52cUv7O85hTX/f2uwvFNNe1awYMVhnWQ91 wOZGkpTO0pZGMS4GGTFFFmqH6seNzScc5bxxqlJMHNYmUCGMHBxCsBEZA0Z/see2H/ywST2UN5r Suy9ctuEt148t0Fjl2C976+3H1Ll5n9j+CvI0Zbz5dC3TNHZVe2NCtdyly570pC7bvPN1ut9jpF bn/MBAA== X-Developer-Key: i=nathan@kernel.org; a=openpgp; fpr=2437CB76E544CB6AB3D9DFD399739260CB6CB716 X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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 (snail.vger.email [0.0.0.0]); Wed, 29 Nov 2023 14:18:15 -0800 (PST) This check is superfluous now that the minimum version of binutils to build the kernel is 2.25. This also fixes an error seen with llvm-objdump because it does not support '-v' prior to LLVM 13: llvm-objdump: error: unknown argument '-v' Closes: https://github.com/ClangBuiltLinux/linux/issues/1362 Link: https://github.com/llvm/llvm-project/commit/dde24a87c55f82d8c7b3bf3eafb10f2b9b2b9a01 Reviewed-by: Kees Cook Tested-by: Kees Cook Signed-off-by: Nathan Chancellor --- arch/x86/tools/Makefile | 2 +- arch/x86/tools/chkobjdump.awk | 34 ---------------------------------- 2 files changed, 1 insertion(+), 35 deletions(-) diff --git a/arch/x86/tools/Makefile b/arch/x86/tools/Makefile index 90e820ac9771..7278e2545c35 100644 --- a/arch/x86/tools/Makefile +++ b/arch/x86/tools/Makefile @@ -17,7 +17,7 @@ reformatter = $(srctree)/arch/x86/tools/objdump_reformat.awk chkobjdump = $(srctree)/arch/x86/tools/chkobjdump.awk quiet_cmd_posttest = TEST $@ - cmd_posttest = ($(OBJDUMP) -v | $(AWK) -f $(chkobjdump)) || $(OBJDUMP) -d -j .text $(objtree)/vmlinux | $(AWK) -f $(reformatter) | $(obj)/insn_decoder_test $(posttest_64bit) $(posttest_verbose) + cmd_posttest = $(OBJDUMP) -d -j .text $(objtree)/vmlinux | $(AWK) -f $(reformatter) | $(obj)/insn_decoder_test $(posttest_64bit) $(posttest_verbose) quiet_cmd_sanitytest = TEST $@ cmd_sanitytest = $(obj)/insn_sanity $(posttest_64bit) -m 1000000 diff --git a/arch/x86/tools/chkobjdump.awk b/arch/x86/tools/chkobjdump.awk deleted file mode 100644 index a4cf678cf5c8..000000000000 --- a/arch/x86/tools/chkobjdump.awk +++ /dev/null @@ -1,34 +0,0 @@ -# GNU objdump version checker -# -# Usage: -# objdump -v | awk -f chkobjdump.awk -BEGIN { - # objdump version 2.19 or later is OK for the test. - od_ver = 2; - od_sver = 19; -} - -/^GNU objdump/ { - verstr = "" - gsub(/\(.*\)/, ""); - for (i = 3; i <= NF; i++) - if (match($(i), "^[0-9]")) { - verstr = $(i); - break; - } - if (verstr == "") { - printf("Warning: Failed to find objdump version number.\n"); - exit 0; - } - split(verstr, ver, "."); - if (ver[1] > od_ver || - (ver[1] == od_ver && ver[2] >= od_sver)) { - exit 1; - } else { - printf("Warning: objdump version %s is older than %d.%d\n", - verstr, od_ver, od_sver); - print("Warning: Skipping posttest."); - # Logic is inverted, because we just skip test without error. - exit 0; - } -} -- 2.43.0