Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp5086287iog; Wed, 22 Jun 2022 11:39:30 -0700 (PDT) X-Google-Smtp-Source: AGRyM1ug2f8w2mgIa8k8Q0cCMXHdznEyh32lK9Zk81JHf2iaqkoHK0Dir5KNr6Z4I1u5EcRX95f0 X-Received: by 2002:a17:902:8f87:b0:166:3cf5:335f with SMTP id z7-20020a1709028f8700b001663cf5335fmr35059508plo.119.1655923170376; Wed, 22 Jun 2022 11:39:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655923170; cv=none; d=google.com; s=arc-20160816; b=rZcrjZwYcWdf/IyqFT2kydO06lmXGbeRKl2IrLgpS9vWbIF8YbhMyxC9ML5XRGnZZ3 O5i0jNVhLAKfvKalAt+3CM9efS0vNpYp+enNliOQoqO6y92aNTc6ON//qGVenfoyAn9S L+gF7p/d0c/WCk1lThAVRxgC9GNiwJLdLLxeOQ8quljUaU1IW5Tvv/Ex2J/WvbI0Ld+S KwejoJeiNoUDBojlYv0Mu5S9kUbwmlu7Rx/mBUYrGl9JFGuTXHV3cYkzTwG6xF8EO027 LS7UVKb7egurR5xsUbMWtZ9U/TXYipH1/cXn2vpN+A8BLios5sd2kRpRl/Vt0h5tROdU s7YQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:content-disposition :mime-version:message-id:subject:to:from:date:feedback-id :dkim-signature:dkim-signature; bh=BOv4zfNJ43lhXbjUgMokcKvSsmqFJ3GbVqMgFbujkcE=; b=S1x2u/4r9ADrg5FX9e2CSMHPnSK4blaMZEvQ9HfMLxgvBaY3ApVJSAA5lsy1rmO9pJ J+MjgZEy68run8Yo1iIL1na9qhh/18y6Nu24rD5g+Bz4HU9ySH6vLNyjitcK0LLa61QQ 4Eg1+Q5Ej72Fluo/TxHOyT/1PEAHzrwaa6aD0Bq9Hgzxw3E1t1RIvns0Frfoh86euUg8 kxX7FwqigdTXWFwTMi7duq9pz6IZ0ZoIWKQeFUhy4jZ4M1SZSD5PmkZ2jqHGiNaDMZyY LeACABio5ixPxx9WH9HQgoE7bgSLNEX6y/ffVHK60KFVeG8Qn26mVSKoh+cUJT7Uhk69 10BQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@anarazel.de header.s=fm2 header.b=mdJUuWzi; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=hGMTqY61; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s23-20020a170902b19700b001690142da59si22001845plr.100.2022.06.22.11.39.15; Wed, 22 Jun 2022 11:39:30 -0700 (PDT) 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=@anarazel.de header.s=fm2 header.b=mdJUuWzi; dkim=pass header.i=@messagingengine.com header.s=fm2 header.b=hGMTqY61; 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 S1377620AbiFVST0 (ORCPT + 99 others); Wed, 22 Jun 2022 14:19:26 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46220 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1359782AbiFVSTY (ORCPT ); Wed, 22 Jun 2022 14:19:24 -0400 Received: from wout2-smtp.messagingengine.com (wout2-smtp.messagingengine.com [64.147.123.25]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7DD00101C9; Wed, 22 Jun 2022 11:19:23 -0700 (PDT) Received: from compute4.internal (compute4.nyi.internal [10.202.2.44]) by mailout.west.internal (Postfix) with ESMTP id B9FDB3200944; Wed, 22 Jun 2022 14:19:20 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute4.internal (MEProxy); Wed, 22 Jun 2022 14:19:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=anarazel.de; h= cc:content-transfer-encoding:content-type:date:date:from:from :in-reply-to:message-id:mime-version:reply-to:sender:subject :subject:to:to; s=fm2; t=1655921960; x=1656008360; bh=BOv4zfNJ43 lhXbjUgMokcKvSsmqFJ3GbVqMgFbujkcE=; b=mdJUuWzirR/P8hMbptpAD4g8Fh LImJfkZ9hI0GD7bEKnt8qiBrUrP8AhMel4ULyqF7VihPUC/q4aAxjr++9Oher/2W fZLoohOTohGX7hwXQ7evWdrLrUAWgv4JtHxTUnaJupvhIc9pa1IXzkCQdHcfrzMo fd9gBe2FnZRVOcDmpZJzTLkoG4H74i2EPFbZUKMesUTpdLVGYnfPeK1+xlcAamuS QuDifaykE/y1EnxMmF90UMqB7WJvsK3bBsI9KQuO6LHczXcF3P1vlsEYg4w1FE1t qQ8RgVrB8PCtmCAXff8AcImDM3ffktIOIbRxU+UhBjwcuMPFOV8mnPRjmyDA== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding: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= fm2; t=1655921960; x=1656008360; bh=BOv4zfNJ43lhXbjUgMokcKvSsmqF J3GbVqMgFbujkcE=; b=hGMTqY61Hvpqs/2+evnS+K0/LYzuCEMPN1jy1h04BVZ2 N1qI80eSHyarrLp6gd33BZ798ApAlEksAY1RhT6yZrL0f20XwcDW6ZzicD1uA7c9 xhMh/bxNQvKy4+rkVrvz8umsnGb6yPDt2wk5Kz9Cdcm3MGD8TkpkhZo5scTqmpcj pBwQQ8Il62DdLrP+Zc0ArAnnP24kn29cmx2AJCvrj5BNMWhXVw4KhaDeqhiKn82W IRHd8N1EYtX98tAL4rdUmKmDDCngadLTUBw1GUmbwLniMra7N68eOFpYZ+72TOpV NgHbBKu2dlBd+6h4QEtRFj+8qqmleNg45vbDe9rekA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrudefhedguddvgecutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpeffhffvuffkgggtugfgsehmkeerredttdejnecuhfhrohhmpeetnhgurhgv shcuhfhrvghunhguuceorghnughrvghssegrnhgrrhgriigvlhdruggvqeenucggtffrrg htthgvrhhnpeehtedtueegueekkeelkeehleffteejjeekheeifeelvefgvddugfefkeel feekleenucffohhmrghinhepshhouhhrtggvfigrrhgvrdhorhhgnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomheprghnughrvghssegrnhgrrhgr iigvlhdruggv X-ME-Proxy: Feedback-ID: id4a34324:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 22 Jun 2022 14:19:19 -0400 (EDT) Date: Wed, 22 Jun 2022 11:19:18 -0700 From: Andres Freund To: linux-kernel@vger.kernel.org, bpf@vger.kernel.org, Quentin Monnet , Arnaldo Carvalho de Melo Subject: init_disassemble_info() signature changes causes compile failures Message-ID: <20220622181918.ykrs5rsnmx3og4sv@alap3.anarazel.de> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="yy7koo44v5in4hu5" Content-Disposition: inline Content-Transfer-Encoding: 8bit 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,SPF_HELO_PASS, 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 --yy7koo44v5in4hu5 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit Hi, binutils changed the signature of init_disassemble_info(), which now causes perf and bpftool to fail to compile (e.g. on debian unstable). Relevant binutils commit: https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=60a3da00bd5407f07d64dff82a4dae98230dfaac util/annotate.c: In function ‘symbol__disassemble_bpf’: util/annotate.c:1765:9: error: too few arguments to function ‘init_disassemble_info’ 1765 | init_disassemble_info(&info, s, | ^~~~~~~~~~~~~~~~~~~~~ In file included from util/annotate.c:1718: /usr/include/dis-asm.h:472:13: note: declared here 472 | extern void init_disassemble_info (struct disassemble_info *dinfo, void *stream, | ^~~~~~~~~~~~~~~~~~~~~ with equivalent failures in tools/bpf/bpf_jit_disasm.c tools/bpf/bpftool/jit_disasm.c The fix is easy enough, add a wrapper around fprintf() that conforms to the new signature. However I assume the necessary feature test and wrapper should only be added once? I don't know the kernel stuff well enough to choose the right structure here. Attached is my local fix for perf. Obviously would need work to be a real solution. Greetings, Andres Freund --yy7koo44v5in4hu5 Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="perf-compile-bfd.diff" diff --git i/tools/perf/util/annotate.c w/tools/perf/util/annotate.c index 82cc396ef516..b0e364d235b4 100644 --- i/tools/perf/util/annotate.c +++ w/tools/perf/util/annotate.c @@ -1721,6 +1721,18 @@ static int dso__disassemble_filename(struct dso *dso, char *filename, size_t fil #include #include +static int fprintf_styled(void *, enum disassembler_style, const char* fmt, ...) +{ + va_list args; + int r; + + va_start(args, fmt); + r = vprintf(fmt, args); + va_end(args); + + return r; +} + static int symbol__disassemble_bpf(struct symbol *sym, struct annotate_args *args) { @@ -1763,7 +1775,8 @@ static int symbol__disassemble_bpf(struct symbol *sym, goto out; } init_disassemble_info(&info, s, - (fprintf_ftype) fprintf); + (fprintf_ftype) fprintf, + fprintf_styled); info.arch = bfd_get_arch(bfdf); info.mach = bfd_get_mach(bfdf); --yy7koo44v5in4hu5--