Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp1487748pxm; Thu, 3 Mar 2022 19:40:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJz8bQ1ToYXfbi9IUrySvsvdYdhN5YL22t9YEZgjlEgcBYYdOC8U9mgsptFLCL0qkazXx/MV X-Received: by 2002:a05:6402:3512:b0:404:c2c8:5327 with SMTP id b18-20020a056402351200b00404c2c85327mr36974584edd.107.1646365230359; Thu, 03 Mar 2022 19:40:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1646365230; cv=none; d=google.com; s=arc-20160816; b=wEmvKwGyb4uG6bOj7U1UMjezGx8N4tzPDCSNutG6oTajjtHSTWzc7vOhOPLjIHx9kY oYmTsPS7c6HZBSIUE34tkTWtoBQHPrUuLlekCfsnvb9OovSR92TkeAKqH0xTVpFD3TzM 5freoC1jcH4ajNq/ndpBpJQ05WZCrL2U3ORwJUICb75t/7Z37bDMZyNk9FjRIRGgqwLD FSKtE0TXpt4HrsG/OBEtvBe94/9vYr1VY2lWGsiQlFTvhqTT9v3gGy8vAp4neDc48UwG 5cGBORbkyxrujiXcvV5b9CZ+mUmVlGcixYBOeN6FE0oF5AvBv4eAC+uCqejBJINDs+dM Tc0w== 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:date:subject:to:from :dkim-signature; bh=Xdoric3RTXYKwt8RzxRE1iq6shIZZ4Zbnw0lFh9QTVo=; b=d5FvrHnL1VdwdfZPBu3a6xI5fUI4ZdoHLhbopz8+zeTlXxMlo1pIywwVT7yGeUYOGB xxeYmr1jqGZUBRmcFt/rMUexlMYrT5O8eRcD1S/CK4jjS5RaRXRG7N6EsSnnFrT7BW7W E2t56rMEWe/bT63DQXxmkt5bstmmJq6A+Expb8IJPEWg8AXTs1EJHgvArkko1u1UYsXX VANbpAzKA0KEoBKT4BHbgo7bCvbYi9jX78BvEb3u+DqS4ZcT1s98iQL1BIneYfaakpnF JXgynzJPnzAMkS8U0cdak0R1vObLDZG+pJUE86wP+tpZFp6P7bCb4GOLAW4IZ8Xq+Cg1 kkmQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jeaZuKcs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hq9-20020a1709073f0900b006d0a32c03f8si3415386ejc.23.2022.03.03.19.40.06; Thu, 03 Mar 2022 19:40:30 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=jeaZuKcs; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235803AbiCDD0A (ORCPT + 99 others); Thu, 3 Mar 2022 22:26:00 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58766 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230484AbiCDDZ7 (ORCPT ); Thu, 3 Mar 2022 22:25:59 -0500 Received: from mail-io1-xd2f.google.com (mail-io1-xd2f.google.com [IPv6:2607:f8b0:4864:20::d2f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C6DE417F683 for ; Thu, 3 Mar 2022 19:25:12 -0800 (PST) Received: by mail-io1-xd2f.google.com with SMTP id q8so8180454iod.2 for ; Thu, 03 Mar 2022 19:25:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=Xdoric3RTXYKwt8RzxRE1iq6shIZZ4Zbnw0lFh9QTVo=; b=jeaZuKcsBmQce6PQhFrYx4iFqsn3He+X6muOBJ200kVs09Zu3QRdyk624e3vxeZghv u7vWIXZMzrebbTRdroLdnGa1hv9tt+n6IIyb6Rif4Ry8k7MWhPsRumdFWgxEVE/uPI5D TQwWRHLfih2vxL3zgCRca5/f7tYptB2hwsBE1tnbdpbdNAEbzzK6tzCZLTt05RwoUttZ hZORyRZCSrHXm/cuMN9JJhjPjXgK8U1e/PIdLnFEXAWU/giF4Bm4a8WbeDoHKZf6xhsy vk/JPVaLxDmcJMr9nbKr44RJkw9hl/fH+W53dpsXtqaH52UkbzxCZg232iWUXS8wYqu/ BF4g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=Xdoric3RTXYKwt8RzxRE1iq6shIZZ4Zbnw0lFh9QTVo=; b=TfcVQSNnDdrq34kXSZ6Om6vdLxPdfV7OCqNimrg4OiEqCoFKoeC2OMuYEUXsSKENu7 0eUnErjU1N7gg7bisqVOpXgIZgzKHAPdtTstEr71CWRn80/ZJdgs7QzZa3TLb4sHuD+A dUpqYnT8aHehV6tg1Tkb1Z9ZfNtWpHpAdSff7czrRebHns9JYjvfLnICysVgJN1vIemE UrL8ipwCFrIdGxH7kWaNw5Z0U8llYhpoDgsha+qdrYTK6uwNFe1cnssPx/NSv6SXtt+5 +jMJD3wCLIbp+daObG8GJQkuvrpgp2wOctPjgUbHKc+vp6SpxvYabdpGdDBM+xzgpbLh xQZA== X-Gm-Message-State: AOAM533gku+hz4pLJfdPEwI9J5+2Pciv9WahXD+hli3PNBYkSh3w+rpX E2QeIEa0INFc5sLge3RjmTg= X-Received: by 2002:a05:6638:1514:b0:317:738a:8418 with SMTP id b20-20020a056638151400b00317738a8418mr4836433jat.71.1646364312169; Thu, 03 Mar 2022 19:25:12 -0800 (PST) Received: from localhost.localdomain (118-208-215-36.tpgi.com.au. [118.208.215.36]) by smtp.gmail.com with ESMTPSA id a13-20020a056e02180d00b002c25b51d5ecsm4114751ilv.55.2022.03.03.19.25.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 03 Mar 2022 19:25:11 -0800 (PST) From: Sam Zeter To: mhiramat@kernel.org, Thomas Gleixner , Ingo Molnar , Borislav Petkov , Dave Hansen , x86@kernel.org, "H. Peter Anvin" , Nathan Chancellor , Nick Desaulniers , Samuel Zeter , linux-kernel@vger.kernel.org, llvm@lists.linux.dev Subject: [PATCH v2 1/2] arch/x86/tools/objdump_reformat.awk: Ensure regex matches fwait Date: Fri, 4 Mar 2022 14:16:10 +1100 Message-Id: <20220304031611.5763-2-samuelzeter@gmail.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220304031611.5763-1-samuelzeter@gmail.com> References: <20220304031611.5763-1-samuelzeter@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,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 From: Samuel Zeter 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 --- 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 f418c91b7..276e572a6 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" } -- 2.35.1