From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756282AbcGHVIU (ORCPT ); Fri, 8 Jul 2016 17:08:20 -0400 Received: from smtprelay0213.hostedemail.com ([216.40.44.213]:38728 "EHLO smtprelay.hostedemail.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752314AbcGHVIN (ORCPT ); Fri, 8 Jul 2016 17:08:13 -0400 X-Session-Marker: 726F737465647440676F6F646D69732E6F7267 X-Spam-Summary: 2,0,0,,d41d8cd98f00b204,rostedt@goodmis.org,:::::::::::::::::::::::::::::::::::,RULES_HIT:41:355:379:541:599:800:960:973:988:989:1260:1277:1311:1313:1314:1345:1359:1437:1515:1516:1518:1534:1541:1593:1594:1711:1730:1747:1777:1792:2393:2553:2559:2562:2693:3138:3139:3140:3141:3142:3352:3622:3865:3867:3868:3870:3871:3872:3873:3874:4321:5007:6261:6691:6742:7774:7875:7903:8660:10004:10400:10848:10967:11026:11232:11658:11914:12296:12517:12519:12740:13069:13148:13230:13311:13357:13439:14096:14097:14181:14659:14721:14777:21080:21433:30022:30054:30070:30090:30091,0,RBL:none,CacheIP:none,Bayesian:0.5,0.5,0.5,Netcheck:none,DomainCache:0,MSF:not bulk,SPF:fn,MSBL:0,DNSBL:none,Custom_rules:0:0:0,LFtime:9,LUA_SUMMARY:none X-HE-Tag: cry54_d0b3c7be195e X-Filterd-Recvd-Size: 2673 Date: Fri, 8 Jul 2016 17:08:08 -0400 From: Steven Rostedt To: Torsten Duwe Cc: Josh Poimboeuf , Petr Mladek , Catalin Marinas , Will Deacon , takahiro.akashi@linaro.org, Jungseok Lee , Arnd Bergmann , Li Bin , Ingo Molnar , Christopher Li , Jiri Kosina , andrew.wafaa@arm.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, live-patching@vger.kernel.org, linux-arch@vger.kernel.org, linux-sparse@vger.kernel.org Subject: Re: [PATCH v2 1/2] arm64: implement FTRACE_WITH_REGS Message-ID: <20160708170808.1ab70ce3@gandalf.local.home> In-Reply-To: <20160708202455.GA4580@lst.de> References: <20160627151500.2247A68D20@newverein.lst.de> <20160627151717.BD25468D26@newverein.lst.de> <20160708145800.GE3556@pathway.suse.cz> <20160708150709.GA8979@lst.de> <20160708152421.GG3556@pathway.suse.cz> <20160708154824.ikq45dgk2auigqn7@treble> <20160708115710.5c657b5f@gandalf.local.home> <20160708202455.GA4580@lst.de> X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, 8 Jul 2016 22:24:55 +0200 Torsten Duwe wrote: > On Fri, Jul 08, 2016 at 11:57:10AM -0400, Steven Rostedt wrote: > > On Fri, 8 Jul 2016 10:48:24 -0500 > > Josh Poimboeuf wrote: > > > > > > Here, with -fprolog-pad, it's already a nop, so no change is needed. > > > > > Yes, exactly. > > > That's what I was thinking. But as I stated in another email (probably > > in the air when you wrote this), the call to ftrace_modify_code() may be > > completely circumvented by ftrace_make_nop() if the addr is MCOUNT_ADDR. > > Only on the _first_ invocation. Later on, tracing can be switched on and off, > and then the instructions need to be changed just like with fentry (or > profile-kernel ;-) > Understood, but ftrace_modify_code() will only receive addr == MCOUNT_ADDR on boot up or when a module is loaded. In both cases, with -fprolog-pad it will already be a nop, hence no need to call ftrace_modify_code(), in those cases. In all other cases, addr will point to a ftrace trampoline. -- Steve