Received: by 2002:a05:6a10:af89:0:0:0:0 with SMTP id iu9csp66584pxb; Thu, 27 Jan 2022 15:14:32 -0800 (PST) X-Google-Smtp-Source: ABdhPJzRI2qQ9lTX7fRILGt6ZDHw/sFOlTUbSJBdHVDPLdbg+INEmnfsDatW1yYqEThuHUpMaNaY X-Received: by 2002:a17:907:608f:: with SMTP id ht15mr4661285ejc.484.1643325272342; Thu, 27 Jan 2022 15:14:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1643325272; cv=none; d=google.com; s=arc-20160816; b=JqaQGpusRreeOeOsZ/HRJuSaoFS0KtW74/ZYOl1cV7Od+TdFQod9ZSXX0lKBGTclQI ZwJaxKJsB3FLG3LbkJ/oZFghVMV1j2oRhCLWq4Lk5YAgclbRSnqlyDHS3cDEnh10Vruz r7d1TEI4iDtORSwWltYBd6eQgs51IeTlXx52++k4zS0pxN3P4+3JGPYZ2KfLFMvEhcn8 HSZrQhCOcG7OLfS8t51gO9K0j4gjrbYUOym42jr3rb/HpE2Chkt35HxhvHZQJrKNxirM 5bR9b/XuCLb4/6N3UkjpJ2CsQy9/QofLH4cqnZ37ADkUm/ujAY1CIp7H5tTprjbCRWcu TppA== 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=cQG8fGK9LuxmtMlMf7D8f3uXkXoiRADDAyTrJCvz3n8=; b=bE4hgVerpPsNkH6FjMzVm9XDtWxlczxVrPlTyGk4A3XGMAmKcaStHY98uAHVCitQrG XDw1SG0hURdrZW/+BwLOuT2RmsKq2sxYf6oISIPXPVZ4Ow7WufusS8oNPHedTyfjkrr9 QivSPZWUa17vRK1hU/5vajBEi6ZN2hJVfL6vU0iGlwUNVUx0gQ+OAh2RiMIi9AQvIxq7 0DQdy6gGijonvfk5i+T7QNppRqXvQrFuaRGiPvqgaogBF9uRCR9QPoE2DukfefmmCJ5H K6HDDWO1VHOfwSCH3UyzFThQfZELLuayVJbwEcN+v+IyFr29ayW8rJCS4NmwscwbbHcT gdEA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b6si2169028ede.25.2022.01.27.15.14.07; Thu, 27 Jan 2022 15:14:32 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236815AbiA0MqH (ORCPT + 99 others); Thu, 27 Jan 2022 07:46:07 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53538 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229689AbiA0MqG (ORCPT ); Thu, 27 Jan 2022 07:46:06 -0500 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 22C09C061714 for ; Thu, 27 Jan 2022 04:46:06 -0800 (PST) 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 ams.source.kernel.org (Postfix) with ESMTPS id E0CDEB82234 for ; Thu, 27 Jan 2022 12:46:04 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 79E47C340E4; Thu, 27 Jan 2022 12:46:02 +0000 (UTC) Date: Thu, 27 Jan 2022 07:46:01 -0500 From: Steven Rostedt To: Mark Rutland Cc: Sven Schnelle , Yinan Liu , linuxppc-dev@lists.ozlabs.org, Sachin Sant , linux-kernel@vger.kernel.org, ardb@kernel.org, keescook@chromium.org Subject: Re: [powerpc] ftrace warning kernel/trace/ftrace.c:2068 with code-patching selftests Message-ID: <20220127074601.41a3773d@rorschach.local.home> In-Reply-To: References: <944D10DA-8200-4BA9-8D0A-3BED9AA99F82@linux.ibm.com> <20220124114548.30241947@gandalf.local.home> <0fa0daec-881a-314b-e28b-3828e80bbd90@linux.alibaba.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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 27 Jan 2022 12:27:04 +0000 Mark Rutland wrote: > Ah, so those non-ELF relocations for the mcount_loc table just mean "apply the > KASLR offset here", which is equivalent for all entries. > > That makes sense, thanks! And this is why we were having such a hard time understanding each other ;-) I started a new project called "shelf", which is a shell interface to read ELF files (Shelf on a ELF!). It uses my ccli library: https://github.com/rostedt/libccli and can be found here: https://github.com/rostedt/shelf Build and install the latest libccli and then build this with just "make". $ shelf vmlinux and then you can see what is stored in the mcount location: shelf> dump symbol __start_mcount_loc - __stop_mcount_loc I plan on adding more to include the REL and RELA sections and show how they affect symbols and such. Feel free to contribute too ;-) -- Steve