Received: by 2002:a19:f614:0:0:0:0:0 with SMTP id x20csp38298lfe; Fri, 15 Apr 2022 18:19:05 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwmROwN6AZAdW6H8C1PLOeczW3k13hdL0LgJO5azOVS9d0WkXZ/WGjHe1vTu3OvaA86EcYC X-Received: by 2002:a65:5908:0:b0:399:58f3:9acc with SMTP id f8-20020a655908000000b0039958f39accmr1271888pgu.149.1650071945524; Fri, 15 Apr 2022 18:19:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650071945; cv=none; d=google.com; s=arc-20160816; b=dYKjiZolBKGK3LKpvSGljMagyIbd0iJ3Px9JSZZzB35c5dmQujoZo3Lc6A0W3n76wG PhNHHKNoid2Yj/EK4ajjiksZe3bz+SX12qKHs4q+o/Ljqa/LmpLhzCM+Ib2/7nubJrdn TWZzygpITJhJkvVoFVK22KD1+Z+3BQY1K4HBDdsSkCoFAEoMMl7LD1N9WU3yBLGd3S/4 QrjPUIG4JBb06+dmGodXrI498P2yH+FSyM9I/xlkwPWS9Lp9vhPJE2cXB5f03wWVhA+I LKNYJNwuKdTLZzQhkErnWe2NhaIGDULJXm7/7YgpbhoZogckCw7bhOkQLwNeKjNlzUzX +THg== 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=i/2YUxZHXeRUBoBs87Jt7Yv5tGwLCyCxoPCR5L1KNRo=; b=GYdZooyI3/niDVxk0XAFF3FbjYSLr8+t70WqNfDaci4DwIIiu7KV0P1HLHHMELh4nH 9wjnPJsDW2ebgYum4qhNVqpqSHMvbwAj6Lfuj6Pup3UFOUxh5j+RgUs5yvD6AvV3Buqs QuVTzKwr0S+T90/y8SelFCq/czgYnLRmd33JdrrXTjOG4bFa7pwzgsntlCqj1gtDtlkv 7DMR95Yuj1fVSXjUrfXbxCqdr2gZZGtHLWW6O9OOzfADXKOxjorfyMGbA4n8kF6SIymn iJJMhmj1lioOUO0B+dlSwParqJBbUipgLwOBopFJ83abVp/9rp8t6N9c/8wk680Px3aN qnNw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XmvI2loG; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id k19-20020a056a00169300b004fa3a8dffb5si3361447pfc.108.2022.04.15.18.19.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 18:19:05 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=XmvI2loG; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 390EF13CCCA; Fri, 15 Apr 2022 17:54:17 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243469AbiDNRYd (ORCPT + 99 others); Thu, 14 Apr 2022 13:24:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58330 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240799AbiDNRYa (ORCPT ); Thu, 14 Apr 2022 13:24:30 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id D05CBBC85D for ; Thu, 14 Apr 2022 10:22:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649956924; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=i/2YUxZHXeRUBoBs87Jt7Yv5tGwLCyCxoPCR5L1KNRo=; b=XmvI2loGuqlSwuwXjARDBEhj15KqVcnoZ0PUGOKPNGr3dJdSVFDWywJ3GL5HhGhXs/oVML 1Gj/10VZWgwaEAHsVu4sWQMstPJf4DVfszffraHdHRZwZSdK7dazqDyP8dx+irdH9NlCuU j3/KuSmlfiEDXGru76DHVDJDs4JDOmM= Received: from mail-qv1-f69.google.com (mail-qv1-f69.google.com [209.85.219.69]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-459-bWC2LJc2PaeVa3PuLtbN4A-1; Thu, 14 Apr 2022 13:22:03 -0400 X-MC-Unique: bWC2LJc2PaeVa3PuLtbN4A-1 Received: by mail-qv1-f69.google.com with SMTP id jx11-20020a0562142b0b00b0044444479dcbso4899160qvb.9 for ; Thu, 14 Apr 2022 10:22:03 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=i/2YUxZHXeRUBoBs87Jt7Yv5tGwLCyCxoPCR5L1KNRo=; b=VBHvDy8GWBB2FWOPtEAp8FunpyzkrQUVBZbXS55cNH1pJxO3tlfzlhUAkk/vJA+UO6 ODWD6p9SWeFYGyKfGWgM7d1alU/qBVHvyLpfv9rbNOcElhLvG5SMpE7gsGi15nSaIdwg XQg6KGjex2uVD5H0DmJiiH8rC7aDUjrvvXorvPxHADu16/UOw7bkeCkeAn1jCdyXlhB0 rRwWiarjvtjSelOc0AIZ0V8lIqeKghx9SFuzFrePdgWE5P4YJx9h1txn3fZBlmLBSj8a /pkd+r6gMsVVGssD5fb+SVxImUzwfOliPwgjhNPW+FDRH8blPujysYjo1FKIZj78UQG8 8VSg== X-Gm-Message-State: AOAM530FogvhbuH0FC+zmNbQSItVjwQUsvCRC6qR67TUmwTLPe+wmC9g DwmepxaNPjH5r7J886qjY9JvFDYEUj4doBO5b4CFIuXnhmEvanf4Gj67Pre8mB+2C2QPRhjpDda PIWj/VyHnBNwGD2dS60WAo6+j X-Received: by 2002:ad4:5cca:0:b0:446:77:b7b9 with SMTP id iu10-20020ad45cca000000b004460077b7b9mr11441315qvb.124.1649956923343; Thu, 14 Apr 2022 10:22:03 -0700 (PDT) X-Received: by 2002:ad4:5cca:0:b0:446:77:b7b9 with SMTP id iu10-20020ad45cca000000b004460077b7b9mr11441296qvb.124.1649956923101; Thu, 14 Apr 2022 10:22:03 -0700 (PDT) Received: from treble ([2600:1700:6e32:6c00::45]) by smtp.gmail.com with ESMTPSA id x19-20020ae9e913000000b0069bf9aedce6sm1220069qkf.29.2022.04.14.10.22.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Apr 2022 10:22:02 -0700 (PDT) Date: Thu, 14 Apr 2022 10:21:59 -0700 From: Josh Poimboeuf To: Peter Zijlstra Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Miroslav Benes , Nick Desaulniers Subject: Re: [PATCH 02/18] objtool: Support data symbol printing Message-ID: <20220414172159.orf3ojiesksqrhsu@treble> References: <097057f88605aa67b0e3ec573fcf394ae7ac4d6f.1649891421.git.jpoimboe@redhat.com> <20220414152148.cwdefx744kymqcut@treble> <20220414153854.rqkt465xn4vzndr7@treble> <20220414170100.c66rfyvk7dp33bxx@treble> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <20220414170100.c66rfyvk7dp33bxx@treble> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no 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 Thu, Apr 14, 2022 at 10:01:04AM -0700, Josh Poimboeuf wrote: > On Thu, Apr 14, 2022 at 06:36:51PM +0200, Peter Zijlstra wrote: > > On Thu, Apr 14, 2022 at 08:38:54AM -0700, Josh Poimboeuf wrote: > > > > > > Yes, I'd not seen that yet, what's that for? The Changelog alludes to > > > > something, but I don't think it actually does get used later. > > > > > > Nick had asked for something like that, it's just a way to avoid doing > > > math every time we look at a warning, i.e. to convert func+offset to > > > sec+offset. > > > > > > But it's kind of ugly and I'm not 100% happy with it. > > > > > > Maybe it should be behind an option (--sec-offsets)? > > > > Can do I suppose... Myself, I have this script: > > > > $ cat objdump-func.sh > > #!/bin/bash > > > > OBJ=$1; shift > > FUNC=$1; shift > > > > objdump -wdr $@ $OBJ | awk "/^\$/ { P=0; } /$FUNC[^>]*>:\$/ { P=1; O=strtonum(\"0x\" \$1); } { if (P) { o=strtonum(\"0x\" \$1); printf(\"%04x \", o-O); print \$0; } }" > > That is nice, just added to my ~/bin. > > And how am I just learning about objdump "-w" ?!?! > > I wrote up a new version of that patch which adds a '--sec-address' > option (see below), but maybe I'll just drop it for now. It's not > really relevant to this set anyway. But now, testing the IBT code, I realize it would still be helpful for data addresses. So maybe I'll keep it. -- Josh