From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754651AbdBISSZ (ORCPT ); Thu, 9 Feb 2017 13:18:25 -0500 Received: from mail-wr0-f193.google.com ([209.85.128.193]:35053 "EHLO mail-wr0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753060AbdBISSW (ORCPT ); Thu, 9 Feb 2017 13:18:22 -0500 Date: Thu, 9 Feb 2017 18:18:15 +0000 From: Abel Vesa To: Russell King - ARM Linux Cc: Steven Rostedt , Abel Vesa , mingo@redhat.com, viro@zeniv.linux.org.uk, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, jjhiblot@traphandler.com, pmladek@suse.com, robin.murphy@arm.com, zhouchengming1@huawei.com Subject: Re: [PATCHv3] arm: ftrace: Adds support for CONFIG_DYNAMIC_FTRACE_WITH_REGS Message-ID: <20170209181815.GA3439@nuc> References: <1486508275-18449-1-git-send-email-abelvesa@linux.com> <20170209162956.GH27312@n2100.armlinux.org.uk> <20170209121322.5229e6cf@gandalf.local.home> <20170209180644.GJ27312@n2100.armlinux.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170209180644.GJ27312@n2100.armlinux.org.uk> User-Agent: Mutt/1.5.23.1 (2014-03-12) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Feb 09, 2017 at 06:06:44PM +0000, Russell King - ARM Linux wrote: > On Thu, Feb 09, 2017 at 12:13:22PM -0500, Steven Rostedt wrote: > > Then came along live kernel patching, which I believe this series is > > trying to support. What is needed by pt_regs is a way to "hijack" the > > function being called to instead call the patched function. That is, > > ftrace is not being used for tracing, but in reality, being used to > > modify the running kernel. It is being used to change what function > > gets called. ftrace is just a hook for that mechanism. > > So, would I be correct to assume that the only parts of pt_regs that > would be touched are those which contain arguments to the function, > and the register which would contain the return value? At this point, yeah, but I intend to come up with another patch series for livepatching which needs the exact same context as the function livepatched. This means all the regs need to be saved and restored before calling the replacing function. > > -- > RMK's Patch system: http://www.armlinux.org.uk/developer/patches/ > FTTC broadband for 0.8mile line: currently at 9.6Mbps down 400kbps up > according to speedtest.net.