From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.ozlabs.org (lists.ozlabs.org [112.213.38.117]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 00FD1C433F5 for ; Thu, 27 Jan 2022 12:46:37 +0000 (UTC) Received: from boromir.ozlabs.org (localhost [IPv6:::1]) by lists.ozlabs.org (Postfix) with ESMTP id 4Jl0hX2VD7z3cPR for ; Thu, 27 Jan 2022 23:46:36 +1100 (AEDT) Authentication-Results: lists.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=kernel.org (client-ip=2604:1380:4601:e00::1; helo=ams.source.kernel.org; envelope-from=srs0=3nbw=sl=goodmis.org=rostedt@kernel.org; receiver=) Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by lists.ozlabs.org (Postfix) with ESMTPS id 4Jl0h30jhlz30Qt for ; Thu, 27 Jan 2022 23:46:10 +1100 (AEDT) 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 DFF24B82229; 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 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 X-BeenThere: linuxppc-dev@lists.ozlabs.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Linux on PowerPC Developers Mail List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: keescook@chromium.org, linux-kernel@vger.kernel.org, Sven Schnelle , Sachin Sant , Yinan Liu , linuxppc-dev@lists.ozlabs.org, ardb@kernel.org Errors-To: linuxppc-dev-bounces+linuxppc-dev=archiver.kernel.org@lists.ozlabs.org Sender: "Linuxppc-dev" 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