Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp204082iob; Mon, 2 May 2022 17:08:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxfEVLiZtAvqnrwS9jO5zA+5+Dn0MQDf+dOLvdR3/oFwNHK6QcXJH3m3RQkhaq02N6NSaAf X-Received: by 2002:a17:902:e84d:b0:15e:b0af:477b with SMTP id t13-20020a170902e84d00b0015eb0af477bmr3738783plg.49.1651536496260; Mon, 02 May 2022 17:08:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1651536496; cv=none; d=google.com; s=arc-20160816; b=bbVtQTI8IppTgCE/Kq73GNbbWjMpZWwkPQPGMkYsYEt7647+dXL2wipe7RpDPpIMKK OETECqPZiijMKcixBVguyaCYj9El66FHV05fcBwOb5PKwMwyyREtCiuKrqCBGmGNZY00 O0EErjDHi1uddq4TNJmrXOpinYCaHEZ+fCXm2cPTu330wEsNGKawdIY/MZ7TaSKRMcj3 trUYLPB3BTCPTmFWfMyx6Qn3FOE6Cq/f/ptpFuOQVuJIGr/DTn7+8XVWQcMhYKWrvo+w 8Rb/EV5nklfSlFXOKkx/CVeBZa3MasBVMBcTJTHFkySV0gCxKgnPskVLEtFLT7RjASqp dWJA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date; bh=HeE+jvMuSepAN6bGRByBQRCWrc9qLDzFHsO0SqckYkU=; b=dqjOQNpY/imTr8nyz+SiE+jnJ6ED+74vNghjj4geQxobztBAtuoY3SNdv9IpU1bEqM C1oozPZwOW0kXHZ9soaz3vCi6ZP+lEpBM7xspn+0oSHpsoVg9On6enIbCk+XzIJ3tocM 4m5q4QAtC29e4hCHkTerNq88MczaS5K6W9+wL+jO1tuRfgczoWpxHKwZ2HcqO4gwDR2R yPe0GFP1wR8x6itnhBUa3OMiQEUGxzDbXIpbEbDeHSqoTWVWLS+r4JgXHnexCLf/okbC zR8fSKayVjS1Pe/jITIIQbUH0iE+cyKwus74WZMSnQAFB2UiVMiBKd0HOmQBo8VWFhpr gu3g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id t1-20020a170902e1c100b00156890a4f22si13671700pla.483.2022.05.02.17.08.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 May 2022 17:08:16 -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; 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 Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 1A67B340F1; Mon, 2 May 2022 17:07:48 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1352962AbiD1Wpf (ORCPT + 99 others); Thu, 28 Apr 2022 18:45:35 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:42254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349982AbiD1Wpc (ORCPT ); Thu, 28 Apr 2022 18:45:32 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5D8A5BABA9 for ; Thu, 28 Apr 2022 15:42:16 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id E9FC36207D for ; Thu, 28 Apr 2022 22:42:15 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7D0ECC385AD; Thu, 28 Apr 2022 22:42:14 +0000 (UTC) Date: Thu, 28 Apr 2022 18:42:12 -0400 From: Steven Rostedt To: "Naveen N. Rao" Cc: Michael Ellerman , Nathan Chancellor , Nick Desaulniers , , , llvm@lists.linux.dev Subject: Re: [PATCH v2 2/2] ftrace: recordmcount: Handle sections with no non-weak symbols Message-ID: <20220428184212.18fbf438@gandalf.local.home> In-Reply-To: <126aca34935cf1c7168e17970c706e36577094e7.1651166001.git.naveen.n.rao@linux.vnet.ibm.com> References: <126aca34935cf1c7168e17970c706e36577094e7.1651166001.git.naveen.n.rao@linux.vnet.ibm.com> X-Mailer: Claws Mail 3.17.8 (GTK+ 2.24.33; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, 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, 28 Apr 2022 22:49:52 +0530 "Naveen N. Rao" wrote: > But, with ppc64 elf abi v1 which only supports the old -pg flag, mcount > location can differ between the weak and non-weak variants of a > function. In such scenarios, one of the two mcount entries will be > invalid. Such architectures need to validate mcount locations by > ensuring that the instruction(s) at those locations are as expected. On > powerpc, this can be a simple check to ensure that the instruction is a > 'bl'. This check can be further tightened as necessary. I was thinking about this more, and I was thinking that we could create another section; Perhaps __mcount_loc_weak. And place these in that section. That way, we could check if these symbols to see if there's already a symbol for it, and if there is, then drop it. -- Steve