Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp2088600rwl; Thu, 13 Apr 2023 01:13:01 -0700 (PDT) X-Google-Smtp-Source: AKy350b41ZmkU8q5ppB2EcGwLOuD+ENZXQJ3P9F7r/MdWDyrywquirQsx0x49Nwekq44npYbyJsf X-Received: by 2002:a17:907:3e03:b0:94e:4b26:233c with SMTP id hp3-20020a1709073e0300b0094e4b26233cmr1088836ejc.16.1681373581159; Thu, 13 Apr 2023 01:13:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1681373581; cv=none; d=google.com; s=arc-20160816; b=scCyM6SSg8LrremRwuJ8PIoPwb/z8sVHb5HokuJLu79UN34dWmdp3t+YnV+NRlovGq /C3G/Anz79iMtoN/Ua9lgCeQVTBl+uOPv9tCfbujX9+HnwjLZxwQyEJyNAHA2S4wP3ck DVEjkS7GWVAnsUAXwvjrUJdgEfbTfmZtLWJgZHs+AlTzVkOgwzDOKJCySGRDrh6kfUoz vdJYlBiIJqHJAPxQrkzosRay7fPPlsAA+/QvC0i/5uzc/4Vc9+Njp9uVLEE1uKxj9rzB yJ6bR9panfDkhqOJIbGnepxTpUNhx/Sc1SRyHXmV98pAp4/HLRv/GZmAscUBpzuWhgkC RNaQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=OoO5x34suwsOpopdEX+ItDuoVzC/7czjI+wGKkOTJ+k=; b=u0VJuYYuyeGd+51Bcqp2gBO8zY/GbGG98rv4Qpk20XTfgOsJc5Xinz0JXoYtrT8keR 58I5E/iyZ83pAtZaKvqkr7rPKkm9dBBy+SDnwW4kAAUXWwwop4fZXCcPX9TOycIcxpo6 0njbTOLsMCJZNKSuue6DSs/H9D/x3Ozmi3hsZi/TXrMFHtj7cgK3X0UWdeN3dTZfllKL fj5M/LT/htiWQrqI6rFQS0Ur9c8qX7t4/ZnoE0gIakYZitcgy1hQrMHe7xlyLUKmVeqo BfDsp/d4/0rrJDwx5aZveeTXRQXtIYS8KD3ZJbNceJWdwIEsNfy4KChr3EFdwfv3aX3K Ry0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=desiato.20200630 header.b=nDYLdrmA; 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 ff23-20020a1709069c1700b0094ea4647740si953052ejc.726.2023.04.13.01.12.36; Thu, 13 Apr 2023 01:13:01 -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=@infradead.org header.s=desiato.20200630 header.b=nDYLdrmA; 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 S230329AbjDMIKe (ORCPT + 99 others); Thu, 13 Apr 2023 04:10:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51382 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230340AbjDMIKd (ORCPT ); Thu, 13 Apr 2023 04:10:33 -0400 Received: from desiato.infradead.org (desiato.infradead.org [IPv6:2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E02362717 for ; Thu, 13 Apr 2023 01:10:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=OoO5x34suwsOpopdEX+ItDuoVzC/7czjI+wGKkOTJ+k=; b=nDYLdrmAMFcOcUo19i6oa3yqjH qaC191fNekOl313mXFAY0MN/1RvvySiCM7Y766WLfLW5KjqbcSNkkzqpkVbVYvyh2NTPFNr7GsbSe VPnUeikWMbE0EVR0KvjqImURohfk9VX+ilbK78RTLgMXBUmLxOaXuKJbGWOH3kt7angxKI9Vcq49P QIXTCCuGmt7Iz9YdiDGFaE5NXPlydbgBZ23UgMRTX3d3KrK1zI3CJFiFiCHVB0A9YRiDD0pThLWMw Bk05Newu5c8PFNvMYyfZ7TVehOThxhbdE9YClKGpibwd22o8QmHk807d6fs/AGPf8i4tKaU9Y0Dtr B8Nwb2XQ==; Received: from j130084.upc-j.chello.nl ([24.132.130.84] helo=noisy.programming.kicks-ass.net) by desiato.infradead.org with esmtpsa (Exim 4.96 #2 (Red Hat Linux)) id 1pms0F-00EfeD-0d; Thu, 13 Apr 2023 08:10:24 +0000 Received: from hirez.programming.kicks-ass.net (hirez.programming.kicks-ass.net [192.168.1.225]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (Client did not present a certificate) by noisy.programming.kicks-ass.net (Postfix) with ESMTPS id BCCBA30002F; Thu, 13 Apr 2023 10:08:22 +0200 (CEST) Received: by hirez.programming.kicks-ass.net (Postfix, from userid 1000) id A06A8235CC4A0; Thu, 13 Apr 2023 10:08:22 +0200 (CEST) Date: Thu, 13 Apr 2023 10:08:22 +0200 From: Peter Zijlstra To: Josh Poimboeuf Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Miroslav Benes Subject: Re: [PATCH v2 5/9] objtool: Add verbose option for disassembling affected functions Message-ID: <20230413080822.GH4253@hirez.programming.kicks-ass.net> References: <4cadacc719db1e792c335309056960ca6f71139e.1681325924.git.jpoimboe@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4cadacc719db1e792c335309056960ca6f71139e.1681325924.git.jpoimboe@kernel.org> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_NONE,URIBL_BLOCKED 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 On Wed, Apr 12, 2023 at 12:03:20PM -0700, Josh Poimboeuf wrote: > + objdump_str = "%sobjdump -wdr %s | gawk -M -v _funcs='%s' '" > + "BEGIN { split(_funcs, funcs); }" > + "/^$/ { func_match = 0; }" > + "/<.*>:/ { " > + "f = gensub(/.*<(.*)>:/, \"\\\\1\", 1);" > + "for (i in funcs) {" > + "if (funcs[i] == f) {" > + "func_match = 1;" > + "base = strtonum(\"0x\" $1);" > + "break;" > + "}" > + "}" > + "}" > + "{" > + "if (func_match) {" > + "addr = strtonum(\"0x\" $1);" > + "printf(\"%%04x \", addr - base);" > + "print;" > + "}" > + "}' 1>&2"; Do we want to have scripts/objdump-func.awk and use that to avoid the duplication and eventual divergence of these awk thingies?