From patchwork Tue Jan 24 11:04:59 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: David Rheinsberg X-Patchwork-Id: 47663 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp2086285wrn; Tue, 24 Jan 2023 03:07:46 -0800 (PST) X-Google-Smtp-Source: AMrXdXuNFHACwMpECEGjGEYWB71Y3IHkFivuymwVR+Amm2vmyO3an/JbW7McCurGq0Wosnn3Nqy+ X-Received: by 2002:a05:6a20:1b04:b0:af:88d2:33f8 with SMTP id ch4-20020a056a201b0400b000af88d233f8mr49071062pzb.7.1674558466320; Tue, 24 Jan 2023 03:07:46 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1674558466; cv=none; d=google.com; s=arc-20160816; b=yJVEAKQBqp3Pu+Ae3z8CPKlQn+XmfPb8T8zwq725Ko34fksgBQGVnRs0VrobK9SEeo 0dLyMiuNYLeksyf4j/0RHhbtEgsCB+XpiWqJDPIZ9CWc4KPI228sFe8bH794yCvvds1q vx4qEp8mhSqwzsTuWej3vKUZ6KGuml8WYokBatlBXaq95LtwUxRrSIzhRrYEAmLk9ZcD 46BcTr8AWRR92ufUEyNWp/YBaAdZwCeOEjCTbDTGdfpoa3AVRuqSoDyyP4Quw2h38UBh eupY5zNy26kTIpBATUTgsXI6Vg3RiSADlwCVPriCmemWZlJABWFEf3fmLp2aR3zENk4O HXKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:subject:cc:to:from:date:message-id:mime-version :user-agent:feedback-id:dkim-signature:dkim-signature; bh=tEYZlf43dWAmtICS4wUuBE8sXSOA8yFH1Yjm+gpaNlY=; b=fG/+OCdFqPpJfRfnbM01mPQjVJ5gwuDvK8qJmM8rsYoPbHP/x4d6x7UvjeVP1i0Q0Y M+4qPN1oxaalsRBw/T3V5xdiUpJ0Fibbc/L896+J14FFrpNjMyjoIPXS+8FmAyqK2YFM I/QbySoSk/EAka7yU7Sx/DGGGPyajNSvTN3chAvvjQME00MocpKONuilKBoGWB+LrMd2 lysTTlALAyIpAWp/uOO2owc1N48FpCOn+zw1z1f+gUkAYnm+oWteg2brZjredbvuuLpy sM1WbbiGwPr4qzxRIJt6HU8oV8plKk5RtEeyiDNq43FvER6wtfk8NX6CwUbbqZk9F8lf diqg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@readahead.eu header.s=fm3 header.b=txsl7iat; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=IIRMCaC8; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k189-20020a6384c6000000b004d056225b6fsi1871306pgd.811.2023.01.24.03.07.34; Tue, 24 Jan 2023 03:07:46 -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=@readahead.eu header.s=fm3 header.b=txsl7iat; dkim=pass header.i=@messagingengine.com header.s=fm3 header.b=IIRMCaC8; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233798AbjAXLF6 (ORCPT + 99 others); Tue, 24 Jan 2023 06:05:58 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37368 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233831AbjAXLFl (ORCPT ); Tue, 24 Jan 2023 06:05:41 -0500 Received: from out4-smtp.messagingengine.com (out4-smtp.messagingengine.com [66.111.4.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F40FD3C21; Tue, 24 Jan 2023 03:05:31 -0800 (PST) Received: from compute6.internal (compute6.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 268D05C092A; Tue, 24 Jan 2023 06:05:31 -0500 (EST) Received: from imap50 ([10.202.2.100]) by compute6.internal (MEProxy); Tue, 24 Jan 2023 06:05:31 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=readahead.eu; h= cc:cc:content-type:date:date:from:from:in-reply-to:message-id :mime-version:reply-to:sender:subject:subject:to:to; s=fm3; t= 1674558331; x=1674644731; bh=tEYZlf43dWAmtICS4wUuBE8sXSOA8yFH1Yj m+gpaNlY=; b=txsl7iatIcaamMHLXf8zCa7fxGJWLBs3beJ3qWIPLnrmhAR8mkd TGncrksVfnrw2IH2M/tyfIJCgC+nJ2Pm1iy1A7gaWiuANkGwaRJGigsX3QCBJzrH yncwMBb1uwnu3RelAwAk7o1OiRQwSKH/b6AsSG4yhPesLEHrRnjXhqMF7gNY86op N6yc5JlcERAXkKveXq53ET0NlokxxY1gT9JNjUPO0lIFHv1Cg7SlYLIWuV/CB7t8 +ZM45RFqA5vKnoSaS54REFYYok94sAUyknyn/YMmVpxde5F7u4Fipc1Zi3ycIffi 8L9FNnObaQIRZQkhqdnvDxmtPeN25ret+fQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date:feedback-id :feedback-id:from:from:in-reply-to:message-id:mime-version :reply-to:sender:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1674558331; x= 1674644731; bh=tEYZlf43dWAmtICS4wUuBE8sXSOA8yFH1Yjm+gpaNlY=; b=I IRMCaC8HW9R8RhfwAjJzkzQR9L9J+v6Z5833TBT9/nk+2IOv0HkaL3Q+ql4QpciA casH/tqUAhLB6b30QuZQPKIt6BTZdrMibpe/ORcLFWVDzVhXkqIRpt7uWNI5Nb+x cDhl8Bt9qxMIr379A0pHnPisMvXawP4qouNJjTgfrn4FCVzeaXUsal+IOx8TQmUu OZDtoHQvYfINJ0evvvztAviS6UCEE+hcOeNl9cd0dUpCX8gXpEjl66Uvssgc/310 sX8GzGGbP2ytFh10P4KFzkvbcazKNFt7iF0EzJpywSGFYqSS8wfN8efiVqFwS+HK DeJ/rp6N4q22vmjwbObqg== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedruddvtddgvddtucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhepofgfggfkfffhvfevufgtsehttdertderredtnecuhfhrohhmpedfffgrvhhi ugcutfhhvghinhhssggvrhhgfdcuoegurghvihgusehrvggruggrhhgvrggurdgvuheqne cuggftrfgrthhtvghrnhepveeiffetveejgfdtteevleetleejtddvvdeftdffkeejveef veeguedtkefgjeevnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilh hfrhhomhepuggrvhhiugesrhgvrggurghhvggrugdrvghu X-ME-Proxy: Feedback-ID: id2994666:Fastmail Received: by mailuser.nyi.internal (Postfix, from userid 501) id 3334A1700089; Tue, 24 Jan 2023 06:05:30 -0500 (EST) X-Mailer: MessagingEngine.com Webmail Interface User-Agent: Cyrus-JMAP/3.9.0-alpha0-85-gd6d859e0cf-fm-20230116.001-gd6d859e0 Mime-Version: 1.0 Message-Id: <320c4dba-9919-404b-8a26-a8af16be1845@app.fastmail.com> Date: Tue, 24 Jan 2023 12:04:59 +0100 From: "David Rheinsberg" To: linux-kernel@vger.kernel.org Cc: rust-for-linux@vger.kernel.org, "H. Peter Anvin" , x86@kernel.org, "Dave Hansen" , "Borislav Petkov" , "Ingo Molnar" , "Thomas Gleixner" Subject: [PATCH] x86/insn_decoder_test: allow longer symbol-names X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS 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-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1755901818188596519?= X-GMAIL-MSGID: =?utf-8?q?1755901818188596519?= Increase the allowed line-length of the insn-decoder-test to 4k to allow for symbol-names longer than 256 characters. The insn-decoder-test takes objdump output as input, which may contain symbol-names as instruction arguments. With rust-code entering the kernel, those symbol-names will include mangled-symbols which might exceed the current line-length-limit of the tool. By bumping the line-length-limit of the tool to 4k, we get a reasonable buffer for all objdump outputs I have seen so far. Unfortunately, ELF symbol-names are not restricted in length, so technically this might still end up failing if we encounter longer names in the future. My compile-failure looks like this: arch/x86/tools/insn_decoder_test: error: malformed line 1152000: tBb_+0xf2> ..which overflowed by 10 characters reading this line: ffffffff81458193: 74 3d je ffffffff814581d2 <_RNvXse_NtNtNtCshGpAVYOtgW1_4core4iter8adapters7flattenINtB5_13FlattenCompatINtNtB7_3map3MapNtNtNtBb_3str4iter5CharsNtB1v_17CharEscapeDefaultENtNtBb_4char13EscapeDefaultENtNtBb_3fmt5Debug3fmtBb_+0xf2> Signed-off-by: David Rheinsberg --- arch/x86/tools/insn_decoder_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/x86/tools/insn_decoder_test.c b/arch/x86/tools/insn_decoder_test.c index 472540aeabc2..366e07546344 100644 --- a/arch/x86/tools/insn_decoder_test.c +++ b/arch/x86/tools/insn_decoder_test.c @@ -106,7 +106,7 @@ static void parse_args(int argc, char **argv) } } -#define BUFSIZE 256 +#define BUFSIZE 4096 int main(int argc, char **argv) {