Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp860036pxb; Fri, 15 Apr 2022 13:29:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxTaTavKN+bv65xz38g84v/FU35NDVBgoYQMal1wioocZakocASCR82kH/8HitDahBIJFw3 X-Received: by 2002:a17:90b:33c4:b0:1d0:b950:31fe with SMTP id lk4-20020a17090b33c400b001d0b95031femr5293188pjb.162.1650054596070; Fri, 15 Apr 2022 13:29:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650054596; cv=none; d=google.com; s=arc-20160816; b=fJ4QtkxUe5N3O50yaMnTj6AqK7KKVCFR9UI9RuSUkz2xh8UAaqrmIW0hw1/bN7mz+w 5TiuPhZ4FzE61r6ISeMfwmiCrxiCoZVTwvplqiEEJG9HCXw611pZarPlcQcdj1Qoe8/L Y64eG/hh4xN954Tt8jbfpvMe1R6NvO63lB4n9PCaM5tv+fIjGnVrH21O7m4vxB18iSgl C17LoRRBvNbuRrDd0v7TYLI1cJdIRM8urOz+6ZW8DyJXoEMmMv3X7SrDUSMItxMfERV8 Yp06x7NNJwlMhGUMfOYNmGlk8dz68AsVnQ2rQgMB/2QgHtFW/cE0fWkncOqlAcU1605s SjZA== 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=0xrO22xcEliQqdlgNP22dh9mENDXbmI2r51Wf1LJDew=; b=D0Nxh/HUHmlsS5zu43SPK37hZ03NkzEGFpmgh+Rra1Crc3X1uaLGz9hCOHlHsj26UX wmD6KNDI94tfCW7h8zv3yGTSxOKuzxLb89KwparSz3fTbrDpE6jXzN9MglHbfecWf5ZH V8ly7ax97JkNFLPJEZ2k548e0TYevrtD48PP790y4mNARYHfxCJCl536fNC/SFyaynhk v7rQtH0DD0r1aA9L3qDrrKm7LKEKmlU3FPNImZVL1LT09+SeWRB8zxjWw5O8M14jj5Qi f+4aGxyRzY242h21wZC0F3jEnb0wTqhrrP5I4Ma0oKl7I4y2IujVTx6c69IfJGo17J3S dfOQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=UJxDmPaT; 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=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s23-20020a63ff57000000b00399599c54ffsi2354359pgk.252.2022.04.15.13.29.41; Fri, 15 Apr 2022 13:29:56 -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=@redhat.com header.s=mimecast20190719 header.b=UJxDmPaT; 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=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355769AbiDNP7F (ORCPT + 99 others); Thu, 14 Apr 2022 11:59:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58344 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1354665AbiDNPlG (ORCPT ); Thu, 14 Apr 2022 11:41:06 -0400 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 20CC7DFDED for ; Thu, 14 Apr 2022 08:21:55 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649949714; 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=0xrO22xcEliQqdlgNP22dh9mENDXbmI2r51Wf1LJDew=; b=UJxDmPaTkc3OgZ8UtllnzpiXqdoCNrXUmQ2Pd1hDb9xcGAPSD0ZeOLCE6Nk6fLxwRdVSZ0 A4ka1HguV+5X5h4+R1+lI6TVi9GeZwWoykkKTDhDggjNqYpj1QOwJuozYBzXD325CE17OR /ht3FSFwIGrzjrl/B2MB3rLUVeXCcqg= Received: from mail-qk1-f197.google.com (mail-qk1-f197.google.com [209.85.222.197]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-662-Vd3usRC8N7KogbdN2xiTfw-1; Thu, 14 Apr 2022 11:21:52 -0400 X-MC-Unique: Vd3usRC8N7KogbdN2xiTfw-1 Received: by mail-qk1-f197.google.com with SMTP id q5-20020a05620a0d8500b004738c1b48beso3479810qkl.7 for ; Thu, 14 Apr 2022 08:21:52 -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=0xrO22xcEliQqdlgNP22dh9mENDXbmI2r51Wf1LJDew=; b=v93JUX6zdH/ZKyucoBEV9uXJrkinwVjISSkIoTpefuV1j7CKY2wg/2EBd9+EhnbuT0 sKnzGsp9kzp3/wPT7UZpuFRSrAWHeG60rrLXyaiQtTiBp1Z9M7NKXv6sssCxO5Q68fa5 9xHiTjIVfs0dg0gSeAQ5qbMeRUNKDLFW+SgSrBlGgudvIMJcFsKe8Oda+W5mttqm6tC2 KjXNqoX8fAJZN/HHpDx9RdRJrdaRCJkPMOZImY7mWUHkXNL5HjIyjOQP9NohcRekZhpw T4WnYQW3FllWDXE462cHGV2LS4M7soQhdSgoRdI8x4ID2r/810kUivikvkZsTVpKFUW+ n4Rw== X-Gm-Message-State: AOAM532qF1ABULqUKJVxcr0ByTrLovVncQRpgTMsUmesPHvQU3XONQda 2f82oiDkdw+8tscAFy1f6fbqzvMencZDTRXMCZzhu2cdnXNi0puEtF13jDXuAy44rQkXtjHCvWs lp3OwWJani5GGbwnnOpmVvKzh X-Received: by 2002:ae9:f016:0:b0:69c:37ea:9b38 with SMTP id l22-20020ae9f016000000b0069c37ea9b38mr2217864qkg.335.1649949712350; Thu, 14 Apr 2022 08:21:52 -0700 (PDT) X-Received: by 2002:ae9:f016:0:b0:69c:37ea:9b38 with SMTP id l22-20020ae9f016000000b0069c37ea9b38mr2217849qkg.335.1649949712127; Thu, 14 Apr 2022 08:21:52 -0700 (PDT) Received: from treble ([2600:1700:6e32:6c00::45]) by smtp.gmail.com with ESMTPSA id s12-20020a05622a018c00b002e1cd88645dsm1363000qtw.74.2022.04.14.08.21.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Apr 2022 08:21:51 -0700 (PDT) Date: Thu, 14 Apr 2022 08:21:48 -0700 From: Josh Poimboeuf To: Peter Zijlstra Cc: x86@kernel.org, linux-kernel@vger.kernel.org, Miroslav Benes Subject: Re: [PATCH 02/18] objtool: Support data symbol printing Message-ID: <20220414152148.cwdefx744kymqcut@treble> References: <097057f88605aa67b0e3ec573fcf394ae7ac4d6f.1649891421.git.jpoimboe@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_NONE,SPF_NONE, 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 On Thu, Apr 14, 2022 at 09:05:47AM +0200, Peter Zijlstra wrote: > On Wed, Apr 13, 2022 at 04:19:37PM -0700, Josh Poimboeuf wrote: > > > @@ -34,8 +37,8 @@ static inline char *offstr(struct section *sec, unsigned long offset) > > > > str = malloc(strlen(name) + 20); > > > > - if (func) > > - sprintf(str, "%s()+0x%lx", name, name_off); > > + if (sym) > > + sprintf(str, "%s%s+0x%lx", name, is_text ? "()" : "", name_off); > > else > > sprintf(str, "%s+0x%lx", name, name_off); > > So I like the patch, except that "()" thing is something where we differ > from the kernel's %ps format and I've cursed it a number of times > because I then have to manually edit (iow remove) things when pasting it > in various scripts etc.. Oh, hm, that's true. I can remove them if you prefer. > That said, it totally makes sense to differentiate between a text and > data symbol this way :/ Yes, but if we're keeping the "Add sec+offset to warnings" patch then that distinction is already (kind of) being made by showing the data section name. And the data symbol warnings should be rare. -- Josh