From patchwork Thu Nov 30 08:51:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: tip-bot2 for Thomas Gleixner X-Patchwork-Id: 171779 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:bcd1:0:b0:403:3b70:6f57 with SMTP id r17csp243237vqy; Thu, 30 Nov 2023 00:52:18 -0800 (PST) X-Google-Smtp-Source: AGHT+IFQyrbaQsR7iW1oQj3gQrYHdxbwJzbscXZEhYabVIHU/PwjEH6vZD4V3fCNAb+BiwX9/0Bk X-Received: by 2002:a05:6870:5ccb:b0:1fa:2622:4fa with SMTP id et11-20020a0568705ccb00b001fa262204famr23301040oab.50.1701334338516; Thu, 30 Nov 2023 00:52:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701334338; cv=none; d=google.com; s=arc-20160816; b=Egl5/7ja7V1caY110WEDtdkMC68lTKiizAbIKzpptwqysP4iTNsWoF9MVMAOkwACe+ 6ExKrEIWWqzVtSRZaln7g237eLVy/HO0Ai1GQDKu/HcwQJcnIZ++T5RTmWgKkhVrRSqj tgw5S3maWH2t44ohsVn7U2FDF9SAyvZ5a0Y1U0VXhOnDAJaFoTllmz+oPdGiuTZL3bq2 agfhcCGcUe9DkAiNVzqV6S+LRGDlkYpiJsl4snv0z2QfEvBIaTpqgdRz32gGvL1V/8x5 SkRmFs6LHKoYsXA8K5085aotTFLda1SmQmagflLpgeELGHW24dSe+jdl3VnrDetg9Dvo w5NA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:robot-unsubscribe :robot-id:message-id:mime-version:references:in-reply-to:cc:subject :to:reply-to:sender:from:dkim-signature:dkim-signature:date; bh=O9AjYlYAYx+oR2KXDgTbog5n4T+oR4QcI16HbOuThJQ=; fh=Ls3SIKZSOYS/D0c8JX9EDCWn36Q3d9AslWtPrd2gQac=; b=ujL/E7wp143uUmAZUNjL7y0yqkS7+wqFJR76g9xbuYVLVKkQbBclosk4o1M4W03Ocv QnCrRzKiIyRoudRq8m/fSPMDts3xtPEZpWYxUUeIM2F3HDQn/W3bD7dCsdvbIlOfJhOO OA/iS3NOcS82PqGozDLFsI+nhzU3/IgYZCvNiCGrul6tULYMZXK7FjMBNmLI4Z78KbfI XU4xVN6Qwx4GleR6MyPJru/r8z+ZjrpAJI2/o4BF5JmUuoGY3hlH813KXL6MTOU8b2US P0mY/EWAej+OMH1hKIoIB7XBjRgLPG7nx1TqfEpamjm67fbNgbTUzck4p5PcoKGHuBDe arjA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linutronix.de header.s=2020 header.b=zzoZr18a; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from agentk.vger.email (agentk.vger.email. [2620:137:e000::3:2]) by mx.google.com with ESMTPS id t11-20020a056a0021cb00b006cddc776c74si784230pfj.324.2023.11.30.00.52.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 30 Nov 2023 00:52:18 -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=@linutronix.de header.s=2020 header.b=zzoZr18a; dkim=neutral (no key) header.i=@linutronix.de; 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=QUARANTINE dis=NONE) header.from=linutronix.de Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 05A9F80947DD; Thu, 30 Nov 2023 00:51:59 -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 S1344880AbjK3Ivj (ORCPT + 99 others); Thu, 30 Nov 2023 03:51:39 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44112 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231759AbjK3Iva (ORCPT ); Thu, 30 Nov 2023 03:51:30 -0500 Received: from galois.linutronix.de (Galois.linutronix.de [IPv6:2a0a:51c0:0:12e:550::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53BFF12C; Thu, 30 Nov 2023 00:51:36 -0800 (PST) Date: Thu, 30 Nov 2023 08:51:34 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020; t=1701334295; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O9AjYlYAYx+oR2KXDgTbog5n4T+oR4QcI16HbOuThJQ=; b=zzoZr18aSPmR5kfCWlGeDY4B2FYFk0VQU9u9msMYgexOJWsBmNt+sAQbunwtTlLNQfc7HE lHy57dfNENJ4zcX8s5gHGeGdD95iVpahnBAgmbagKf5aIDXlFFoxwaPYc3TWXmmb/lUtxk jloVKzF5Lkw3GfwlQdJGA0eBB7qf/NGdSDHjFSzgTLvaMg0PsOd0+lZaHM0/gXCrzBCcYU TVPd978b6VklnE5Hp6WRXkFlLxN2s3omhlVFww/iyS8Nr1yrNLPy8XbYZ/criu2i+DyvIv Dnh2kn0JO+56whoT2IG4UccOrGCc1PGIjNwfUHn1MJf4jlrrKam+QzqV3fDa9A== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=linutronix.de; s=2020e; t=1701334295; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=O9AjYlYAYx+oR2KXDgTbog5n4T+oR4QcI16HbOuThJQ=; b=R2vUcqhyg5AVYswADf+2gdRAhtzHftfFoFzsbOdXAX+dJgGQLzLHGyFVtj0HH9pjVckFff VdhQ//N6+G+GQYDA== From: "tip-bot2 for Samuel Zeter" Sender: tip-bot2@linutronix.de Reply-to: linux-kernel@vger.kernel.org To: linux-tip-commits@vger.kernel.org Subject: [tip: x86/build] x86/tools: objdump_reformat.awk: Ensure regex matches fwait Cc: Samuel Zeter , Nathan Chancellor , Ingo Molnar , Kees Cook , Masami Hiramatsu , x86@kernel.org, linux-kernel@vger.kernel.org In-Reply-To: <20231129-objdump-reformat-llvm-v3-1-0d855e79314d@kernel.org> References: <20231129-objdump-reformat-llvm-v3-1-0d855e79314d@kernel.org> MIME-Version: 1.0 Message-ID: <170133429425.398.12209221658096369317.tip-bot2@tip-bot2> Robot-ID: Robot-Unsubscribe: Contact to get blacklisted from these emails X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,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]); Thu, 30 Nov 2023 00:51:59 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783938462716224667 X-GMAIL-MSGID: 1783978355078503438 The following commit has been merged into the x86/build branch of tip: Commit-ID: 60c2ea7c89e375804171552d8ea53d9084ec3269 Gitweb: https://git.kernel.org/tip/60c2ea7c89e375804171552d8ea53d9084ec3269 Author: Samuel Zeter AuthorDate: Wed, 29 Nov 2023 15:17:41 -07:00 Committer: Ingo Molnar CommitterDate: Thu, 30 Nov 2023 09:38:09 +01:00 x86/tools: objdump_reformat.awk: Ensure regex matches fwait If there is "wait" mnemonic in the line being parsed, it is incorrectly handled by the script, and an extra line of "fwait" in objdump_reformat's output is inserted. As insn_decoder_test relies upon the formatted output, the test fails. This is reproducible when disassembling with llvm-objdump: Pre-processed lines: ffffffff81033e72: 9b wait ffffffff81033e73: 48 c7 c7 89 50 42 82 movq After objdump_reformat.awk: ffffffff81033e72: 9b fwait ffffffff81033e72: wait ffffffff81033e73: 48 c7 c7 89 50 42 82 movq The regex match now accepts spaces or tabs, along with the "fwait" instruction. Signed-off-by: Samuel Zeter Signed-off-by: Nathan Chancellor Signed-off-by: Ingo Molnar Tested-by: Nathan Chancellor Tested-by: Kees Cook Reviewed-by: Kees Cook Acked-by: Masami Hiramatsu Link: https://lore.kernel.org/r/20231129-objdump-reformat-llvm-v3-1-0d855e79314d@kernel.org Closes: https://github.com/ClangBuiltLinux/linux/issues/1364 --- arch/x86/tools/objdump_reformat.awk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/tools/objdump_reformat.awk b/arch/x86/tools/objdump_reformat.awk index f418c91..276e572 100644 --- a/arch/x86/tools/objdump_reformat.awk +++ b/arch/x86/tools/objdump_reformat.awk @@ -12,7 +12,7 @@ BEGIN { prev_hex = "" prev_mnemonic = "" bad_expr = "(\\(bad\\)|^rex|^.byte|^rep(z|nz)$|^lock$|^es$|^cs$|^ss$|^ds$|^fs$|^gs$|^data(16|32)$|^addr(16|32|64))" - fwait_expr = "^9b " + fwait_expr = "^9b[ \t]*fwait" fwait_str="9b\tfwait" }